root/cgm/cgm_apps/ccapi/geom/Body_ccapi.h @ 1040

Revision 1040, 5.5 KB (checked in by tautges, 2 years ago)

Version 10.2 of cgm.

Line 
1/*-------------------------------------------------------------------------
2 * Filename      : Body.hpp
3 *
4 * Purpose       : This class represents the topological entity, Body,
5 *                 which is the highest level abstraction for a complete
6 *                 geometric model.
7 *
8 * Special Notes : Body is a GroupingEntity in the TopologyEntity hierarchy.
9 *                 It is also a RefEntity and get a lot of its functionality
10 *                 and data from the RefEntity base class for meshing
11 *                 purposes.
12 *
13 *                 The user is provided a handle to Bodies.
14 *
15 * Creator       :
16 *
17 * Creation Date :
18 *
19 * Owner         :
20 *-------------------------------------------------------------------------
21 */
22
23#ifndef BODY_CCAPI_HPP
24#define BODY_CCAPI_HPP
25
26#include "EntityType.h"
27#include "CubitVectorStruct.h"
28#include "CubitBoxStruct.h"
29#include "CubitDefines.h"
30
31#ifdef __cplusplus
32extern "C" {
33#endif
34
35  /* topology */
36
37enum EntityType Body_get_sense_entity_type(void *this_body);
38  /*R EntityType
39   *R- The type of the specific sense entity.
40   *- This function returns the type of the specific sense entity.
41   */
42
43enum EntityType Body_get_basic_topology_entity_type(void *this_body);
44  /*R EntityType
45   *R- The type of the corresponding BasicTopologyEntity type.
46   *- This function returns the type of the corresponding
47   *- BasicTopologyEntity .
48   */
49
50enum EntityType Body_get_child_basic_topology_entity_type(void *this_body);
51  /*R EntityType
52   *R- A type value.
53   *- This function returns the type of the child RefEntity of 
54   *- Body, which is the type value of the RefVolume class.
55   */
56     
57enum EntityType Body_get_child_ref_entity_type(void *this_body);
58  /*R EntityType
59   *R- A type value.
60   *- This function returns the type of the child RefEntity of 
61   *- Body, which is the type value of the RefVolume class.
62   */
63
64enum EntityType Body_get_parent_ref_entity_type(void *this_body);
65  /*R EntityType
66   *R- A type value.
67   *- This function returns the type of the child RefEntity of 
68   *- Body, which is the type value of the RefVolume class.
69   */
70
71    /* geometry */
72
73struct CubitBoxStruct Body_bounding_box(void *this_body);
74  /*- Returns the bounding box of this body
75   */
76
77struct CubitVectorStruct Body_center_point(void *this_body);
78  /*- Return a CubitVector set to the centroid of this body
79   */
80
81double Body_measure(void *this_body);
82
83  /*- Heading: geometry modification functions */
84
85/* Body* */ void * Body_copy(void *this_body);
86  /*- Copy this Body to another body
87   */
88 
89enum CubitStatus Body_move(void *this_body, double dx, double dy, double dz,
90                 enum CubitBoolean update_now);
91  /*- Move this Body by dx, dy and dz
92   */
93 
94enum CubitStatus Body_rotate(void *this_body, double x, double y, double z, double angle,
95                   enum CubitBoolean update_now);
96  /*- Rotates this Body about a vector defined by x, y and z
97   */
98 
99enum CubitStatus Body_scale(void *this_body, double scaling_factor,
100                  enum CubitBoolean update_now);
101  /*- Scales this Body by the factor, scaling_factor
102   */
103
104enum CubitStatus Body_restore(void *this_body, enum CubitBoolean update_now);
105  /*- Restores this Body by replacing the transformation matrix
106   *- associated with it with a unit matrix
107   */
108
109enum CubitStatus Body_reverse(void *this_body, enum CubitBoolean update_now);
110  /*- reverses the orientation of the faces on this body
111   */
112 
113enum CubitStatus Body_transform_position(void *this_body, /* CubitVector const& */ struct CubitVectorStruct position_vector,
114                                      /* CubitVector & */ struct CubitVectorStruct *transformed_vector);
115  /*R enum CubitStatus
116   *R- CUBIT_SUCCESS/FAILURE
117   *I position_vector
118   *I- The input vector that needs to be transformed.
119   *O transformed_vector
120   *O- The transformed CubitVector -- sent in by reference.
121   *- This function will transform the input position_vector using
122   *- the transformation matrix associated with the underlying geometry
123   *- of this Body.  If there is none, then CUBIT_FAILURE is returned
124   *- and transformed_vector is left untouched.
125   *- Note: The input vector *must* have 3 components.
126   */
127
128int Body_validate(void *this_body);
129  /*- do a measure and api entity check.
130   */
131 
132/* CubitString */ const char *Body_measure_label(void *this_body);
133  /*- Functions related to "measuring" the Body
134   */
135
136enum EntityType Body_entity_type(void *this_body);
137
138void* Body_get_address(void *this_body, enum EntityType inputEntityType);
139  /*R void*
140   *R- Returned void pointer
141   *I inputEntityType
142   *I- The input type to get the address of.
143   *- This function returns a void pointer that points to the
144   *- "appropriate" portion of this object.  The appropriate
145   *- portion is determined by the input EntityType variable.
146   *- Returns NULL if the input type and the type of "this"
147   *- are not related by inheritance.
148   *- Note: The RTTI capabilities encoded in these functions
149   *-       are designed to work with any form of multiple
150   *-       inheritance, as well.  Multiple inheritance is what
151   *-       necessitates having this function defined in every
152   *-       class in the hierarchy.
153   *- Note: This function can also be used to merely check if
154   *-       an object of one type is related to another type
155   *-       through inheritance.  If a non-NULL pointer is
156   *-       returned, then this is true.
157   */
158     
159void Body_copiedFromId_1(void *this_body,  int Id );
160int Body_copiedFromId_2(void *this_body);
161  /*- Sets/Gets the id of the body that it was copied from */
162
163#ifdef __cplusplus
164}
165#endif
166
167#endif
Note: See TracBrowser for help on using the browser.