| 1 | #ifndef __CGM_GEOM_HPP__ |
|---|
| 2 | #define __CGM_GEOM_HPP__ |
|---|
| 3 | |
|---|
| 4 | #include "TSTTB_SNL.h" |
|---|
| 5 | |
|---|
| 6 | #ifdef __cplusplus |
|---|
| 7 | |
|---|
| 8 | extern "C" |
|---|
| 9 | { |
|---|
| 10 | #else |
|---|
| 11 | typedef int bool; |
|---|
| 12 | #endif |
|---|
| 13 | |
|---|
| 14 | typedef void* TSTTG_GentityHandle; |
|---|
| 15 | typedef const void* TSTTG_CGentityHandle; |
|---|
| 16 | typedef void* TSTTG_GentitySetHandle; |
|---|
| 17 | typedef const void* TSTTG_CGentitySetHandle; |
|---|
| 18 | typedef void* TSTTG_TagHandle; |
|---|
| 19 | typedef void* TSTTG_Instance; |
|---|
| 20 | typedef void* TSTTG_GentityIterator; |
|---|
| 21 | typedef const void* TSTTG_CGentityIterator; |
|---|
| 22 | |
|---|
| 23 | #define ARRAY_IN_DECL(a, b) \ |
|---|
| 24 | a *b, const int b ## _size |
|---|
| 25 | |
|---|
| 26 | #define CONST_ARRAY_IN_DECL(a, b) \ |
|---|
| 27 | const a *b, const int b ## _size |
|---|
| 28 | |
|---|
| 29 | #define ARRAY_INOUT_DECL(a, b) \ |
|---|
| 30 | a **b, int *b ## _allocated, int *b ## _size |
|---|
| 31 | |
|---|
| 32 | #define ARRAY_IN(b) \ |
|---|
| 33 | b, b ## _size |
|---|
| 34 | |
|---|
| 35 | #define ARRAY_INOUT(b) \ |
|---|
| 36 | b, b ## _allocated, b ## _size |
|---|
| 37 | |
|---|
| 38 | #define RETURN(a) {TSTTG_LAST_ERROR.error_type = a; return a;} |
|---|
| 39 | #define TSTTG_processError(a, b) {sprintf(TSTTG_LAST_ERROR.description, b); TSTTG_LAST_ERROR.error_type = a;} |
|---|
| 40 | |
|---|
| 41 | enum TSTTG_GentityType { |
|---|
| 42 | TSTTG_VERTEX, |
|---|
| 43 | TSTTG_EDGE, |
|---|
| 44 | TSTTG_FACE, |
|---|
| 45 | TSTTG_REGION, |
|---|
| 46 | TSTTG_ALL_TYPES |
|---|
| 47 | }; |
|---|
| 48 | |
|---|
| 49 | enum TSTTG_TagValueType { |
|---|
| 50 | TSTTG_INTEGER = 0, |
|---|
| 51 | TSTTG_DOUBLE, |
|---|
| 52 | TSTTG_ENTITY_HANDLE, |
|---|
| 53 | TSTTG_BYTES |
|---|
| 54 | }; |
|---|
| 55 | |
|---|
| 56 | extern struct TSTTB_Error TSTTG_LAST_ERROR; |
|---|
| 57 | |
|---|
| 58 | enum TSTTB_ErrorType |
|---|
| 59 | TSTTG_ctor(TSTTG_Instance *instance); |
|---|
| 60 | |
|---|
| 61 | enum TSTTB_ErrorType |
|---|
| 62 | TSTTG_dtor(TSTTG_Instance instance); |
|---|
| 63 | |
|---|
| 64 | enum TSTTB_ErrorType |
|---|
| 65 | TSTTG_createEntSet (TSTTG_Instance instance, |
|---|
| 66 | /*in*/ bool isList, |
|---|
| 67 | /*out*/ TSTTG_GentitySetHandle *entity_set); |
|---|
| 68 | |
|---|
| 69 | enum TSTTB_ErrorType |
|---|
| 70 | TSTTG_destroyEntSet (TSTTG_Instance instance, |
|---|
| 71 | /*in*/ TSTTG_GentitySetHandle entity_set); |
|---|
| 72 | |
|---|
| 73 | bool |
|---|
| 74 | TSTTG_isList (TSTTG_Instance instance, |
|---|
| 75 | /*in*/ TSTTG_CGentitySetHandle entity_set); |
|---|
| 76 | |
|---|
| 77 | int |
|---|
| 78 | TSTTG_getNumEntSets (TSTTG_Instance instance, |
|---|
| 79 | /*in*/ TSTTG_CGentitySetHandle entity_set, |
|---|
| 80 | /*in*/ int num_hops); |
|---|
| 81 | |
|---|
| 82 | enum TSTTB_ErrorType |
|---|
| 83 | TSTTG_getEntSets (TSTTG_Instance instance, |
|---|
| 84 | /*in*/ TSTTG_CGentitySetHandle entity_set, |
|---|
| 85 | /*in*/ const int num_hops, |
|---|
| 86 | /*inout*/ ARRAY_INOUT_DECL(TSTTG_GentitySetHandle, |
|---|
| 87 | contained_entity_set_handles)); |
|---|
| 88 | |
|---|
| 89 | enum TSTTB_ErrorType |
|---|
| 90 | TSTTG_addEntToSet (TSTTG_Instance instance, |
|---|
| 91 | /*in*/ TSTTG_CGentityHandle entity_handle, |
|---|
| 92 | /*inout*/ TSTTG_GentitySetHandle *entity_set); |
|---|
| 93 | |
|---|
| 94 | enum TSTTB_ErrorType |
|---|
| 95 | TSTTG_rmvEntFromSet (TSTTG_Instance instance, |
|---|
| 96 | /*in*/ TSTTG_CGentityHandle entity_handle, |
|---|
| 97 | /*inout*/ TSTTG_GentitySetHandle *entity_set); |
|---|
| 98 | |
|---|
| 99 | enum TSTTB_ErrorType |
|---|
| 100 | TSTTG_addEntArrToSet (TSTTG_Instance instance, |
|---|
| 101 | /*in*/ ARRAY_IN_DECL(TSTTG_GentityHandle, entity_handles), |
|---|
| 102 | /*inout*/ TSTTG_GentitySetHandle *entity_set); |
|---|
| 103 | |
|---|
| 104 | enum TSTTB_ErrorType |
|---|
| 105 | TSTTG_rmvEntArrFromSet (TSTTG_Instance instance, |
|---|
| 106 | /*in*/ ARRAY_IN_DECL(TSTTG_GentityHandle, entity_handles), |
|---|
| 107 | /*inout*/ TSTTG_GentitySetHandle *entity_set); |
|---|
| 108 | |
|---|
| 109 | enum TSTTB_ErrorType |
|---|
| 110 | TSTTG_addEntSet (TSTTG_Instance instance, |
|---|
| 111 | /*in*/ TSTTG_CGentitySetHandle entity_set_to_add, |
|---|
| 112 | /*inout*/ TSTTG_GentitySetHandle *entity_set_handle); |
|---|
| 113 | |
|---|
| 114 | enum TSTTB_ErrorType |
|---|
| 115 | TSTTG_rmvEntSet (TSTTG_Instance instance, |
|---|
| 116 | /*in*/ TSTTG_CGentitySetHandle entity_set_to_remove, |
|---|
| 117 | /*inout*/ TSTTG_GentitySetHandle *entity_set_handle); |
|---|
| 118 | |
|---|
| 119 | bool |
|---|
| 120 | TSTTG_isEntContained (TSTTG_Instance instance, |
|---|
| 121 | /*in*/ TSTTG_CGentitySetHandle containing_entity_set, |
|---|
| 122 | /*in*/ TSTTG_CGentityHandle contained_entity); |
|---|
| 123 | |
|---|
| 124 | bool |
|---|
| 125 | TSTTG_isEntSetContained (TSTTG_Instance instance, |
|---|
| 126 | /*in*/ TSTTG_CGentitySetHandle containing_entity_set, |
|---|
| 127 | /*in*/ TSTTG_CGentitySetHandle contained_entity_set); |
|---|
| 128 | |
|---|
| 129 | enum TSTTB_ErrorType |
|---|
| 130 | TSTTG_addPrntChld (TSTTG_Instance instance, |
|---|
| 131 | /*inout*/ TSTTG_GentitySetHandle *parent_entity_set, |
|---|
| 132 | /*inout*/ TSTTG_GentitySetHandle *child_entity_set |
|---|
| 133 | ); |
|---|
| 134 | |
|---|
| 135 | enum TSTTB_ErrorType |
|---|
| 136 | TSTTG_rmvPrntChld (TSTTG_Instance instance, |
|---|
| 137 | /*inout*/ TSTTG_GentitySetHandle *parent_entity_set, |
|---|
| 138 | /*inout*/ TSTTG_GentitySetHandle *child_entity_set |
|---|
| 139 | ); |
|---|
| 140 | |
|---|
| 141 | bool |
|---|
| 142 | TSTTG_isChildOf (TSTTG_Instance instance, |
|---|
| 143 | /*in*/ TSTTG_CGentitySetHandle parent_entity_set, |
|---|
| 144 | /*in*/ TSTTG_CGentitySetHandle child_entity_set); |
|---|
| 145 | |
|---|
| 146 | int |
|---|
| 147 | TSTTG_getNumChld (TSTTG_Instance instance, |
|---|
| 148 | /*in*/ TSTTG_CGentitySetHandle entity_set, |
|---|
| 149 | /*in*/ const int num_hops); |
|---|
| 150 | |
|---|
| 151 | int |
|---|
| 152 | TSTTG_getNumPrnt (TSTTG_Instance instance, |
|---|
| 153 | /*in*/ TSTTG_CGentitySetHandle entity_set, |
|---|
| 154 | /*in*/ const int num_hops); |
|---|
| 155 | |
|---|
| 156 | enum TSTTB_ErrorType |
|---|
| 157 | TSTTG_getChldn (TSTTG_Instance instance, |
|---|
| 158 | /*in*/ TSTTG_CGentitySetHandle from_entity_set, |
|---|
| 159 | /*in*/ const int num_hops, |
|---|
| 160 | /*inout*/ ARRAY_INOUT_DECL(TSTTG_GentitySetHandle, entity_set_handles)); |
|---|
| 161 | |
|---|
| 162 | enum TSTTB_ErrorType |
|---|
| 163 | TSTTG_getPrnts (TSTTG_Instance instance, |
|---|
| 164 | /*in*/ TSTTG_CGentitySetHandle from_entity_set, |
|---|
| 165 | /*in*/ const int num_hops, |
|---|
| 166 | /*inout*/ ARRAY_INOUT_DECL(TSTTG_GentitySetHandle, entity_set_handles)); |
|---|
| 167 | |
|---|
| 168 | enum TSTTB_ErrorType |
|---|
| 169 | TSTTG_gentitysetGetGentitiesOfType (TSTTG_Instance instance, |
|---|
| 170 | /*in*/ TSTTG_CGentitySetHandle set_handle, |
|---|
| 171 | /*in*/ const TSTTG_GentityType gentity_type, |
|---|
| 172 | /*out*/ ARRAY_INOUT_DECL(TSTTG_GentityHandle, gentity_handles)); |
|---|
| 173 | |
|---|
| 174 | int |
|---|
| 175 | TSTTG_gentitysetGetNumberGentitiesOfType (TSTTG_Instance instance, |
|---|
| 176 | /*in*/ TSTTG_CGentitySetHandle set_handle, |
|---|
| 177 | /*in*/ const TSTTG_GentityType gentity_type); |
|---|
| 178 | |
|---|
| 179 | enum TSTTB_ErrorType |
|---|
| 180 | TSTTG_gentityGetType (TSTTG_Instance instance, |
|---|
| 181 | /*in*/ ARRAY_IN_DECL(TSTTG_CGentityHandle, gentity_handles), |
|---|
| 182 | /*inout*/ ARRAY_INOUT_DECL(TSTTG_GentityType, gtype)); |
|---|
| 183 | |
|---|
| 184 | enum TSTTB_ErrorType |
|---|
| 185 | TSTTG_gentityGetAdjacencies (TSTTG_Instance instance, |
|---|
| 186 | /*in*/ TSTTG_CGentityHandle gentity_handle, |
|---|
| 187 | /*in*/ const int to_dimension, |
|---|
| 188 | /*inout*/ ARRAY_INOUT_DECL(TSTTG_GentityHandle, adj_gentities)); |
|---|
| 189 | |
|---|
| 190 | enum TSTTB_ErrorType |
|---|
| 191 | TSTTG_gentityGet2OAdjacencies (TSTTG_Instance instance, |
|---|
| 192 | /*in*/ TSTTG_CGentityHandle gentity_handle, |
|---|
| 193 | /*in*/ const int bridge_dimension, |
|---|
| 194 | /*in*/ const int to_dimension, |
|---|
| 195 | /*out*/ ARRAY_INOUT_DECL(TSTTG_GentityHandle, adjacent_gentities)); |
|---|
| 196 | |
|---|
| 197 | enum TSTTB_ErrorType |
|---|
| 198 | TSTTG_gentityIsAdjacent (TSTTG_Instance instance, |
|---|
| 199 | /*in*/ TSTTG_CGentityHandle gentity_handle1, |
|---|
| 200 | /*in*/ TSTTG_CGentityHandle gentity_handle2, |
|---|
| 201 | /*out*/ bool *are_adjacent); |
|---|
| 202 | |
|---|
| 203 | enum TSTTB_ErrorType |
|---|
| 204 | TSTTG_Move (TSTTG_Instance instance, |
|---|
| 205 | /*inout*/ TSTTG_GentityHandle *geom_entity, |
|---|
| 206 | /*in*/ const double x, |
|---|
| 207 | /*in*/ const double y, |
|---|
| 208 | /*in*/ const double z); |
|---|
| 209 | |
|---|
| 210 | enum TSTTB_ErrorType |
|---|
| 211 | TSTTG_Rotate (TSTTG_Instance instance, |
|---|
| 212 | /*inout*/ TSTTG_GentityHandle *geom_entity, |
|---|
| 213 | /*in*/ const double angle, |
|---|
| 214 | /*in*/ const double axis_normal_x, |
|---|
| 215 | /*in*/ const double axis_normal_y, |
|---|
| 216 | /*in*/ const double axis_normal_z); |
|---|
| 217 | |
|---|
| 218 | enum TSTTB_ErrorType |
|---|
| 219 | TSTTG_Reflect (TSTTG_Instance instance, |
|---|
| 220 | /*inout*/ TSTTG_GentityHandle *geom_entity, |
|---|
| 221 | /*in*/ const double plane_normal_x, |
|---|
| 222 | /*in*/ const double plane_normal_y, |
|---|
| 223 | /*in*/ const double plane_normal_z); |
|---|
| 224 | |
|---|
| 225 | enum TSTTB_ErrorType |
|---|
| 226 | TSTTG_Scale (TSTTG_Instance instance, |
|---|
| 227 | /*inout*/ TSTTG_GentityHandle *geom_entity, |
|---|
| 228 | /*in*/ const double scale_x, |
|---|
| 229 | /*in*/ const double scale_y, |
|---|
| 230 | /*in*/ const double scale_z); |
|---|
| 231 | |
|---|
| 232 | enum TSTTB_ErrorType |
|---|
| 233 | TSTTG_Copy (TSTTG_Instance instance, |
|---|
| 234 | /*in*/ TSTTG_GentityHandle geom_entity, |
|---|
| 235 | /*out*/ TSTTG_GentityHandle *geom_entity2); |
|---|
| 236 | |
|---|
| 237 | enum TSTTB_ErrorType |
|---|
| 238 | TSTTG_SweepAboutAxis (TSTTG_Instance instance, |
|---|
| 239 | /*in*/ TSTTG_GentityHandle geom_entity, |
|---|
| 240 | /*in*/ const double angle, |
|---|
| 241 | /*in*/ const double axis_normal_x, |
|---|
| 242 | /*in*/ const double axis_normal_y, |
|---|
| 243 | /*in*/ const double axis_normal_z, |
|---|
| 244 | /*out*/ TSTTG_GentityHandle *geom_entity2); |
|---|
| 245 | |
|---|
| 246 | enum TSTTB_ErrorType |
|---|
| 247 | TSTTG_Delete (TSTTG_Instance instance, |
|---|
| 248 | /*in*/ TSTTG_GentityHandle geom_entity); |
|---|
| 249 | |
|---|
| 250 | enum TSTTB_ErrorType |
|---|
| 251 | TSTTG_gLoad (TSTTG_Instance instance, |
|---|
| 252 | /*in*/ const char *name, |
|---|
| 253 | /*in*/ CONST_ARRAY_IN_DECL(char*, options)); |
|---|
| 254 | |
|---|
| 255 | enum TSTTB_ErrorType |
|---|
| 256 | TSTTG_gSave (TSTTG_Instance instance, |
|---|
| 257 | /*in*/ const char *name, |
|---|
| 258 | /*in*/ CONST_ARRAY_IN_DECL(char*, options)); |
|---|
| 259 | |
|---|
| 260 | enum TSTTB_ErrorType |
|---|
| 261 | TSTTG_gentityClosestPoint (TSTTG_Instance instance, |
|---|
| 262 | /*in*/ ARRAY_IN_DECL(TSTTG_CGentityHandle, gentity_handles), |
|---|
| 263 | /*in*/ CONST_ARRAY_IN_DECL(double, near_coordinates), |
|---|
| 264 | /*out*/ ARRAY_INOUT_DECL(double, on_coordinates)); |
|---|
| 265 | |
|---|
| 266 | enum TSTTB_ErrorType |
|---|
| 267 | TSTTG_gentityNormal (TSTTG_Instance instance, |
|---|
| 268 | /*in*/ ARRAY_IN_DECL(TSTTG_CGentityHandle, gentity_handles), |
|---|
| 269 | /*in*/ CONST_ARRAY_IN_DECL(double, coordinates), |
|---|
| 270 | /*out*/ ARRAY_INOUT_DECL(double, normals)); |
|---|
| 271 | |
|---|
| 272 | enum TSTTB_ErrorType |
|---|
| 273 | TSTTG_gentityClosestPointAndNormal (TSTTG_Instance instance, |
|---|
| 274 | /*in*/ ARRAY_IN_DECL(TSTTG_CGentityHandle, gentity_handles), |
|---|
| 275 | /*in*/ CONST_ARRAY_IN_DECL(double, near_coordinates), |
|---|
| 276 | /*out*/ ARRAY_INOUT_DECL(double, on_coordinates), |
|---|
| 277 | /*out*/ ARRAY_INOUT_DECL(double, normals)); |
|---|
| 278 | |
|---|
| 279 | enum TSTTB_ErrorType |
|---|
| 280 | TSTTG_gentityTangent (TSTTG_Instance instance, |
|---|
| 281 | /*in*/ ARRAY_IN_DECL(TSTTG_CGentityHandle, gentity_handles), |
|---|
| 282 | /*in*/ CONST_ARRAY_IN_DECL(double, coordinates), |
|---|
| 283 | /*out*/ ARRAY_INOUT_DECL(double, tangents)); |
|---|
| 284 | |
|---|
| 285 | enum TSTTB_ErrorType |
|---|
| 286 | TSTTG_gentityBoundingBox (TSTTG_Instance instance, |
|---|
| 287 | /*in*/ ARRAY_IN_DECL(TSTTG_GentityHandle, gentity_handles), |
|---|
| 288 | /*out*/ ARRAY_INOUT_DECL(double, min_corner), |
|---|
| 289 | /*out*/ ARRAY_INOUT_DECL(double, max_corner)); |
|---|
| 290 | |
|---|
| 291 | enum TSTTB_ErrorType |
|---|
| 292 | TSTTG_getGvertexCoordinates (TSTTG_Instance instance, |
|---|
| 293 | /*in*/ ARRAY_IN_DECL(TSTTG_CGentityHandle, gentity_handles), |
|---|
| 294 | /*out*/ ARRAY_INOUT_DECL(double, coordinates)); |
|---|
| 295 | |
|---|
| 296 | int |
|---|
| 297 | TSTTG_getGnormalSense (TSTTG_Instance instance, |
|---|
| 298 | /*in*/ TSTTG_CGentityHandle gface, |
|---|
| 299 | /*in*/ TSTTG_CGentityHandle gregion); |
|---|
| 300 | |
|---|
| 301 | int |
|---|
| 302 | TSTTG_getGtangentSense (TSTTG_Instance instance, |
|---|
| 303 | /*in*/ TSTTG_CGentityHandle gedge, |
|---|
| 304 | /*in*/ TSTTG_CGentityHandle gface); |
|---|
| 305 | |
|---|
| 306 | int |
|---|
| 307 | TSTTG_getGvertexTangentSense (TSTTG_Instance instance, |
|---|
| 308 | /*in*/ TSTTG_CGentityHandle gedge, |
|---|
| 309 | /*in*/ TSTTG_CGentityHandle gvertex1, |
|---|
| 310 | /*in*/ TSTTG_CGentityHandle gvertex2); |
|---|
| 311 | |
|---|
| 312 | enum TSTTB_ErrorType |
|---|
| 313 | TSTTG_createTag (TSTTG_Instance instance, |
|---|
| 314 | /*in*/ const char *tag_name, |
|---|
| 315 | /*in*/ const int tag_size, |
|---|
| 316 | /*in*/ const TSTTG_TagValueType tag_type, |
|---|
| 317 | /*out*/ TSTTG_TagHandle *tag_handle); |
|---|
| 318 | |
|---|
| 319 | enum TSTTB_ErrorType |
|---|
| 320 | TSTTG_destroyTag (TSTTG_Instance instance, |
|---|
| 321 | /*in*/ const TSTTG_TagHandle tag_handle, |
|---|
| 322 | /*in*/ const bool forced); |
|---|
| 323 | |
|---|
| 324 | const char * |
|---|
| 325 | TSTTG_getTagName (TSTTG_Instance instance, |
|---|
| 326 | /*in*/ const TSTTG_TagHandle tag_handle); |
|---|
| 327 | |
|---|
| 328 | int |
|---|
| 329 | TSTTG_getTagSizeValues (TSTTG_Instance instance, |
|---|
| 330 | /*in*/ const TSTTG_TagHandle tag_handle); |
|---|
| 331 | |
|---|
| 332 | int |
|---|
| 333 | TSTTG_getTagSizeBytes (TSTTG_Instance instance, |
|---|
| 334 | /*in*/ const TSTTG_TagHandle tag_handle); |
|---|
| 335 | |
|---|
| 336 | TSTTG_TagHandle |
|---|
| 337 | TSTTG_getTagHandle (TSTTG_Instance instance, |
|---|
| 338 | /*in*/ const char *tag_name); |
|---|
| 339 | |
|---|
| 340 | TSTTG_TagValueType |
|---|
| 341 | TSTTG_getTagType (TSTTG_Instance instance, |
|---|
| 342 | /*in*/ const TSTTG_TagHandle tag_handle); |
|---|
| 343 | |
|---|
| 344 | enum TSTTB_ErrorType |
|---|
| 345 | TSTTG_getArrData (TSTTG_Instance instance, |
|---|
| 346 | /*in*/ ARRAY_IN_DECL(TSTTG_CGentityHandle, entity_handles), |
|---|
| 347 | /*in*/ const TSTTG_TagHandle tag_handle, |
|---|
| 348 | /*inout*/ ARRAY_INOUT_DECL(char, tag_value)); |
|---|
| 349 | |
|---|
| 350 | enum TSTTB_ErrorType |
|---|
| 351 | TSTTG_getIntArrData (TSTTG_Instance instance, |
|---|
| 352 | /*in*/ ARRAY_IN_DECL(TSTTG_CGentityHandle, entity_handles), |
|---|
| 353 | /*in*/ const TSTTG_TagHandle tag_handle, |
|---|
| 354 | /*inout*/ ARRAY_INOUT_DECL(int, tag_value)); |
|---|
| 355 | |
|---|
| 356 | enum TSTTB_ErrorType |
|---|
| 357 | TSTTG_getDblArrData (TSTTG_Instance instance, |
|---|
| 358 | /*in*/ ARRAY_IN_DECL(TSTTG_CGentityHandle, entity_handles), |
|---|
| 359 | /*in*/ const TSTTG_TagHandle tag_handle, |
|---|
| 360 | /*inout*/ ARRAY_INOUT_DECL(double, tag_value)); |
|---|
| 361 | |
|---|
| 362 | enum TSTTB_ErrorType |
|---|
| 363 | TSTTG_getEHArrData (TSTTG_Instance instance, |
|---|
| 364 | /*in*/ ARRAY_IN_DECL(TSTTG_CGentityHandle, entity_handles), |
|---|
| 365 | /*in*/ const TSTTG_TagHandle tag_handle, |
|---|
| 366 | /*inout*/ ARRAY_INOUT_DECL(TSTTG_GentityHandle, tag_value)); |
|---|
| 367 | |
|---|
| 368 | enum TSTTB_ErrorType |
|---|
| 369 | TSTTG_setArrData (TSTTG_Instance instance, |
|---|
| 370 | /*in*/ ARRAY_IN_DECL(TSTTG_GentityHandle, entity_handles), |
|---|
| 371 | /*in*/ const TSTTG_TagHandle tag_handle, |
|---|
| 372 | /*in*/ CONST_ARRAY_IN_DECL(char, tag_values)); |
|---|
| 373 | |
|---|
| 374 | enum TSTTB_ErrorType |
|---|
| 375 | TSTTG_setIntArrData (TSTTG_Instance instance, |
|---|
| 376 | /*in*/ ARRAY_IN_DECL(TSTTG_GentityHandle, entity_handles), |
|---|
| 377 | /*in*/ const TSTTG_TagHandle tag_handle, |
|---|
| 378 | /*in*/ CONST_ARRAY_IN_DECL(int, tag_values)); |
|---|
| 379 | |
|---|
| 380 | enum TSTTB_ErrorType |
|---|
| 381 | TSTTG_setDblArrData (TSTTG_Instance instance, |
|---|
| 382 | /*in*/ ARRAY_IN_DECL(TSTTG_GentityHandle, entity_handles), |
|---|
| 383 | /*in*/ const TSTTG_TagHandle tag_handle, |
|---|
| 384 | /*in*/ CONST_ARRAY_IN_DECL(double, tag_values)); |
|---|
| 385 | |
|---|
| 386 | enum TSTTB_ErrorType |
|---|
| 387 | TSTTG_setEHArrData (TSTTG_Instance instance, |
|---|
| 388 | /*in*/ ARRAY_IN_DECL(TSTTG_GentityHandle, entity_handles), |
|---|
| 389 | /*in*/ const TSTTG_TagHandle tag_handle, |
|---|
| 390 | /*in*/ ARRAY_IN_DECL(TSTTG_CGentityHandle, tag_values)); |
|---|
| 391 | |
|---|
| 392 | enum TSTTB_ErrorType |
|---|
| 393 | TSTTG_rmvArrTag (TSTTG_Instance instance, |
|---|
| 394 | /*in*/ ARRAY_IN_DECL(TSTTG_GentityHandle, entity_handles), |
|---|
| 395 | /*in*/ const TSTTG_TagHandle tag_handle); |
|---|
| 396 | |
|---|
| 397 | enum TSTTB_ErrorType |
|---|
| 398 | TSTTG_getData (TSTTG_Instance instance, |
|---|
| 399 | /*in*/ TSTTG_CGentityHandle entity_handle, |
|---|
| 400 | /*in*/ const TSTTG_TagHandle tag_handle, |
|---|
| 401 | /*inout*/ ARRAY_INOUT_DECL(char, tag_value)); |
|---|
| 402 | |
|---|
| 403 | int |
|---|
| 404 | TSTTG_getIntData (TSTTG_Instance instance, |
|---|
| 405 | /*in*/ TSTTG_CGentityHandle entity_handle, |
|---|
| 406 | /*in*/ const TSTTG_TagHandle tag_handle); |
|---|
| 407 | |
|---|
| 408 | double |
|---|
| 409 | TSTTG_getDblData (TSTTG_Instance instance, |
|---|
| 410 | /*in*/ TSTTG_CGentityHandle entity_handle, |
|---|
| 411 | /*in*/ const TSTTG_TagHandle tag_handle); |
|---|
| 412 | |
|---|
| 413 | TSTTG_GentityHandle |
|---|
| 414 | TSTTG_getEHData (TSTTG_Instance instance, |
|---|
| 415 | /*in*/ TSTTG_CGentityHandle entity_handle, |
|---|
| 416 | /*in*/ const TSTTG_TagHandle tag_handle); |
|---|
| 417 | |
|---|
| 418 | enum TSTTB_ErrorType |
|---|
| 419 | TSTTG_setData (TSTTG_Instance instance, |
|---|
| 420 | /*in*/ TSTTG_GentityHandle entity_handle, |
|---|
| 421 | /*in*/ const TSTTG_TagHandle tag_handle, |
|---|
| 422 | /*in*/ CONST_ARRAY_IN_DECL(char, tag_value)); |
|---|
| 423 | |
|---|
| 424 | enum TSTTB_ErrorType |
|---|
| 425 | TSTTG_setIntData (TSTTG_Instance instance, |
|---|
| 426 | /*in*/ TSTTG_GentityHandle entity_handle, |
|---|
| 427 | /*in*/ const TSTTG_TagHandle tag_handle, |
|---|
| 428 | /*in*/ const int tag_value); |
|---|
| 429 | |
|---|
| 430 | enum TSTTB_ErrorType |
|---|
| 431 | TSTTG_setDblData (TSTTG_Instance instance, |
|---|
| 432 | /*in*/ TSTTG_GentityHandle entity_handle, |
|---|
| 433 | /*in*/ const TSTTG_TagHandle tag_handle, |
|---|
| 434 | /*in*/ const double tag_value); |
|---|
| 435 | |
|---|
| 436 | enum TSTTB_ErrorType |
|---|
| 437 | TSTTG_setEHData (TSTTG_Instance instance, |
|---|
| 438 | /*in*/ TSTTG_GentityHandle entity_handle, |
|---|
| 439 | /*in*/ const TSTTG_TagHandle tag_handle, |
|---|
| 440 | /*in*/ TSTTG_CGentityHandle tag_value); |
|---|
| 441 | |
|---|
| 442 | enum TSTTB_ErrorType |
|---|
| 443 | TSTTG_getAllTags (TSTTG_Instance instance, |
|---|
| 444 | /*in*/ TSTTG_CGentityHandle entity_handle, |
|---|
| 445 | /*inout*/ ARRAY_INOUT_DECL(void*, tag_handles)); |
|---|
| 446 | |
|---|
| 447 | enum TSTTB_ErrorType |
|---|
| 448 | TSTTG_rmvTag (TSTTG_Instance instance, |
|---|
| 449 | /*in*/ TSTTG_GentityHandle entity_handle, |
|---|
| 450 | /*in*/ const TSTTG_TagHandle tag_handle); |
|---|
| 451 | |
|---|
| 452 | enum TSTTB_ErrorType |
|---|
| 453 | TSTTG_Brick (TSTTG_Instance instance, |
|---|
| 454 | /*in*/ const double x, |
|---|
| 455 | /*in*/ const double y, |
|---|
| 456 | /*in*/ const double z, |
|---|
| 457 | /*out*/ TSTTG_GentityHandle *geom_entity); |
|---|
| 458 | |
|---|
| 459 | enum TSTTB_ErrorType |
|---|
| 460 | TSTTG_Cylinder (TSTTG_Instance instance, |
|---|
| 461 | /*in*/ const double height, |
|---|
| 462 | /*in*/ const double major_rad, |
|---|
| 463 | /*in*/ const double minor_rad, |
|---|
| 464 | /*out*/ TSTTG_GentityHandle *geom_entity); |
|---|
| 465 | |
|---|
| 466 | enum TSTTB_ErrorType |
|---|
| 467 | TSTTG_Torus (TSTTG_Instance instance, |
|---|
| 468 | /*in*/ const double major_rad, |
|---|
| 469 | /*in*/ const double minor_rad, |
|---|
| 470 | /*out*/ TSTTG_GentityHandle *geom_entity); |
|---|
| 471 | |
|---|
| 472 | enum TSTTB_ErrorType |
|---|
| 473 | TSTTG_Unite (TSTTG_Instance instance, |
|---|
| 474 | /*in*/ ARRAY_IN_DECL(TSTTG_GentityHandle, geom_entities), |
|---|
| 475 | /*out*/ TSTTG_GentityHandle *geom_entity); |
|---|
| 476 | |
|---|
| 477 | enum TSTTB_ErrorType |
|---|
| 478 | TSTTG_Subtract (TSTTG_Instance instance, |
|---|
| 479 | /*in*/ TSTTG_GentityHandle blank, |
|---|
| 480 | /*in*/ TSTTG_GentityHandle tool, |
|---|
| 481 | /*out*/ TSTTG_GentityHandle *geom_entity); |
|---|
| 482 | |
|---|
| 483 | enum TSTTB_ErrorType |
|---|
| 484 | TSTTG_Section (TSTTG_Instance instance, |
|---|
| 485 | /*inout*/ TSTTG_GentityHandle *geom_entity, |
|---|
| 486 | /*in*/ const double plane_normal_x, |
|---|
| 487 | /*in*/ const double plane_normal_y, |
|---|
| 488 | /*in*/ const double plane_normal_z, |
|---|
| 489 | /*in*/ const double offset, |
|---|
| 490 | /*in*/ const bool reverse, |
|---|
| 491 | /*out*/ TSTTG_GentityHandle *geom_entity2); |
|---|
| 492 | |
|---|
| 493 | enum TSTTB_ErrorType |
|---|
| 494 | TSTTG_Imprint (TSTTG_Instance instance, |
|---|
| 495 | /*inout*/ ARRAY_IN_DECL(TSTTG_GentityHandle, gentity_handles)); |
|---|
| 496 | |
|---|
| 497 | enum TSTTB_ErrorType |
|---|
| 498 | TSTTG_Merge (TSTTG_Instance instance, |
|---|
| 499 | /*inout*/ ARRAY_IN_DECL(TSTTG_GentityHandle, gentity_handles), |
|---|
| 500 | const double tolerance); |
|---|
| 501 | |
|---|
| 502 | enum TSTTB_ErrorType |
|---|
| 503 | TSTTG_getGtolerance (TSTTG_Instance instance, |
|---|
| 504 | /*out*/ double *relative_tolerance, |
|---|
| 505 | /*out*/ double *absolute_tolerance |
|---|
| 506 | ); |
|---|
| 507 | |
|---|
| 508 | enum TSTTB_ErrorType |
|---|
| 509 | TSTTG_getGentityTolerance (TSTTG_Instance instance, |
|---|
| 510 | /*in*/ ARRAY_IN_DECL(TSTTG_CGentityHandle, gentity_handles), |
|---|
| 511 | /*out*/ ARRAY_INOUT_DECL(double, relative_tolerances), |
|---|
| 512 | /*out*/ ARRAY_INOUT_DECL(double, absolute_tolerances)); |
|---|
| 513 | |
|---|
| 514 | enum TSTTB_ErrorType |
|---|
| 515 | TSTTG_subtract (TSTTG_Instance instance, |
|---|
| 516 | /*in*/ TSTTG_CGentitySetHandle entity_set_1, |
|---|
| 517 | /*in*/ TSTTG_CGentitySetHandle entity_set_2, |
|---|
| 518 | /*out*/ TSTTG_GentitySetHandle *result_entity_set); |
|---|
| 519 | |
|---|
| 520 | enum TSTTB_ErrorType |
|---|
| 521 | TSTTG_intersect (TSTTG_Instance instance, |
|---|
| 522 | /*in*/ TSTTG_CGentitySetHandle entity_set_1, |
|---|
| 523 | /*in*/ TSTTG_CGentitySetHandle entity_set_2, |
|---|
| 524 | /*out*/ TSTTG_GentitySetHandle *result_entity_set); |
|---|
| 525 | |
|---|
| 526 | enum TSTTB_ErrorType |
|---|
| 527 | TSTTG_unite (TSTTG_Instance instance, |
|---|
| 528 | /*in*/ TSTTG_CGentitySetHandle entity_set_1, |
|---|
| 529 | /*in*/ TSTTG_CGentitySetHandle entity_set_2, |
|---|
| 530 | /*out*/ TSTTG_GentitySetHandle *result_entity_set); |
|---|
| 531 | |
|---|
| 532 | enum TSTTB_ErrorType |
|---|
| 533 | TSTTG_gentityIteratorInit (TSTTG_Instance instance, |
|---|
| 534 | /*in*/ const int gentity_dimension, |
|---|
| 535 | /*out*/ TSTTG_GentityIterator *gentity_iterator); |
|---|
| 536 | |
|---|
| 537 | bool |
|---|
| 538 | TSTTG_gentityIteratorNext (TSTTG_Instance instance, |
|---|
| 539 | /*inout*/ TSTTG_GentityIterator *gentity_iterator, |
|---|
| 540 | /*out*/ TSTTG_GentityHandle *gentity_handle |
|---|
| 541 | ); |
|---|
| 542 | |
|---|
| 543 | enum TSTTB_ErrorType |
|---|
| 544 | TSTTG_gentityIteratorReset (TSTTG_Instance instance, |
|---|
| 545 | /*inout*/ TSTTG_GentityIterator *gentity_iterator |
|---|
| 546 | ); |
|---|
| 547 | |
|---|
| 548 | enum TSTTB_ErrorType |
|---|
| 549 | TSTTG_gentityIteratorDelete (TSTTG_Instance instance, |
|---|
| 550 | /*in*/ TSTTG_CGentityIterator Gentity_dim_iterator); |
|---|
| 551 | |
|---|
| 552 | int |
|---|
| 553 | TSTTG_gentityIsParametric (TSTTG_Instance instance, |
|---|
| 554 | /*in*/ TSTTG_CGentityHandle gentity_handle); |
|---|
| 555 | |
|---|
| 556 | enum TSTTB_ErrorType |
|---|
| 557 | TSTTG_gentityUvToXyz (TSTTG_Instance instance, |
|---|
| 558 | /*in*/ ARRAY_IN_DECL(TSTTG_CGentityHandle, gentity_handles), |
|---|
| 559 | /*in*/ CONST_ARRAY_IN_DECL(double, uv), |
|---|
| 560 | /*out*/ ARRAY_INOUT_DECL(double, coordinates)); |
|---|
| 561 | |
|---|
| 562 | enum TSTTB_ErrorType |
|---|
| 563 | TSTTG_gentityXyzToUv (TSTTG_Instance instance, |
|---|
| 564 | /*in*/ ARRAY_IN_DECL(TSTTG_CGentityHandle, gentity_handles), |
|---|
| 565 | /*in*/ CONST_ARRAY_IN_DECL(double, coordinates), |
|---|
| 566 | /*out*/ ARRAY_INOUT_DECL(double, uv)); |
|---|
| 567 | |
|---|
| 568 | enum TSTTB_ErrorType |
|---|
| 569 | TSTTG_gentityUvRange (TSTTG_Instance instance, |
|---|
| 570 | /*in*/ ARRAY_IN_DECL(TSTTG_CGentityHandle, gentity_handles), |
|---|
| 571 | /*out*/ ARRAY_INOUT_DECL(double, uv_min), |
|---|
| 572 | /*out*/ ARRAY_INOUT_DECL(double, uv_max)); |
|---|
| 573 | |
|---|
| 574 | enum TSTTB_ErrorType |
|---|
| 575 | TSTTG_Greparam_edge_face (TSTTG_Instance instance, |
|---|
| 576 | /*in*/ ARRAY_IN_DECL(TSTTG_GentityHandle, src_gentity_handles), |
|---|
| 577 | /*in*/ ARRAY_IN_DECL(double, src_uv), |
|---|
| 578 | /*in*/ ARRAY_IN_DECL(TSTTG_GentityHandle, trg_gentity_handles), |
|---|
| 579 | /*in*/ ARRAY_IN_DECL(double, trg_uv)); |
|---|
| 580 | |
|---|
| 581 | enum TSTTB_ErrorType |
|---|
| 582 | TSTTG_gentityNormalUv (TSTTG_Instance instance, |
|---|
| 583 | /*in*/ ARRAY_IN_DECL(TSTTG_CGentityHandle, gface_handles), |
|---|
| 584 | /*in*/ CONST_ARRAY_IN_DECL(double, parameters), |
|---|
| 585 | /*out*/ ARRAY_INOUT_DECL(double, normals)); |
|---|
| 586 | |
|---|
| 587 | enum TSTTB_ErrorType |
|---|
| 588 | TSTTG_gentityTangentU (TSTTG_Instance instance, |
|---|
| 589 | /*in*/ ARRAY_IN_DECL(TSTTG_CGentityHandle, gedge_handles), |
|---|
| 590 | /*in*/ CONST_ARRAY_IN_DECL(double, parameters), |
|---|
| 591 | /*out*/ ARRAY_INOUT_DECL(double, tangents)); |
|---|
| 592 | |
|---|
| 593 | enum TSTTB_ErrorType |
|---|
| 594 | TSTTG_setEntSetData (TSTTG_Instance instance, |
|---|
| 595 | /*in*/ TSTTG_GentitySetHandle entity_set, |
|---|
| 596 | /*in*/ const TSTTG_TagHandle tag_handle, |
|---|
| 597 | /*in*/ CONST_ARRAY_IN_DECL(char, tag_value)); |
|---|
| 598 | |
|---|
| 599 | enum TSTTB_ErrorType |
|---|
| 600 | TSTTG_setEntSetIntData (TSTTG_Instance instance, |
|---|
| 601 | /*in*/ TSTTG_GentitySetHandle entity_set, |
|---|
| 602 | /*in*/ const TSTTG_TagHandle tag_handle, |
|---|
| 603 | /*in*/ const int tag_value); |
|---|
| 604 | |
|---|
| 605 | enum TSTTB_ErrorType |
|---|
| 606 | TSTTG_setEntSetDblData (TSTTG_Instance instance, |
|---|
| 607 | /*in*/ TSTTG_GentitySetHandle entity_set, |
|---|
| 608 | /*in*/ const TSTTG_TagHandle tag_handle, |
|---|
| 609 | /*in*/ const double tag_value); |
|---|
| 610 | |
|---|
| 611 | enum TSTTB_ErrorType |
|---|
| 612 | TSTTG_setEntSetEHData (TSTTG_Instance instance, |
|---|
| 613 | /*in*/ TSTTG_GentitySetHandle entity_set, |
|---|
| 614 | /*in*/ const TSTTG_TagHandle tag_handle, |
|---|
| 615 | /*in*/ TSTTG_CGentityHandle tag_value); |
|---|
| 616 | |
|---|
| 617 | enum TSTTB_ErrorType |
|---|
| 618 | TSTTG_getEntSetData (TSTTG_Instance instance, |
|---|
| 619 | /*in*/ TSTTG_CGentitySetHandle entity_set, |
|---|
| 620 | /*in*/ const TSTTG_TagHandle tag_handle, |
|---|
| 621 | /*inout*/ ARRAY_INOUT_DECL(char, tag_value)); |
|---|
| 622 | |
|---|
| 623 | int |
|---|
| 624 | TSTTG_getEntSetIntData (TSTTG_Instance instance, |
|---|
| 625 | /*in*/ TSTTG_CGentitySetHandle entity_set, |
|---|
| 626 | /*in*/ const TSTTG_TagHandle tag_handle); |
|---|
| 627 | |
|---|
| 628 | double |
|---|
| 629 | TSTTG_getEntSetDblData (TSTTG_Instance instance, |
|---|
| 630 | /*in*/ TSTTG_CGentitySetHandle entity_set, |
|---|
| 631 | /*in*/ const TSTTG_TagHandle tag_handle); |
|---|
| 632 | |
|---|
| 633 | TSTTG_GentityHandle |
|---|
| 634 | TSTTG_getEntSetEHData (TSTTG_Instance instance, |
|---|
| 635 | /*in*/ TSTTG_CGentitySetHandle entity_set, |
|---|
| 636 | /*in*/ const TSTTG_TagHandle tag_handle); |
|---|
| 637 | |
|---|
| 638 | enum TSTTB_ErrorType |
|---|
| 639 | TSTTG_getAllEntSetTags (TSTTG_Instance instance, |
|---|
| 640 | /*in*/ TSTTG_CGentitySetHandle entity_set, |
|---|
| 641 | /*inout*/ ARRAY_INOUT_DECL(void*, tag_handles)); |
|---|
| 642 | |
|---|
| 643 | enum TSTTB_ErrorType |
|---|
| 644 | TSTTG_rmvEntSetTag (TSTTG_Instance instance, |
|---|
| 645 | /*in*/ TSTTG_GentitySetHandle entity_set, |
|---|
| 646 | /*in*/ const TSTTG_TagHandle tag_handle); |
|---|
| 647 | |
|---|
| 648 | |
|---|
| 649 | enum TSTTB_ErrorType |
|---|
| 650 | TSTTG_load_cub_geometry(const char *name); |
|---|
| 651 | |
|---|
| 652 | |
|---|
| 653 | #ifdef __cplusplus |
|---|
| 654 | } // extern "C" |
|---|
| 655 | #endif |
|---|
| 656 | |
|---|
| 657 | |
|---|
| 658 | #endif // #ifndef __CGM_GEOM_HPP__ |
|---|
| 659 | |
|---|
| 660 | |
|---|
| 661 | |
|---|
| 662 | |
|---|