QD3DGeometry.h
上传用户:xjjlds
上传日期:2015-12-05
资源大小:22823k
文件大小:91k
源码类别:

多媒体编程

开发平台:

Visual C++

  1. /*
  2.      File:       QD3DGeometry.h
  3.  
  4.      Contains:   Q3Geometry methods
  5.  
  6.      Version:    Technology: Quickdraw 3D 1.6
  7.                  Release:    QuickTime 6.0.2
  8.  
  9.      Copyright:  (c) 1995-2001 by Apple Computer, Inc., all rights reserved.
  10.  
  11.      Bugs?:      For bug reports, consult the following page on
  12.                  the World Wide Web:
  13.  
  14.                      http://developer.apple.com/bugreporter/
  15.  
  16. */
  17. #ifndef __QD3DGEOMETRY__
  18. #define __QD3DGEOMETRY__
  19. #ifndef __QD3D__
  20. #include "QD3D.h"
  21. #endif
  22. #ifndef __QD3DSET__
  23. #include "QD3DSet.h"
  24. #endif
  25. #if PRAGMA_ONCE
  26. #pragma once
  27. #endif
  28. #ifdef __cplusplus
  29. extern "C" {
  30. #endif
  31. #if PRAGMA_IMPORT
  32. #pragma import on
  33. #endif
  34. #if PRAGMA_STRUCT_ALIGN
  35.     #pragma options align=power
  36. #elif PRAGMA_STRUCT_PACKPUSH
  37.     #pragma pack(push, 2)
  38. #elif PRAGMA_STRUCT_PACK
  39.     #pragma pack(2)
  40. #endif
  41. #if PRAGMA_ENUM_ALWAYSINT
  42.     #if defined(__fourbyteints__) && !__fourbyteints__ 
  43.         #define __QD3DGEOMETRY__RESTORE_TWOBYTEINTS
  44.         #pragma fourbyteints on
  45.     #endif
  46.     #pragma enumsalwaysint on
  47. #elif PRAGMA_ENUM_OPTIONS
  48.     #pragma option enum=int
  49. #elif PRAGMA_ENUM_PACK
  50.     #if __option(pack_enums)
  51.         #define __QD3DGEOMETRY__RESTORE_PACKED_ENUMS
  52.         #pragma options(!pack_enums)
  53.     #endif
  54. #endif
  55. /******************************************************************************
  56.  **                                                                          **
  57.  **                             Geometry Routines                            **
  58.  **                                                                          **
  59.  *****************************************************************************/
  60. #if CALL_NOT_IN_CARBON
  61. EXTERN_API_C( TQ3ObjectType )
  62. Q3Geometry_GetType              (TQ3GeometryObject      geometry);
  63. EXTERN_API_C( TQ3Status )
  64. Q3Geometry_GetAttributeSet      (TQ3GeometryObject      geometry,
  65.                                  TQ3AttributeSet *      attributeSet);
  66. EXTERN_API_C( TQ3Status )
  67. Q3Geometry_SetAttributeSet      (TQ3GeometryObject      geometry,
  68.                                  TQ3AttributeSet        attributeSet);
  69. EXTERN_API_C( TQ3Status )
  70. Q3Geometry_Submit               (TQ3GeometryObject      geometry,
  71.                                  TQ3ViewObject          view);
  72. /******************************************************************************
  73.  **                                                                          **
  74.  **                         Box Data Structure Definitions                   **
  75.  **                                                                          **
  76.  *****************************************************************************/
  77. #endif  /* CALL_NOT_IN_CARBON */
  78. struct TQ3BoxData {
  79.     TQ3Point3D                      origin;
  80.     TQ3Vector3D                     orientation;
  81.     TQ3Vector3D                     majorAxis;
  82.     TQ3Vector3D                     minorAxis;
  83.     TQ3AttributeSet *               faceAttributeSet;           /* Ordering : Left, right,    */
  84.                                                                 /*           front, back,   */
  85.                                                                 /*           top, bottom    */
  86.     TQ3AttributeSet                 boxAttributeSet;
  87. };
  88. typedef struct TQ3BoxData               TQ3BoxData;
  89. /******************************************************************************
  90.  **                                                                          **
  91.  **                             Box Routines                                 **
  92.  **                                                                          **
  93.  *****************************************************************************/
  94. #if CALL_NOT_IN_CARBON
  95. EXTERN_API_C( TQ3GeometryObject )
  96. Q3Box_New                       (const TQ3BoxData *     boxData);
  97. EXTERN_API_C( TQ3Status )
  98. Q3Box_Submit                    (const TQ3BoxData *     boxData,
  99.                                  TQ3ViewObject          view);
  100. EXTERN_API_C( TQ3Status )
  101. Q3Box_SetData                   (TQ3GeometryObject      box,
  102.                                  const TQ3BoxData *     boxData);
  103. EXTERN_API_C( TQ3Status )
  104. Q3Box_GetData                   (TQ3GeometryObject      box,
  105.                                  TQ3BoxData *           boxData);
  106. EXTERN_API_C( TQ3Status )
  107. Q3Box_EmptyData                 (TQ3BoxData *           boxData);
  108. EXTERN_API_C( TQ3Status )
  109. Q3Box_SetOrigin                 (TQ3GeometryObject      box,
  110.                                  const TQ3Point3D *     origin);
  111. EXTERN_API_C( TQ3Status )
  112. Q3Box_SetOrientation            (TQ3GeometryObject      box,
  113.                                  const TQ3Vector3D *    orientation);
  114. EXTERN_API_C( TQ3Status )
  115. Q3Box_SetMajorAxis              (TQ3GeometryObject      box,
  116.                                  const TQ3Vector3D *    majorAxis);
  117. EXTERN_API_C( TQ3Status )
  118. Q3Box_SetMinorAxis              (TQ3GeometryObject      box,
  119.                                  const TQ3Vector3D *    minorAxis);
  120. EXTERN_API_C( TQ3Status )
  121. Q3Box_GetOrigin                 (TQ3GeometryObject      box,
  122.                                  TQ3Point3D *           origin);
  123. EXTERN_API_C( TQ3Status )
  124. Q3Box_GetOrientation            (TQ3GeometryObject      box,
  125.                                  TQ3Vector3D *          orientation);
  126. EXTERN_API_C( TQ3Status )
  127. Q3Box_GetMajorAxis              (TQ3GeometryObject      box,
  128.                                  TQ3Vector3D *          majorAxis);
  129. EXTERN_API_C( TQ3Status )
  130. Q3Box_GetMinorAxis              (TQ3GeometryObject      box,
  131.                                  TQ3Vector3D *          minorAxis);
  132. EXTERN_API_C( TQ3Status )
  133. Q3Box_GetFaceAttributeSet       (TQ3GeometryObject      box,
  134.                                  unsigned long          faceIndex,
  135.                                  TQ3AttributeSet *      faceAttributeSet);
  136. EXTERN_API_C( TQ3Status )
  137. Q3Box_SetFaceAttributeSet       (TQ3GeometryObject      box,
  138.                                  unsigned long          faceIndex,
  139.                                  TQ3AttributeSet        faceAttributeSet);
  140. /******************************************************************************
  141.  **                                                                          **
  142.  **                     Cone Data Structure Definitions                      **
  143.  **                                                                          **
  144.  *****************************************************************************/
  145. #endif  /* CALL_NOT_IN_CARBON */
  146. struct TQ3ConeData {
  147.     TQ3Point3D                      origin;
  148.     TQ3Vector3D                     orientation;
  149.     TQ3Vector3D                     majorRadius;
  150.     TQ3Vector3D                     minorRadius;
  151.     float                           uMin;
  152.     float                           uMax;
  153.     float                           vMin;
  154.     float                           vMax;
  155.     TQ3EndCap                       caps;
  156.     TQ3AttributeSet                 interiorAttributeSet;
  157.     TQ3AttributeSet                 faceAttributeSet;
  158.     TQ3AttributeSet                 bottomAttributeSet;
  159.     TQ3AttributeSet                 coneAttributeSet;
  160. };
  161. typedef struct TQ3ConeData              TQ3ConeData;
  162. /******************************************************************************
  163.  **                                                                          **
  164.  **                             Cone Routines                                **
  165.  **                                                                          **
  166.  *****************************************************************************/
  167. #if CALL_NOT_IN_CARBON
  168. EXTERN_API_C( TQ3GeometryObject )
  169. Q3Cone_New                      (const TQ3ConeData *    coneData);
  170. EXTERN_API_C( TQ3Status )
  171. Q3Cone_Submit                   (const TQ3ConeData *    coneData,
  172.                                  TQ3ViewObject          view);
  173. EXTERN_API_C( TQ3Status )
  174. Q3Cone_SetData                  (TQ3GeometryObject      cone,
  175.                                  const TQ3ConeData *    coneData);
  176. EXTERN_API_C( TQ3Status )
  177. Q3Cone_GetData                  (TQ3GeometryObject      cone,
  178.                                  TQ3ConeData *          coneData);
  179. EXTERN_API_C( TQ3Status )
  180. Q3Cone_SetOrigin                (TQ3GeometryObject      cone,
  181.                                  const TQ3Point3D *     origin);
  182. EXTERN_API_C( TQ3Status )
  183. Q3Cone_SetOrientation           (TQ3GeometryObject      cone,
  184.                                  const TQ3Vector3D *    orientation);
  185. EXTERN_API_C( TQ3Status )
  186. Q3Cone_SetMajorRadius           (TQ3GeometryObject      cone,
  187.                                  const TQ3Vector3D *    majorRadius);
  188. EXTERN_API_C( TQ3Status )
  189. Q3Cone_SetMinorRadius           (TQ3GeometryObject      cone,
  190.                                  const TQ3Vector3D *    minorRadius);
  191. EXTERN_API_C( TQ3Status )
  192. Q3Cone_GetOrigin                (TQ3GeometryObject      cone,
  193.                                  TQ3Point3D *           origin);
  194. EXTERN_API_C( TQ3Status )
  195. Q3Cone_GetOrientation           (TQ3GeometryObject      cone,
  196.                                  TQ3Vector3D *          orientation);
  197. EXTERN_API_C( TQ3Status )
  198. Q3Cone_GetMajorRadius           (TQ3GeometryObject      cone,
  199.                                  TQ3Vector3D *          majorRadius);
  200. EXTERN_API_C( TQ3Status )
  201. Q3Cone_GetMinorRadius           (TQ3GeometryObject      cone,
  202.                                  TQ3Vector3D *          minorRadius);
  203. EXTERN_API_C( TQ3Status )
  204. Q3Cone_SetCaps                  (TQ3GeometryObject      cone,
  205.                                  TQ3EndCap              caps);
  206. EXTERN_API_C( TQ3Status )
  207. Q3Cone_GetCaps                  (TQ3GeometryObject      cone,
  208.                                  TQ3EndCap *            caps);
  209. EXTERN_API_C( TQ3Status )
  210. Q3Cone_SetBottomAttributeSet    (TQ3GeometryObject      cone,
  211.                                  TQ3AttributeSet        bottomAttributeSet);
  212. EXTERN_API_C( TQ3Status )
  213. Q3Cone_GetBottomAttributeSet    (TQ3GeometryObject      cone,
  214.                                  TQ3AttributeSet *      bottomAttributeSet);
  215. EXTERN_API_C( TQ3Status )
  216. Q3Cone_SetFaceAttributeSet      (TQ3GeometryObject      cone,
  217.                                  TQ3AttributeSet        faceAttributeSet);
  218. EXTERN_API_C( TQ3Status )
  219. Q3Cone_GetFaceAttributeSet      (TQ3GeometryObject      cone,
  220.                                  TQ3AttributeSet *      faceAttributeSet);
  221. EXTERN_API_C( TQ3Status )
  222. Q3Cone_EmptyData                (TQ3ConeData *          coneData);
  223. /******************************************************************************
  224.  **                                                                          **
  225.  **                     Cylinder Data Structure Definitions                  **
  226.  **                                                                          **
  227.  *****************************************************************************/
  228. #endif  /* CALL_NOT_IN_CARBON */
  229. struct TQ3CylinderData {
  230.     TQ3Point3D                      origin;
  231.     TQ3Vector3D                     orientation;
  232.     TQ3Vector3D                     majorRadius;
  233.     TQ3Vector3D                     minorRadius;
  234.     float                           uMin;
  235.     float                           uMax;
  236.     float                           vMin;
  237.     float                           vMax;
  238.     TQ3EndCap                       caps;
  239.     TQ3AttributeSet                 interiorAttributeSet;
  240.     TQ3AttributeSet                 topAttributeSet;
  241.     TQ3AttributeSet                 faceAttributeSet;
  242.     TQ3AttributeSet                 bottomAttributeSet;
  243.     TQ3AttributeSet                 cylinderAttributeSet;
  244. };
  245. typedef struct TQ3CylinderData          TQ3CylinderData;
  246. /******************************************************************************
  247.  **                                                                          **
  248.  **                         Cylinder Routines                                **
  249.  **                                                                          **
  250.  *****************************************************************************/
  251. #if CALL_NOT_IN_CARBON
  252. EXTERN_API_C( TQ3GeometryObject )
  253. Q3Cylinder_New                  (const TQ3CylinderData * cylinderData);
  254. EXTERN_API_C( TQ3Status )
  255. Q3Cylinder_Submit               (const TQ3CylinderData * cylinderData,
  256.                                  TQ3ViewObject          view);
  257. EXTERN_API_C( TQ3Status )
  258. Q3Cylinder_SetData              (TQ3GeometryObject      cylinder,
  259.                                  const TQ3CylinderData * cylinderData);
  260. EXTERN_API_C( TQ3Status )
  261. Q3Cylinder_GetData              (TQ3GeometryObject      cylinder,
  262.                                  TQ3CylinderData *      cylinderData);
  263. EXTERN_API_C( TQ3Status )
  264. Q3Cylinder_SetOrigin            (TQ3GeometryObject      cylinder,
  265.                                  const TQ3Point3D *     origin);
  266. EXTERN_API_C( TQ3Status )
  267. Q3Cylinder_SetOrientation       (TQ3GeometryObject      cylinder,
  268.                                  const TQ3Vector3D *    orientation);
  269. EXTERN_API_C( TQ3Status )
  270. Q3Cylinder_SetMajorRadius       (TQ3GeometryObject      cylinder,
  271.                                  const TQ3Vector3D *    majorRadius);
  272. EXTERN_API_C( TQ3Status )
  273. Q3Cylinder_SetMinorRadius       (TQ3GeometryObject      cylinder,
  274.                                  const TQ3Vector3D *    minorRadius);
  275. EXTERN_API_C( TQ3Status )
  276. Q3Cylinder_GetOrigin            (TQ3GeometryObject      cylinder,
  277.                                  TQ3Point3D *           origin);
  278. EXTERN_API_C( TQ3Status )
  279. Q3Cylinder_GetOrientation       (TQ3GeometryObject      cylinder,
  280.                                  TQ3Vector3D *          orientation);
  281. EXTERN_API_C( TQ3Status )
  282. Q3Cylinder_GetMajorRadius       (TQ3GeometryObject      cylinder,
  283.                                  TQ3Vector3D *          majorRadius);
  284. EXTERN_API_C( TQ3Status )
  285. Q3Cylinder_GetMinorRadius       (TQ3GeometryObject      cylinder,
  286.                                  TQ3Vector3D *          minorRadius);
  287. EXTERN_API_C( TQ3Status )
  288. Q3Cylinder_SetCaps              (TQ3GeometryObject      cylinder,
  289.                                  TQ3EndCap              caps);
  290. EXTERN_API_C( TQ3Status )
  291. Q3Cylinder_GetCaps              (TQ3GeometryObject      cylinder,
  292.                                  TQ3EndCap *            caps);
  293. EXTERN_API_C( TQ3Status )
  294. Q3Cylinder_SetTopAttributeSet   (TQ3GeometryObject      cylinder,
  295.                                  TQ3AttributeSet        topAttributeSet);
  296. EXTERN_API_C( TQ3Status )
  297. Q3Cylinder_GetTopAttributeSet   (TQ3GeometryObject      cylinder,
  298.                                  TQ3AttributeSet *      topAttributeSet);
  299. EXTERN_API_C( TQ3Status )
  300. Q3Cylinder_SetBottomAttributeSet (TQ3GeometryObject     cylinder,
  301.                                  TQ3AttributeSet        bottomAttributeSet);
  302. EXTERN_API_C( TQ3Status )
  303. Q3Cylinder_GetBottomAttributeSet (TQ3GeometryObject     cylinder,
  304.                                  TQ3AttributeSet *      bottomAttributeSet);
  305. EXTERN_API_C( TQ3Status )
  306. Q3Cylinder_SetFaceAttributeSet  (TQ3GeometryObject      cylinder,
  307.                                  TQ3AttributeSet        faceAttributeSet);
  308. EXTERN_API_C( TQ3Status )
  309. Q3Cylinder_GetFaceAttributeSet  (TQ3GeometryObject      cylinder,
  310.                                  TQ3AttributeSet *      faceAttributeSet);
  311. EXTERN_API_C( TQ3Status )
  312. Q3Cylinder_EmptyData            (TQ3CylinderData *      cylinderData);
  313. /******************************************************************************
  314.  **                                                                          **
  315.  **                     Disk Data Structure Definitions                      **
  316.  **                                                                          **
  317.  *****************************************************************************/
  318. #endif  /* CALL_NOT_IN_CARBON */
  319. struct TQ3DiskData {
  320.     TQ3Point3D                      origin;
  321.     TQ3Vector3D                     majorRadius;
  322.     TQ3Vector3D                     minorRadius;
  323.     float                           uMin;
  324.     float                           uMax;
  325.     float                           vMin;
  326.     float                           vMax;
  327.     TQ3AttributeSet                 diskAttributeSet;
  328. };
  329. typedef struct TQ3DiskData              TQ3DiskData;
  330. /******************************************************************************
  331.  **                                                                          **
  332.  **                             Disk Routines                                **
  333.  **                                                                          **
  334.  *****************************************************************************/
  335. #if CALL_NOT_IN_CARBON
  336. EXTERN_API_C( TQ3GeometryObject )
  337. Q3Disk_New                      (const TQ3DiskData *    diskData);
  338. EXTERN_API_C( TQ3Status )
  339. Q3Disk_Submit                   (const TQ3DiskData *    diskData,
  340.                                  TQ3ViewObject          view);
  341. EXTERN_API_C( TQ3Status )
  342. Q3Disk_SetData                  (TQ3GeometryObject      disk,
  343.                                  const TQ3DiskData *    diskData);
  344. EXTERN_API_C( TQ3Status )
  345. Q3Disk_GetData                  (TQ3GeometryObject      disk,
  346.                                  TQ3DiskData *          diskData);
  347. EXTERN_API_C( TQ3Status )
  348. Q3Disk_SetOrigin                (TQ3GeometryObject      disk,
  349.                                  const TQ3Point3D *     origin);
  350. EXTERN_API_C( TQ3Status )
  351. Q3Disk_SetMajorRadius           (TQ3GeometryObject      disk,
  352.                                  const TQ3Vector3D *    majorRadius);
  353. EXTERN_API_C( TQ3Status )
  354. Q3Disk_SetMinorRadius           (TQ3GeometryObject      disk,
  355.                                  const TQ3Vector3D *    minorRadius);
  356. EXTERN_API_C( TQ3Status )
  357. Q3Disk_GetOrigin                (TQ3GeometryObject      disk,
  358.                                  TQ3Point3D *           origin);
  359. EXTERN_API_C( TQ3Status )
  360. Q3Disk_GetMajorRadius           (TQ3GeometryObject      disk,
  361.                                  TQ3Vector3D *          majorRadius);
  362. EXTERN_API_C( TQ3Status )
  363. Q3Disk_GetMinorRadius           (TQ3GeometryObject      disk,
  364.                                  TQ3Vector3D *          minorRadius);
  365. EXTERN_API_C( TQ3Status )
  366. Q3Disk_EmptyData                (TQ3DiskData *          diskData);
  367. /******************************************************************************
  368.  **                                                                          **
  369.  **                  Ellipse Data Structure Definitions                      **
  370.  **                                                                          **
  371.  *****************************************************************************/
  372. #endif  /* CALL_NOT_IN_CARBON */
  373. struct TQ3EllipseData {
  374.     TQ3Point3D                      origin;
  375.     TQ3Vector3D                     majorRadius;
  376.     TQ3Vector3D                     minorRadius;
  377.     float                           uMin;
  378.     float                           uMax;
  379.     TQ3AttributeSet                 ellipseAttributeSet;
  380. };
  381. typedef struct TQ3EllipseData           TQ3EllipseData;
  382. /******************************************************************************
  383.  **                                                                          **
  384.  **                             Ellipse Routines                             **
  385.  **                                                                          **
  386.  *****************************************************************************/
  387. #if CALL_NOT_IN_CARBON
  388. EXTERN_API_C( TQ3GeometryObject )
  389. Q3Ellipse_New                   (const TQ3EllipseData * ellipseData);
  390. EXTERN_API_C( TQ3Status )
  391. Q3Ellipse_Submit                (const TQ3EllipseData * ellipseData,
  392.                                  TQ3ViewObject          view);
  393. EXTERN_API_C( TQ3Status )
  394. Q3Ellipse_SetData               (TQ3GeometryObject      ellipse,
  395.                                  const TQ3EllipseData * ellipseData);
  396. EXTERN_API_C( TQ3Status )
  397. Q3Ellipse_GetData               (TQ3GeometryObject      ellipse,
  398.                                  TQ3EllipseData *       ellipseData);
  399. EXTERN_API_C( TQ3Status )
  400. Q3Ellipse_SetOrigin             (TQ3GeometryObject      ellipse,
  401.                                  const TQ3Point3D *     origin);
  402. EXTERN_API_C( TQ3Status )
  403. Q3Ellipse_SetMajorRadius        (TQ3GeometryObject      ellipse,
  404.                                  const TQ3Vector3D *    majorRadius);
  405. EXTERN_API_C( TQ3Status )
  406. Q3Ellipse_SetMinorRadius        (TQ3GeometryObject      ellipse,
  407.                                  const TQ3Vector3D *    minorRadius);
  408. EXTERN_API_C( TQ3Status )
  409. Q3Ellipse_GetOrigin             (TQ3GeometryObject      ellipse,
  410.                                  TQ3Point3D *           origin);
  411. EXTERN_API_C( TQ3Status )
  412. Q3Ellipse_GetMajorRadius        (TQ3GeometryObject      ellipse,
  413.                                  TQ3Vector3D *          majorRadius);
  414. EXTERN_API_C( TQ3Status )
  415. Q3Ellipse_GetMinorRadius        (TQ3GeometryObject      ellipse,
  416.                                  TQ3Vector3D *          minorRadius);
  417. EXTERN_API_C( TQ3Status )
  418. Q3Ellipse_EmptyData             (TQ3EllipseData *       ellipseData);
  419. /******************************************************************************
  420.  **                                                                          **
  421.  **                         Ellipsoid Data structures                        **
  422.  **                                                                          **
  423.  *****************************************************************************/
  424. #endif  /* CALL_NOT_IN_CARBON */
  425. struct TQ3EllipsoidData {
  426.     TQ3Point3D                      origin;
  427.     TQ3Vector3D                     orientation;
  428.     TQ3Vector3D                     majorRadius;
  429.     TQ3Vector3D                     minorRadius;
  430.     float                           uMin;
  431.     float                           uMax;
  432.     float                           vMin;
  433.     float                           vMax;
  434.     TQ3EndCap                       caps;
  435.     TQ3AttributeSet                 interiorAttributeSet;
  436.     TQ3AttributeSet                 ellipsoidAttributeSet;
  437. };
  438. typedef struct TQ3EllipsoidData         TQ3EllipsoidData;
  439. /******************************************************************************
  440.  **                                                                          **
  441.  **                         Ellipsoid Routines                               **
  442.  **                                                                          **
  443.  *****************************************************************************/
  444. #if CALL_NOT_IN_CARBON
  445. EXTERN_API_C( TQ3GeometryObject )
  446. Q3Ellipsoid_New                 (const TQ3EllipsoidData * ellipsoidData);
  447. EXTERN_API_C( TQ3Status )
  448. Q3Ellipsoid_Submit              (const TQ3EllipsoidData * ellipsoidData,
  449.                                  TQ3ViewObject          view);
  450. EXTERN_API_C( TQ3Status )
  451. Q3Ellipsoid_SetData             (TQ3GeometryObject      ellipsoid,
  452.                                  const TQ3EllipsoidData * ellipsoidData);
  453. EXTERN_API_C( TQ3Status )
  454. Q3Ellipsoid_GetData             (TQ3GeometryObject      ellipsoid,
  455.                                  TQ3EllipsoidData *     ellipsoidData);
  456. EXTERN_API_C( TQ3Status )
  457. Q3Ellipsoid_SetOrigin           (TQ3GeometryObject      ellipsoid,
  458.                                  const TQ3Point3D *     origin);
  459. EXTERN_API_C( TQ3Status )
  460. Q3Ellipsoid_SetOrientation      (TQ3GeometryObject      ellipsoid,
  461.                                  const TQ3Vector3D *    orientation);
  462. EXTERN_API_C( TQ3Status )
  463. Q3Ellipsoid_SetMajorRadius      (TQ3GeometryObject      ellipsoid,
  464.                                  const TQ3Vector3D *    majorRadius);
  465. EXTERN_API_C( TQ3Status )
  466. Q3Ellipsoid_SetMinorRadius      (TQ3GeometryObject      ellipsoid,
  467.                                  const TQ3Vector3D *    minorRadius);
  468. EXTERN_API_C( TQ3Status )
  469. Q3Ellipsoid_GetOrigin           (TQ3GeometryObject      ellipsoid,
  470.                                  TQ3Point3D *           origin);
  471. EXTERN_API_C( TQ3Status )
  472. Q3Ellipsoid_GetOrientation      (TQ3GeometryObject      ellipsoid,
  473.                                  TQ3Vector3D *          orientation);
  474. EXTERN_API_C( TQ3Status )
  475. Q3Ellipsoid_GetMajorRadius      (TQ3GeometryObject      ellipsoid,
  476.                                  TQ3Vector3D *          majorRadius);
  477. EXTERN_API_C( TQ3Status )
  478. Q3Ellipsoid_GetMinorRadius      (TQ3GeometryObject      ellipsoid,
  479.                                  TQ3Vector3D *          minorRadius);
  480. EXTERN_API_C( TQ3Status )
  481. Q3Ellipsoid_EmptyData           (TQ3EllipsoidData *     ellipsoidData);
  482. /******************************************************************************
  483.  **                                                                          **
  484.  **                 General Polygon Data Structure Definitions               **
  485.  **                                                                          **
  486.  *****************************************************************************/
  487. #endif  /* CALL_NOT_IN_CARBON */
  488. enum TQ3GeneralPolygonShapeHint {
  489.     kQ3GeneralPolygonShapeHintComplex = 0,
  490.     kQ3GeneralPolygonShapeHintConcave = 1,
  491.     kQ3GeneralPolygonShapeHintConvex = 2
  492. };
  493. typedef enum TQ3GeneralPolygonShapeHint TQ3GeneralPolygonShapeHint;
  494. struct TQ3GeneralPolygonContourData {
  495.     unsigned long                   numVertices;
  496.     TQ3Vertex3D *                   vertices;
  497. };
  498. typedef struct TQ3GeneralPolygonContourData TQ3GeneralPolygonContourData;
  499. struct TQ3GeneralPolygonData {
  500.     unsigned long                   numContours;
  501.     TQ3GeneralPolygonContourData *  contours;
  502.     TQ3GeneralPolygonShapeHint      shapeHint;
  503.     TQ3AttributeSet                 generalPolygonAttributeSet;
  504. };
  505. typedef struct TQ3GeneralPolygonData    TQ3GeneralPolygonData;
  506. /******************************************************************************
  507.  **                                                                          **
  508.  **                         General polygon Routines                         **
  509.  **                                                                          **
  510.  *****************************************************************************/
  511. #if CALL_NOT_IN_CARBON
  512. EXTERN_API_C( TQ3GeometryObject )
  513. Q3GeneralPolygon_New            (const TQ3GeneralPolygonData * generalPolygonData);
  514. EXTERN_API_C( TQ3Status )
  515. Q3GeneralPolygon_Submit         (const TQ3GeneralPolygonData * generalPolygonData,
  516.                                  TQ3ViewObject          view);
  517. EXTERN_API_C( TQ3Status )
  518. Q3GeneralPolygon_SetData        (TQ3GeometryObject      generalPolygon,
  519.                                  const TQ3GeneralPolygonData * generalPolygonData);
  520. EXTERN_API_C( TQ3Status )
  521. Q3GeneralPolygon_GetData        (TQ3GeometryObject      polygon,
  522.                                  TQ3GeneralPolygonData * generalPolygonData);
  523. EXTERN_API_C( TQ3Status )
  524. Q3GeneralPolygon_EmptyData      (TQ3GeneralPolygonData * generalPolygonData);
  525. EXTERN_API_C( TQ3Status )
  526. Q3GeneralPolygon_GetVertexPosition (TQ3GeometryObject   generalPolygon,
  527.                                  unsigned long          contourIndex,
  528.                                  unsigned long          pointIndex,
  529.                                  TQ3Point3D *           position);
  530. EXTERN_API_C( TQ3Status )
  531. Q3GeneralPolygon_SetVertexPosition (TQ3GeometryObject   generalPolygon,
  532.                                  unsigned long          contourIndex,
  533.                                  unsigned long          pointIndex,
  534.                                  const TQ3Point3D *     position);
  535. EXTERN_API_C( TQ3Status )
  536. Q3GeneralPolygon_GetVertexAttributeSet (TQ3GeometryObject  generalPolygon,
  537.                                  unsigned long          contourIndex,
  538.                                  unsigned long          pointIndex,
  539.                                  TQ3AttributeSet *      attributeSet);
  540. EXTERN_API_C( TQ3Status )
  541. Q3GeneralPolygon_SetVertexAttributeSet (TQ3GeometryObject  generalPolygon,
  542.                                  unsigned long          contourIndex,
  543.                                  unsigned long          pointIndex,
  544.                                  TQ3AttributeSet        attributeSet);
  545. EXTERN_API_C( TQ3Status )
  546. Q3GeneralPolygon_SetShapeHint   (TQ3GeometryObject      generalPolygon,
  547.                                  TQ3GeneralPolygonShapeHint  shapeHint);
  548. EXTERN_API_C( TQ3Status )
  549. Q3GeneralPolygon_GetShapeHint   (TQ3GeometryObject      generalPolygon,
  550.                                  TQ3GeneralPolygonShapeHint * shapeHint);
  551. /******************************************************************************
  552.  **                                                                          **
  553.  **                     Line Data Structure Definitions                      **
  554.  **                                                                          **
  555.  *****************************************************************************/
  556. #endif  /* CALL_NOT_IN_CARBON */
  557. struct TQ3LineData {
  558.     TQ3Vertex3D                     vertices[2];
  559.     TQ3AttributeSet                 lineAttributeSet;
  560. };
  561. typedef struct TQ3LineData              TQ3LineData;
  562. /******************************************************************************
  563.  **                                                                          **
  564.  **                         Line Routines                                    **
  565.  **                                                                          **
  566.  *****************************************************************************/
  567. #if CALL_NOT_IN_CARBON
  568. EXTERN_API_C( TQ3GeometryObject )
  569. Q3Line_New                      (const TQ3LineData *    lineData);
  570. EXTERN_API_C( TQ3Status )
  571. Q3Line_Submit                   (const TQ3LineData *    lineData,
  572.                                  TQ3ViewObject          view);
  573. EXTERN_API_C( TQ3Status )
  574. Q3Line_GetData                  (TQ3GeometryObject      line,
  575.                                  TQ3LineData *          lineData);
  576. EXTERN_API_C( TQ3Status )
  577. Q3Line_SetData                  (TQ3GeometryObject      line,
  578.                                  const TQ3LineData *    lineData);
  579. EXTERN_API_C( TQ3Status )
  580. Q3Line_GetVertexPosition        (TQ3GeometryObject      line,
  581.                                  unsigned long          index,
  582.                                  TQ3Point3D *           position);
  583. EXTERN_API_C( TQ3Status )
  584. Q3Line_SetVertexPosition        (TQ3GeometryObject      line,
  585.                                  unsigned long          index,
  586.                                  const TQ3Point3D *     position);
  587. EXTERN_API_C( TQ3Status )
  588. Q3Line_GetVertexAttributeSet    (TQ3GeometryObject      line,
  589.                                  unsigned long          index,
  590.                                  TQ3AttributeSet *      attributeSet);
  591. EXTERN_API_C( TQ3Status )
  592. Q3Line_SetVertexAttributeSet    (TQ3GeometryObject      line,
  593.                                  unsigned long          index,
  594.                                  TQ3AttributeSet        attributeSet);
  595. EXTERN_API_C( TQ3Status )
  596. Q3Line_EmptyData                (TQ3LineData *          lineData);
  597. /******************************************************************************
  598.  **                                                                          **
  599.  **                     Marker Data Structure Definitions                    **
  600.  **                                                                          **
  601.  *****************************************************************************/
  602. #endif  /* CALL_NOT_IN_CARBON */
  603. struct TQ3MarkerData {
  604.     TQ3Point3D                      location;
  605.     long                            xOffset;
  606.     long                            yOffset;
  607.     TQ3Bitmap                       bitmap;
  608.     TQ3AttributeSet                 markerAttributeSet;
  609. };
  610. typedef struct TQ3MarkerData            TQ3MarkerData;
  611. /******************************************************************************
  612.  **                                                                          **
  613.  **                             Marker Routines                              **
  614.  **                                                                          **
  615.  *****************************************************************************/
  616. #if CALL_NOT_IN_CARBON
  617. EXTERN_API_C( TQ3GeometryObject )
  618. Q3Marker_New                    (const TQ3MarkerData *  markerData);
  619. EXTERN_API_C( TQ3Status )
  620. Q3Marker_Submit                 (const TQ3MarkerData *  markerData,
  621.                                  TQ3ViewObject          view);
  622. EXTERN_API_C( TQ3Status )
  623. Q3Marker_SetData                (TQ3GeometryObject      geometry,
  624.                                  const TQ3MarkerData *  markerData);
  625. EXTERN_API_C( TQ3Status )
  626. Q3Marker_GetData                (TQ3GeometryObject      geometry,
  627.                                  TQ3MarkerData *        markerData);
  628. EXTERN_API_C( TQ3Status )
  629. Q3Marker_EmptyData              (TQ3MarkerData *        markerData);
  630. EXTERN_API_C( TQ3Status )
  631. Q3Marker_GetPosition            (TQ3GeometryObject      marker,
  632.                                  TQ3Point3D *           location);
  633. EXTERN_API_C( TQ3Status )
  634. Q3Marker_SetPosition            (TQ3GeometryObject      marker,
  635.                                  const TQ3Point3D *     location);
  636. EXTERN_API_C( TQ3Status )
  637. Q3Marker_GetXOffset             (TQ3GeometryObject      marker,
  638.                                  long *                 xOffset);
  639. EXTERN_API_C( TQ3Status )
  640. Q3Marker_SetXOffset             (TQ3GeometryObject      marker,
  641.                                  long                   xOffset);
  642. EXTERN_API_C( TQ3Status )
  643. Q3Marker_GetYOffset             (TQ3GeometryObject      marker,
  644.                                  long *                 yOffset);
  645. EXTERN_API_C( TQ3Status )
  646. Q3Marker_SetYOffset             (TQ3GeometryObject      marker,
  647.                                  long                   yOffset);
  648. EXTERN_API_C( TQ3Status )
  649. Q3Marker_GetBitmap              (TQ3GeometryObject      marker,
  650.                                  TQ3Bitmap *            bitmap);
  651. EXTERN_API_C( TQ3Status )
  652. Q3Marker_SetBitmap              (TQ3GeometryObject      marker,
  653.                                  const TQ3Bitmap *      bitmap);
  654. /******************************************************************************
  655.  **                                                                          **
  656.  **                     Mesh Data Structure Definitions                      **
  657.  **                                                                          **
  658.  *****************************************************************************/
  659. #endif  /* CALL_NOT_IN_CARBON */
  660. typedef struct OpaqueTQ3MeshComponent*  TQ3MeshComponent;
  661. typedef struct OpaqueTQ3MeshVertex*     TQ3MeshVertex;
  662. typedef struct OpaqueTQ3MeshFace*       TQ3MeshFace;
  663. typedef struct OpaqueTQ3MeshEdge*       TQ3MeshEdge;
  664. typedef struct OpaqueTQ3MeshContour*    TQ3MeshContour;
  665. /******************************************************************************
  666.  **                                                                          **
  667.  **                         Mesh Routines                                    **
  668.  **                                                                          **
  669.  *****************************************************************************/
  670. /*
  671.  *  Constructors
  672.  */
  673. #if CALL_NOT_IN_CARBON
  674. EXTERN_API_C( TQ3GeometryObject )
  675. Q3Mesh_New                      (void);
  676. EXTERN_API_C( TQ3MeshVertex )
  677. Q3Mesh_VertexNew                (TQ3GeometryObject      mesh,
  678.                                  const TQ3Vertex3D *    vertex);
  679. EXTERN_API_C( TQ3MeshFace )
  680. Q3Mesh_FaceNew                  (TQ3GeometryObject      mesh,
  681.                                  unsigned long          numVertices,
  682.                                  const TQ3MeshVertex *  vertices,
  683.                                  TQ3AttributeSet        attributeSet);
  684. /*
  685.  *  Destructors
  686.  */
  687. EXTERN_API_C( TQ3Status )
  688. Q3Mesh_VertexDelete             (TQ3GeometryObject      mesh,
  689.                                  TQ3MeshVertex          vertex);
  690. EXTERN_API_C( TQ3Status )
  691. Q3Mesh_FaceDelete               (TQ3GeometryObject      mesh,
  692.                                  TQ3MeshFace            face);
  693. /*
  694.  * Methods
  695.  */
  696. EXTERN_API_C( TQ3Status )
  697. Q3Mesh_DelayUpdates             (TQ3GeometryObject      mesh);
  698. EXTERN_API_C( TQ3Status )
  699. Q3Mesh_ResumeUpdates            (TQ3GeometryObject      mesh);
  700. EXTERN_API_C( TQ3MeshContour )
  701. Q3Mesh_FaceToContour            (TQ3GeometryObject      mesh,
  702.                                  TQ3MeshFace            containerFace,
  703.                                  TQ3MeshFace            face);
  704. EXTERN_API_C( TQ3MeshFace )
  705. Q3Mesh_ContourToFace            (TQ3GeometryObject      mesh,
  706.                                  TQ3MeshContour         contour);
  707. /*
  708.  * Mesh
  709.  */
  710. EXTERN_API_C( TQ3Status )
  711. Q3Mesh_GetNumComponents         (TQ3GeometryObject      mesh,
  712.                                  unsigned long *        numComponents);
  713. EXTERN_API_C( TQ3Status )
  714. Q3Mesh_GetNumEdges              (TQ3GeometryObject      mesh,
  715.                                  unsigned long *        numEdges);
  716. EXTERN_API_C( TQ3Status )
  717. Q3Mesh_GetNumVertices           (TQ3GeometryObject      mesh,
  718.                                  unsigned long *        numVertices);
  719. EXTERN_API_C( TQ3Status )
  720. Q3Mesh_GetNumFaces              (TQ3GeometryObject      mesh,
  721.                                  unsigned long *        numFaces);
  722. EXTERN_API_C( TQ3Status )
  723. Q3Mesh_GetNumCorners            (TQ3GeometryObject      mesh,
  724.                                  unsigned long *        numCorners);
  725. EXTERN_API_C( TQ3Status )
  726. Q3Mesh_GetOrientable            (TQ3GeometryObject      mesh,
  727.                                  TQ3Boolean *           orientable);
  728. /*
  729.  * Component
  730.  */
  731. EXTERN_API_C( TQ3Status )
  732. Q3Mesh_GetComponentNumVertices  (TQ3GeometryObject      mesh,
  733.                                  TQ3MeshComponent       component,
  734.                                  unsigned long *        numVertices);
  735. EXTERN_API_C( TQ3Status )
  736. Q3Mesh_GetComponentNumEdges     (TQ3GeometryObject      mesh,
  737.                                  TQ3MeshComponent       component,
  738.                                  unsigned long *        numEdges);
  739. EXTERN_API_C( TQ3Status )
  740. Q3Mesh_GetComponentBoundingBox  (TQ3GeometryObject      mesh,
  741.                                  TQ3MeshComponent       component,
  742.                                  TQ3BoundingBox *       boundingBox);
  743. EXTERN_API_C( TQ3Status )
  744. Q3Mesh_GetComponentOrientable   (TQ3GeometryObject      mesh,
  745.                                  TQ3MeshComponent       component,
  746.                                  TQ3Boolean *           orientable);
  747. /*
  748.  * Vertex
  749.  */
  750. EXTERN_API_C( TQ3Status )
  751. Q3Mesh_GetVertexCoordinates     (TQ3GeometryObject      mesh,
  752.                                  TQ3MeshVertex          vertex,
  753.                                  TQ3Point3D *           coordinates);
  754. EXTERN_API_C( TQ3Status )
  755. Q3Mesh_GetVertexIndex           (TQ3GeometryObject      mesh,
  756.                                  TQ3MeshVertex          vertex,
  757.                                  unsigned long *        index);
  758. EXTERN_API_C( TQ3Status )
  759. Q3Mesh_GetVertexOnBoundary      (TQ3GeometryObject      mesh,
  760.                                  TQ3MeshVertex          vertex,
  761.                                  TQ3Boolean *           onBoundary);
  762. EXTERN_API_C( TQ3Status )
  763. Q3Mesh_GetVertexComponent       (TQ3GeometryObject      mesh,
  764.                                  TQ3MeshVertex          vertex,
  765.                                  TQ3MeshComponent *     component);
  766. EXTERN_API_C( TQ3Status )
  767. Q3Mesh_GetVertexAttributeSet    (TQ3GeometryObject      mesh,
  768.                                  TQ3MeshVertex          vertex,
  769.                                  TQ3AttributeSet *      attributeSet);
  770. EXTERN_API_C( TQ3Status )
  771. Q3Mesh_SetVertexCoordinates     (TQ3GeometryObject      mesh,
  772.                                  TQ3MeshVertex          vertex,
  773.                                  const TQ3Point3D *     coordinates);
  774. EXTERN_API_C( TQ3Status )
  775. Q3Mesh_SetVertexAttributeSet    (TQ3GeometryObject      mesh,
  776.                                  TQ3MeshVertex          vertex,
  777.                                  TQ3AttributeSet        attributeSet);
  778. /*
  779.  * Face
  780.  */
  781. EXTERN_API_C( TQ3Status )
  782. Q3Mesh_GetFaceNumVertices       (TQ3GeometryObject      mesh,
  783.                                  TQ3MeshFace            face,
  784.                                  unsigned long *        numVertices);
  785. EXTERN_API_C( TQ3Status )
  786. Q3Mesh_GetFacePlaneEquation     (TQ3GeometryObject      mesh,
  787.                                  TQ3MeshFace            face,
  788.                                  TQ3PlaneEquation *     planeEquation);
  789. EXTERN_API_C( TQ3Status )
  790. Q3Mesh_GetFaceNumContours       (TQ3GeometryObject      mesh,
  791.                                  TQ3MeshFace            face,
  792.                                  unsigned long *        numContours);
  793. EXTERN_API_C( TQ3Status )
  794. Q3Mesh_GetFaceIndex             (TQ3GeometryObject      mesh,
  795.                                  TQ3MeshFace            face,
  796.                                  unsigned long *        index);
  797. EXTERN_API_C( TQ3Status )
  798. Q3Mesh_GetFaceComponent         (TQ3GeometryObject      mesh,
  799.                                  TQ3MeshFace            face,
  800.                                  TQ3MeshComponent *     component);
  801. EXTERN_API_C( TQ3Status )
  802. Q3Mesh_GetFaceAttributeSet      (TQ3GeometryObject      mesh,
  803.                                  TQ3MeshFace            face,
  804.                                  TQ3AttributeSet *      attributeSet);
  805. EXTERN_API_C( TQ3Status )
  806. Q3Mesh_SetFaceAttributeSet      (TQ3GeometryObject      mesh,
  807.                                  TQ3MeshFace            face,
  808.                                  TQ3AttributeSet        attributeSet);
  809. /*
  810.  * Edge
  811.  */
  812. EXTERN_API_C( TQ3Status )
  813. Q3Mesh_GetEdgeVertices          (TQ3GeometryObject      mesh,
  814.                                  TQ3MeshEdge            edge,
  815.                                  TQ3MeshVertex *        vertex1,
  816.                                  TQ3MeshVertex *        vertex2);
  817. EXTERN_API_C( TQ3Status )
  818. Q3Mesh_GetEdgeFaces             (TQ3GeometryObject      mesh,
  819.                                  TQ3MeshEdge            edge,
  820.                                  TQ3MeshFace *          face1,
  821.                                  TQ3MeshFace *          face2);
  822. EXTERN_API_C( TQ3Status )
  823. Q3Mesh_GetEdgeOnBoundary        (TQ3GeometryObject      mesh,
  824.                                  TQ3MeshEdge            edge,
  825.                                  TQ3Boolean *           onBoundary);
  826. EXTERN_API_C( TQ3Status )
  827. Q3Mesh_GetEdgeComponent         (TQ3GeometryObject      mesh,
  828.                                  TQ3MeshEdge            edge,
  829.                                  TQ3MeshComponent *     component);
  830. EXTERN_API_C( TQ3Status )
  831. Q3Mesh_GetEdgeAttributeSet      (TQ3GeometryObject      mesh,
  832.                                  TQ3MeshEdge            edge,
  833.                                  TQ3AttributeSet *      attributeSet);
  834. EXTERN_API_C( TQ3Status )
  835. Q3Mesh_SetEdgeAttributeSet      (TQ3GeometryObject      mesh,
  836.                                  TQ3MeshEdge            edge,
  837.                                  TQ3AttributeSet        attributeSet);
  838. /*
  839.  * Contour
  840.  */
  841. EXTERN_API_C( TQ3Status )
  842. Q3Mesh_GetContourFace           (TQ3GeometryObject      mesh,
  843.                                  TQ3MeshContour         contour,
  844.                                  TQ3MeshFace *          face);
  845. EXTERN_API_C( TQ3Status )
  846. Q3Mesh_GetContourNumVertices    (TQ3GeometryObject      mesh,
  847.                                  TQ3MeshContour         contour,
  848.                                  unsigned long *        numVertices);
  849. /*
  850.  * Corner
  851.  */
  852. EXTERN_API_C( TQ3Status )
  853. Q3Mesh_GetCornerAttributeSet    (TQ3GeometryObject      mesh,
  854.                                  TQ3MeshVertex          vertex,
  855.                                  TQ3MeshFace            face,
  856.                                  TQ3AttributeSet *      attributeSet);
  857. EXTERN_API_C( TQ3Status )
  858. Q3Mesh_SetCornerAttributeSet    (TQ3GeometryObject      mesh,
  859.                                  TQ3MeshVertex          vertex,
  860.                                  TQ3MeshFace            face,
  861.                                  TQ3AttributeSet        attributeSet);
  862. /*
  863.  * Public Mesh Iterators
  864.  */
  865. #endif  /* CALL_NOT_IN_CARBON */
  866. struct TQ3MeshIterator {
  867.     void *                          var1;
  868.     void *                          var2;
  869.     void *                          var3;
  870.     struct {
  871.         void *                          field1;
  872.         char                            field2[4];
  873.     }                                 var4;
  874. };
  875. typedef struct TQ3MeshIterator          TQ3MeshIterator;
  876. #if CALL_NOT_IN_CARBON
  877. EXTERN_API_C( TQ3MeshComponent )
  878. Q3Mesh_FirstMeshComponent       (TQ3GeometryObject      mesh,
  879.                                  TQ3MeshIterator *      iterator);
  880. EXTERN_API_C( TQ3MeshComponent )
  881. Q3Mesh_NextMeshComponent        (TQ3MeshIterator *      iterator);
  882. EXTERN_API_C( TQ3MeshVertex )
  883. Q3Mesh_FirstComponentVertex     (TQ3MeshComponent       component,
  884.                                  TQ3MeshIterator *      iterator);
  885. EXTERN_API_C( TQ3MeshVertex )
  886. Q3Mesh_NextComponentVertex      (TQ3MeshIterator *      iterator);
  887. EXTERN_API_C( TQ3MeshEdge )
  888. Q3Mesh_FirstComponentEdge       (TQ3MeshComponent       component,
  889.                                  TQ3MeshIterator *      iterator);
  890. EXTERN_API_C( TQ3MeshEdge )
  891. Q3Mesh_NextComponentEdge        (TQ3MeshIterator *      iterator);
  892. EXTERN_API_C( TQ3MeshVertex )
  893. Q3Mesh_FirstMeshVertex          (TQ3GeometryObject      mesh,
  894.                                  TQ3MeshIterator *      iterator);
  895. EXTERN_API_C( TQ3MeshVertex )
  896. Q3Mesh_NextMeshVertex           (TQ3MeshIterator *      iterator);
  897. EXTERN_API_C( TQ3MeshFace )
  898. Q3Mesh_FirstMeshFace            (TQ3GeometryObject      mesh,
  899.                                  TQ3MeshIterator *      iterator);
  900. EXTERN_API_C( TQ3MeshFace )
  901. Q3Mesh_NextMeshFace             (TQ3MeshIterator *      iterator);
  902. EXTERN_API_C( TQ3MeshEdge )
  903. Q3Mesh_FirstMeshEdge            (TQ3GeometryObject      mesh,
  904.                                  TQ3MeshIterator *      iterator);
  905. EXTERN_API_C( TQ3MeshEdge )
  906. Q3Mesh_NextMeshEdge             (TQ3MeshIterator *      iterator);
  907. EXTERN_API_C( TQ3MeshEdge )
  908. Q3Mesh_FirstVertexEdge          (TQ3MeshVertex          vertex,
  909.                                  TQ3MeshIterator *      iterator);
  910. EXTERN_API_C( TQ3MeshEdge )
  911. Q3Mesh_NextVertexEdge           (TQ3MeshIterator *      iterator);
  912. EXTERN_API_C( TQ3MeshVertex )
  913. Q3Mesh_FirstVertexVertex        (TQ3MeshVertex          vertex,
  914.                                  TQ3MeshIterator *      iterator);
  915. EXTERN_API_C( TQ3MeshVertex )
  916. Q3Mesh_NextVertexVertex         (TQ3MeshIterator *      iterator);
  917. EXTERN_API_C( TQ3MeshFace )
  918. Q3Mesh_FirstVertexFace          (TQ3MeshVertex          vertex,
  919.                                  TQ3MeshIterator *      iterator);
  920. EXTERN_API_C( TQ3MeshFace )
  921. Q3Mesh_NextVertexFace           (TQ3MeshIterator *      iterator);
  922. EXTERN_API_C( TQ3MeshEdge )
  923. Q3Mesh_FirstFaceEdge            (TQ3MeshFace            face,
  924.                                  TQ3MeshIterator *      iterator);
  925. EXTERN_API_C( TQ3MeshEdge )
  926. Q3Mesh_NextFaceEdge             (TQ3MeshIterator *      iterator);
  927. EXTERN_API_C( TQ3MeshVertex )
  928. Q3Mesh_FirstFaceVertex          (TQ3MeshFace            face,
  929.                                  TQ3MeshIterator *      iterator);
  930. EXTERN_API_C( TQ3MeshVertex )
  931. Q3Mesh_NextFaceVertex           (TQ3MeshIterator *      iterator);
  932. EXTERN_API_C( TQ3MeshFace )
  933. Q3Mesh_FirstFaceFace            (TQ3MeshFace            face,
  934.                                  TQ3MeshIterator *      iterator);
  935. EXTERN_API_C( TQ3MeshFace )
  936. Q3Mesh_NextFaceFace             (TQ3MeshIterator *      iterator);
  937. EXTERN_API_C( TQ3MeshContour )
  938. Q3Mesh_FirstFaceContour         (TQ3MeshFace            face,
  939.                                  TQ3MeshIterator *      iterator);
  940. EXTERN_API_C( TQ3MeshContour )
  941. Q3Mesh_NextFaceContour          (TQ3MeshIterator *      iterator);
  942. EXTERN_API_C( TQ3MeshEdge )
  943. Q3Mesh_FirstContourEdge         (TQ3MeshContour         contour,
  944.                                  TQ3MeshIterator *      iterator);
  945. EXTERN_API_C( TQ3MeshEdge )
  946. Q3Mesh_NextContourEdge          (TQ3MeshIterator *      iterator);
  947. EXTERN_API_C( TQ3MeshVertex )
  948. Q3Mesh_FirstContourVertex       (TQ3MeshContour         contour,
  949.                                  TQ3MeshIterator *      iterator);
  950. EXTERN_API_C( TQ3MeshVertex )
  951. Q3Mesh_NextContourVertex        (TQ3MeshIterator *      iterator);
  952. EXTERN_API_C( TQ3MeshFace )
  953. Q3Mesh_FirstContourFace         (TQ3MeshContour         contour,
  954.                                  TQ3MeshIterator *      iterator);
  955. EXTERN_API_C( TQ3MeshFace )
  956. Q3Mesh_NextContourFace          (TQ3MeshIterator *      iterator);
  957. #define    Q3ForEachMeshComponent(m,c,i)                                       
  958.   for ( (c) = Q3Mesh_FirstMeshComponent((m),(i));                         
  959.         (c);                                                              
  960.         (c) = Q3Mesh_NextMeshComponent((i)) )
  961. #define Q3ForEachComponentVertex(c,v,i)                                        
  962.   for ( (v) = Q3Mesh_FirstComponentVertex((c),(i));                       
  963.         (v);                                                              
  964.         (v) = Q3Mesh_NextComponentVertex((i)) )
  965.         
  966. #define Q3ForEachComponentEdge(c,e,i)                                        
  967.   for ( (e) = Q3Mesh_FirstComponentEdge((c),(i));                         
  968.         (e);                                                              
  969.         (e) = Q3Mesh_NextComponentEdge((i)) )
  970. #define Q3ForEachMeshVertex(m,v,i)                                         
  971.   for ( (v) = Q3Mesh_FirstMeshVertex((m),(i));                            
  972.         (v);                                                              
  973.         (v) = Q3Mesh_NextMeshVertex((i)) )
  974. #define Q3ForEachMeshFace(m,f,i)                                          
  975.   for ( (f) = Q3Mesh_FirstMeshFace((m),(i));                              
  976.         (f);                                                              
  977.         (f) = Q3Mesh_NextMeshFace((i)) )
  978. #define Q3ForEachMeshEdge(m,e,i)                                            
  979.   for ( (e) = Q3Mesh_FirstMeshEdge((m),(i));                              
  980.         (e);                                                              
  981.         (e) = Q3Mesh_NextMeshEdge((i)) )
  982. #define Q3ForEachVertexEdge(v,e,i)                                          
  983.   for ( (e) = Q3Mesh_FirstVertexEdge((v),(i));                            
  984.         (e);                                                              
  985.         (e) = Q3Mesh_NextVertexEdge((i)) )
  986. #define Q3ForEachVertexVertex(v,n,i)                                       
  987.   for ( (n) = Q3Mesh_FirstVertexVertex((v),(i));                          
  988.         (n);                                                              
  989.         (n) = Q3Mesh_NextVertexVertex((i)) )
  990. #define Q3ForEachVertexFace(v,f,i)                                          
  991.   for ( (f) = Q3Mesh_FirstVertexFace((v),(i));                            
  992.         (f);                                                              
  993.         (f) = Q3Mesh_NextVertexFace((i)) )
  994. #define Q3ForEachFaceEdge(f,e,i)                                          
  995.   for ( (e) = Q3Mesh_FirstFaceEdge((f),(i));                              
  996.         (e);                                                              
  997.         (e) = Q3Mesh_NextFaceEdge((i)) )
  998. #define Q3ForEachFaceVertex(f,v,i)                                          
  999.   for ( (v) = Q3Mesh_FirstFaceVertex((f),(i));                            
  1000.         (v);                                                              
  1001.         (v) = Q3Mesh_NextFaceVertex((i)) )
  1002.    
  1003. #define Q3ForEachFaceFace(f,n,i)                                           
  1004.   for ( (n) = Q3Mesh_FirstFaceFace((f),(i));                              
  1005.         (n);                                                              
  1006.         (n) = Q3Mesh_NextFaceFace((i)) )
  1007.        
  1008. #define Q3ForEachFaceContour(f,h,i)                                          
  1009.   for ( (h) = Q3Mesh_FirstFaceContour((f),(i));                           
  1010.         (h);                                                              
  1011.         (h) = Q3Mesh_NextFaceContour((i)) )
  1012. #define Q3ForEachContourEdge(h,e,i)                                          
  1013.   for ( (e) = Q3Mesh_FirstContourEdge((h),(i));                           
  1014.         (e);                                                              
  1015.         (e) = Q3Mesh_NextContourEdge((i)) )
  1016. #define Q3ForEachContourVertex(h,v,i)                                        
  1017.   for ( (v) = Q3Mesh_FirstContourVertex((h),(i));                         
  1018.         (v);                                                              
  1019.         (v) = Q3Mesh_NextContourVertex((i)) )
  1020. #define Q3ForEachContourFace(h,f,i)                                            
  1021.   for ( (f) = Q3Mesh_FirstContourFace((h),(i));                           
  1022.         (f);                                                              
  1023.         (f) = Q3Mesh_NextContourFace((i)) )
  1024. /******************************************************************************
  1025.  **                                                                          **
  1026.  **                         Maximum order for NURB Curves                    **
  1027.  **                                                                          **
  1028.  *****************************************************************************/
  1029. #define kQ3NURBCurveMaxOrder    16
  1030. /******************************************************************************
  1031.  **                                                                          **
  1032.  **                     NURB Data Structure Definitions                      **
  1033.  **                                                                          **
  1034.  *****************************************************************************/
  1035. #endif  /* CALL_NOT_IN_CARBON */
  1036. struct TQ3NURBCurveData {
  1037.     unsigned long                   order;
  1038.     unsigned long                   numPoints;
  1039.     TQ3RationalPoint4D *            controlPoints;
  1040.     float *                         knots;
  1041.     TQ3AttributeSet                 curveAttributeSet;
  1042. };
  1043. typedef struct TQ3NURBCurveData         TQ3NURBCurveData;
  1044. /******************************************************************************
  1045.  **                                                                          **
  1046.  **                             NURB Curve Routines                          **
  1047.  **                                                                          **
  1048.  *****************************************************************************/
  1049. #if CALL_NOT_IN_CARBON
  1050. EXTERN_API_C( TQ3GeometryObject )
  1051. Q3NURBCurve_New                 (const TQ3NURBCurveData * curveData);
  1052. EXTERN_API_C( TQ3Status )
  1053. Q3NURBCurve_Submit              (const TQ3NURBCurveData * curveData,
  1054.                                  TQ3ViewObject          view);
  1055. EXTERN_API_C( TQ3Status )
  1056. Q3NURBCurve_SetData             (TQ3GeometryObject      curve,
  1057.                                  const TQ3NURBCurveData * nurbCurveData);
  1058. EXTERN_API_C( TQ3Status )
  1059. Q3NURBCurve_GetData             (TQ3GeometryObject      curve,
  1060.                                  TQ3NURBCurveData *     nurbCurveData);
  1061. EXTERN_API_C( TQ3Status )
  1062. Q3NURBCurve_EmptyData           (TQ3NURBCurveData *     nurbCurveData);
  1063. EXTERN_API_C( TQ3Status )
  1064. Q3NURBCurve_SetControlPoint     (TQ3GeometryObject      curve,
  1065.                                  unsigned long          pointIndex,
  1066.                                  const TQ3RationalPoint4D * point4D);
  1067. EXTERN_API_C( TQ3Status )
  1068. Q3NURBCurve_GetControlPoint     (TQ3GeometryObject      curve,
  1069.                                  unsigned long          pointIndex,
  1070.                                  TQ3RationalPoint4D *   point4D);
  1071. EXTERN_API_C( TQ3Status )
  1072. Q3NURBCurve_SetKnot             (TQ3GeometryObject      curve,
  1073.                                  unsigned long          knotIndex,
  1074.                                  float                  knotValue);
  1075. EXTERN_API_C( TQ3Status )
  1076. Q3NURBCurve_GetKnot             (TQ3GeometryObject      curve,
  1077.                                  unsigned long          knotIndex,
  1078.                                  float *                knotValue);
  1079. /******************************************************************************
  1080.  **                                                                          **
  1081.  **                         Maximum NURB Patch Order                         **
  1082.  **                                                                          **
  1083.  *****************************************************************************/
  1084. #define kQ3NURBPatchMaxOrder    11
  1085. /******************************************************************************
  1086.  **                                                                          **
  1087.  **                     NURB Patch Data Structure Definitions                **
  1088.  **                                                                          **
  1089.  *****************************************************************************/
  1090. #endif  /* CALL_NOT_IN_CARBON */
  1091. struct TQ3NURBPatchTrimCurveData {
  1092.     unsigned long                   order;
  1093.     unsigned long                   numPoints;
  1094.     TQ3RationalPoint3D *            controlPoints;
  1095.     float *                         knots;
  1096. };
  1097. typedef struct TQ3NURBPatchTrimCurveData TQ3NURBPatchTrimCurveData;
  1098. struct TQ3NURBPatchTrimLoopData {
  1099.     unsigned long                   numTrimCurves;
  1100.     TQ3NURBPatchTrimCurveData *     trimCurves;
  1101. };
  1102. typedef struct TQ3NURBPatchTrimLoopData TQ3NURBPatchTrimLoopData;
  1103. struct TQ3NURBPatchData {
  1104.     unsigned long                   uOrder;
  1105.     unsigned long                   vOrder;
  1106.     unsigned long                   numRows;
  1107.     unsigned long                   numColumns;
  1108.     TQ3RationalPoint4D *            controlPoints;
  1109.     float *                         uKnots;
  1110.     float *                         vKnots;
  1111.     unsigned long                   numTrimLoops;
  1112.     TQ3NURBPatchTrimLoopData *      trimLoops;
  1113.     TQ3AttributeSet                 patchAttributeSet;
  1114. };
  1115. typedef struct TQ3NURBPatchData         TQ3NURBPatchData;
  1116. /******************************************************************************
  1117.  **                                                                          **
  1118.  **                             NURB Patch Routines                          **
  1119.  **                                                                          **
  1120.  *****************************************************************************/
  1121. #if CALL_NOT_IN_CARBON
  1122. EXTERN_API_C( TQ3GeometryObject )
  1123. Q3NURBPatch_New                 (const TQ3NURBPatchData * nurbPatchData);
  1124. EXTERN_API_C( TQ3Status )
  1125. Q3NURBPatch_Submit              (const TQ3NURBPatchData * nurbPatchData,
  1126.                                  TQ3ViewObject          view);
  1127. EXTERN_API_C( TQ3Status )
  1128. Q3NURBPatch_SetData             (TQ3GeometryObject      nurbPatch,
  1129.                                  const TQ3NURBPatchData * nurbPatchData);
  1130. EXTERN_API_C( TQ3Status )
  1131. Q3NURBPatch_GetData             (TQ3GeometryObject      nurbPatch,
  1132.                                  TQ3NURBPatchData *     nurbPatchData);
  1133. EXTERN_API_C( TQ3Status )
  1134. Q3NURBPatch_SetControlPoint     (TQ3GeometryObject      nurbPatch,
  1135.                                  unsigned long          rowIndex,
  1136.                                  unsigned long          columnIndex,
  1137.                                  const TQ3RationalPoint4D * point4D);
  1138. EXTERN_API_C( TQ3Status )
  1139. Q3NURBPatch_GetControlPoint     (TQ3GeometryObject      nurbPatch,
  1140.                                  unsigned long          rowIndex,
  1141.                                  unsigned long          columnIndex,
  1142.                                  TQ3RationalPoint4D *   point4D);
  1143. EXTERN_API_C( TQ3Status )
  1144. Q3NURBPatch_SetUKnot            (TQ3GeometryObject      nurbPatch,
  1145.                                  unsigned long          knotIndex,
  1146.                                  float                  knotValue);
  1147. EXTERN_API_C( TQ3Status )
  1148. Q3NURBPatch_SetVKnot            (TQ3GeometryObject      nurbPatch,
  1149.                                  unsigned long          knotIndex,
  1150.                                  float                  knotValue);
  1151. EXTERN_API_C( TQ3Status )
  1152. Q3NURBPatch_GetUKnot            (TQ3GeometryObject      nurbPatch,
  1153.                                  unsigned long          knotIndex,
  1154.                                  float *                knotValue);
  1155. EXTERN_API_C( TQ3Status )
  1156. Q3NURBPatch_GetVKnot            (TQ3GeometryObject      nurbPatch,
  1157.                                  unsigned long          knotIndex,
  1158.                                  float *                knotValue);
  1159. EXTERN_API_C( TQ3Status )
  1160. Q3NURBPatch_EmptyData           (TQ3NURBPatchData *     nurbPatchData);
  1161. /******************************************************************************
  1162.  **                                                                          **
  1163.  **                     Pixmap Marker Data Structure Definitions             **
  1164.  **                                                                          **
  1165.  *****************************************************************************/
  1166. #endif  /* CALL_NOT_IN_CARBON */
  1167. struct TQ3PixmapMarkerData {
  1168.     TQ3Point3D                      position;
  1169.     long                            xOffset;
  1170.     long                            yOffset;
  1171.     TQ3StoragePixmap                pixmap;
  1172.     TQ3AttributeSet                 pixmapMarkerAttributeSet;
  1173. };
  1174. typedef struct TQ3PixmapMarkerData      TQ3PixmapMarkerData;
  1175. /******************************************************************************
  1176.  **                                                                          **
  1177.  **                             Pixmap Marker Routines                       **
  1178.  **                                                                          **
  1179.  *****************************************************************************/
  1180. #if CALL_NOT_IN_CARBON
  1181. EXTERN_API_C( TQ3GeometryObject )
  1182. Q3PixmapMarker_New              (const TQ3PixmapMarkerData * pixmapMarkerData);
  1183. EXTERN_API_C( TQ3Status )
  1184. Q3PixmapMarker_Submit           (const TQ3PixmapMarkerData * pixmapMarkerData,
  1185.                                  TQ3ViewObject          view);
  1186. EXTERN_API_C( TQ3Status )
  1187. Q3PixmapMarker_SetData          (TQ3GeometryObject      geometry,
  1188.                                  const TQ3PixmapMarkerData * pixmapMarkerData);
  1189. EXTERN_API_C( TQ3Status )
  1190. Q3PixmapMarker_GetData          (TQ3GeometryObject      geometry,
  1191.                                  TQ3PixmapMarkerData *  pixmapMarkerData);
  1192. EXTERN_API_C( TQ3Status )
  1193. Q3PixmapMarker_EmptyData        (TQ3PixmapMarkerData *  pixmapMarkerData);
  1194. EXTERN_API_C( TQ3Status )
  1195. Q3PixmapMarker_GetPosition      (TQ3GeometryObject      pixmapMarker,
  1196.                                  TQ3Point3D *           position);
  1197. EXTERN_API_C( TQ3Status )
  1198. Q3PixmapMarker_SetPosition      (TQ3GeometryObject      pixmapMarker,
  1199.                                  const TQ3Point3D *     position);
  1200. EXTERN_API_C( TQ3Status )
  1201. Q3PixmapMarker_GetXOffset       (TQ3GeometryObject      pixmapMarker,
  1202.                                  long *                 xOffset);
  1203. EXTERN_API_C( TQ3Status )
  1204. Q3PixmapMarker_SetXOffset       (TQ3GeometryObject      pixmapMarker,
  1205.                                  long                   xOffset);
  1206. EXTERN_API_C( TQ3Status )
  1207. Q3PixmapMarker_GetYOffset       (TQ3GeometryObject      pixmapMarker,
  1208.                                  long *                 yOffset);
  1209. EXTERN_API_C( TQ3Status )
  1210. Q3PixmapMarker_SetYOffset       (TQ3GeometryObject      pixmapMarker,
  1211.                                  long                   yOffset);
  1212. EXTERN_API_C( TQ3Status )
  1213. Q3PixmapMarker_GetPixmap        (TQ3GeometryObject      pixmapMarker,
  1214.                                  TQ3StoragePixmap *     pixmap);
  1215. EXTERN_API_C( TQ3Status )
  1216. Q3PixmapMarker_SetPixmap        (TQ3GeometryObject      pixmapMarker,
  1217.                                  const TQ3StoragePixmap * pixmap);
  1218. /******************************************************************************
  1219.  **                                                                          **
  1220.  **                     Point Data Structure Definitions                     **
  1221.  **                                                                          **
  1222.  *****************************************************************************/
  1223. #endif  /* CALL_NOT_IN_CARBON */
  1224. struct TQ3PointData {
  1225.     TQ3Point3D                      point;
  1226.     TQ3AttributeSet                 pointAttributeSet;
  1227. };
  1228. typedef struct TQ3PointData             TQ3PointData;
  1229. /******************************************************************************
  1230.  **                                                                          **
  1231.  **                             Point Routines                               **
  1232.  **                                                                          **
  1233.  *****************************************************************************/
  1234. #if CALL_NOT_IN_CARBON
  1235. EXTERN_API_C( TQ3GeometryObject )
  1236. Q3Point_New                     (const TQ3PointData *   pointData);
  1237. EXTERN_API_C( TQ3Status )
  1238. Q3Point_Submit                  (const TQ3PointData *   pointData,
  1239.                                  TQ3ViewObject          view);
  1240. EXTERN_API_C( TQ3Status )
  1241. Q3Point_GetData                 (TQ3GeometryObject      point,
  1242.                                  TQ3PointData *         pointData);
  1243. EXTERN_API_C( TQ3Status )
  1244. Q3Point_SetData                 (TQ3GeometryObject      point,
  1245.                                  const TQ3PointData *   pointData);
  1246. EXTERN_API_C( TQ3Status )
  1247. Q3Point_EmptyData               (TQ3PointData *         pointData);
  1248. EXTERN_API_C( TQ3Status )
  1249. Q3Point_SetPosition             (TQ3GeometryObject      point,
  1250.                                  const TQ3Point3D *     position);
  1251. EXTERN_API_C( TQ3Status )
  1252. Q3Point_GetPosition             (TQ3GeometryObject      point,
  1253.                                  TQ3Point3D *           position);
  1254. /******************************************************************************
  1255.  **                                                                          **
  1256.  **                     Polygon Data Structure Definitions                   **
  1257.  **                                                                          **
  1258.  *****************************************************************************/
  1259. #endif  /* CALL_NOT_IN_CARBON */
  1260. struct TQ3PolygonData {
  1261.     unsigned long                   numVertices;
  1262.     TQ3Vertex3D *                   vertices;
  1263.     TQ3AttributeSet                 polygonAttributeSet;
  1264. };
  1265. typedef struct TQ3PolygonData           TQ3PolygonData;
  1266. /******************************************************************************
  1267.  **                                                                          **
  1268.  **                         Polygon Routines                                 **
  1269.  **                                                                          **
  1270.  *****************************************************************************/
  1271. #if CALL_NOT_IN_CARBON
  1272. EXTERN_API_C( TQ3GeometryObject )
  1273. Q3Polygon_New                   (const TQ3PolygonData * polygonData);
  1274. EXTERN_API_C( TQ3Status )
  1275. Q3Polygon_Submit                (const TQ3PolygonData * polygonData,
  1276.                                  TQ3ViewObject          view);
  1277. EXTERN_API_C( TQ3Status )
  1278. Q3Polygon_SetData               (TQ3GeometryObject      polygon,
  1279.                                  const TQ3PolygonData * polygonData);
  1280. EXTERN_API_C( TQ3Status )
  1281. Q3Polygon_GetData               (TQ3GeometryObject      polygon,
  1282.                                  TQ3PolygonData *       polygonData);
  1283. EXTERN_API_C( TQ3Status )
  1284. Q3Polygon_EmptyData             (TQ3PolygonData *       polygonData);
  1285. EXTERN_API_C( TQ3Status )
  1286. Q3Polygon_GetVertexPosition     (TQ3GeometryObject      polygon,
  1287.                                  unsigned long          index,
  1288.                                  TQ3Point3D *           point);
  1289. EXTERN_API_C( TQ3Status )
  1290. Q3Polygon_SetVertexPosition     (TQ3GeometryObject      polygon,
  1291.                                  unsigned long          index,
  1292.                                  const TQ3Point3D *     point);
  1293. EXTERN_API_C( TQ3Status )
  1294. Q3Polygon_GetVertexAttributeSet (TQ3GeometryObject      polygon,
  1295.                                  unsigned long          index,
  1296.                                  TQ3AttributeSet *      attributeSet);
  1297. EXTERN_API_C( TQ3Status )
  1298. Q3Polygon_SetVertexAttributeSet (TQ3GeometryObject      polygon,
  1299.                                  unsigned long          index,
  1300.                                  TQ3AttributeSet        attributeSet);
  1301. /******************************************************************************
  1302.  **                                                                          **
  1303.  **                     Polyhedron Data Structure Definitions                **
  1304.  **                                                                          **
  1305.  *****************************************************************************/
  1306. #endif  /* CALL_NOT_IN_CARBON */
  1307. enum TQ3PolyhedronEdgeMasks {
  1308.     kQ3PolyhedronEdgeNone       = 0,
  1309.     kQ3PolyhedronEdge01         = 1 << 0,
  1310.     kQ3PolyhedronEdge12         = 1 << 1,
  1311.     kQ3PolyhedronEdge20         = 1 << 2,
  1312.     kQ3PolyhedronEdgeAll        = kQ3PolyhedronEdge01 | kQ3PolyhedronEdge12 | kQ3PolyhedronEdge20
  1313. };
  1314. typedef enum TQ3PolyhedronEdgeMasks TQ3PolyhedronEdgeMasks;
  1315. typedef unsigned long                   TQ3PolyhedronEdge;
  1316. struct TQ3PolyhedronEdgeData {
  1317.     unsigned long                   vertexIndices[2];
  1318.     unsigned long                   triangleIndices[2];
  1319.     TQ3AttributeSet                 edgeAttributeSet;
  1320. };
  1321. typedef struct TQ3PolyhedronEdgeData    TQ3PolyhedronEdgeData;
  1322. struct TQ3PolyhedronTriangleData {
  1323.     unsigned long                   vertexIndices[3];
  1324.     TQ3PolyhedronEdge               edgeFlag;
  1325.     TQ3AttributeSet                 triangleAttributeSet;
  1326. };
  1327. typedef struct TQ3PolyhedronTriangleData TQ3PolyhedronTriangleData;
  1328. struct TQ3PolyhedronData {
  1329.     unsigned long                   numVertices;
  1330.     TQ3Vertex3D *                   vertices;
  1331.     unsigned long                   numEdges;
  1332.     TQ3PolyhedronEdgeData *         edges;
  1333.     unsigned long                   numTriangles;
  1334.     TQ3PolyhedronTriangleData *     triangles;
  1335.     TQ3AttributeSet                 polyhedronAttributeSet;
  1336. };
  1337. typedef struct TQ3PolyhedronData        TQ3PolyhedronData;
  1338. /******************************************************************************
  1339.  **                                                                          **
  1340.  **                             Polyhedron Routines                          **
  1341.  **                                                                          **
  1342.  *****************************************************************************/
  1343. #if CALL_NOT_IN_CARBON
  1344. EXTERN_API_C( TQ3GeometryObject )
  1345. Q3Polyhedron_New                (const TQ3PolyhedronData * polyhedronData);
  1346. EXTERN_API_C( TQ3Status )
  1347. Q3Polyhedron_Submit             (const TQ3PolyhedronData * polyhedronData,
  1348.                                  TQ3ViewObject          view);
  1349. EXTERN_API_C( TQ3Status )
  1350. Q3Polyhedron_SetData            (TQ3GeometryObject      polyhedron,
  1351.                                  const TQ3PolyhedronData * polyhedronData);
  1352. EXTERN_API_C( TQ3Status )
  1353. Q3Polyhedron_GetData            (TQ3GeometryObject      polyhedron,
  1354.                                  TQ3PolyhedronData *    polyhedronData);
  1355. EXTERN_API_C( TQ3Status )
  1356. Q3Polyhedron_EmptyData          (TQ3PolyhedronData *    polyhedronData);
  1357. EXTERN_API_C( TQ3Status )
  1358. Q3Polyhedron_SetVertexPosition  (TQ3GeometryObject      polyhedron,
  1359.                                  unsigned long          index,
  1360.                                  const TQ3Point3D *     point);
  1361. EXTERN_API_C( TQ3Status )
  1362. Q3Polyhedron_GetVertexPosition  (TQ3GeometryObject      polyhedron,
  1363.                                  unsigned long          index,
  1364.                                  TQ3Point3D *           point);
  1365. EXTERN_API_C( TQ3Status )
  1366. Q3Polyhedron_SetVertexAttributeSet (TQ3GeometryObject   polyhedron,
  1367.                                  unsigned long          index,
  1368.                                  TQ3AttributeSet        attributeSet);
  1369. EXTERN_API_C( TQ3Status )
  1370. Q3Polyhedron_GetVertexAttributeSet (TQ3GeometryObject   polyhedron,
  1371.                                  unsigned long          index,
  1372.                                  TQ3AttributeSet *      attributeSet);
  1373. EXTERN_API_C( TQ3Status )
  1374. Q3Polyhedron_GetTriangleData    (TQ3GeometryObject      polyhedron,
  1375.                                  unsigned long          triangleIndex,
  1376.                                  TQ3PolyhedronTriangleData * triangleData);
  1377. EXTERN_API_C( TQ3Status )
  1378. Q3Polyhedron_SetTriangleData    (TQ3GeometryObject      polyhedron,
  1379.                                  unsigned long          triangleIndex,
  1380.                                  const TQ3PolyhedronTriangleData * triangleData);
  1381. EXTERN_API_C( TQ3Status )
  1382. Q3Polyhedron_GetEdgeData        (TQ3GeometryObject      polyhedron,
  1383.                                  unsigned long          edgeIndex,
  1384.                                  TQ3PolyhedronEdgeData * edgeData);
  1385. EXTERN_API_C( TQ3Status )
  1386. Q3Polyhedron_SetEdgeData        (TQ3GeometryObject      polyhedron,
  1387.                                  unsigned long          edgeIndex,
  1388.                                  const TQ3PolyhedronEdgeData * edgeData);
  1389. /******************************************************************************
  1390.  **                                                                          **
  1391.  **                     PolyLine Data Structure Definitions                  **
  1392.  **                                                                          **
  1393.  *****************************************************************************/
  1394. #endif  /* CALL_NOT_IN_CARBON */
  1395. struct TQ3PolyLineData {
  1396.     unsigned long                   numVertices;
  1397.     TQ3Vertex3D *                   vertices;
  1398.     TQ3AttributeSet *               segmentAttributeSet;
  1399.     TQ3AttributeSet                 polyLineAttributeSet;
  1400. };
  1401. typedef struct TQ3PolyLineData          TQ3PolyLineData;
  1402. /******************************************************************************
  1403.  **                                                                          **
  1404.  **                         PolyLine Routines                                **
  1405.  **                                                                          **
  1406.  *****************************************************************************/
  1407. #if CALL_NOT_IN_CARBON
  1408. EXTERN_API_C( TQ3GeometryObject )
  1409. Q3PolyLine_New                  (const TQ3PolyLineData * polylineData);
  1410. EXTERN_API_C( TQ3Status )
  1411. Q3PolyLine_Submit               (const TQ3PolyLineData * polyLineData,
  1412.                                  TQ3ViewObject          view);
  1413. EXTERN_API_C( TQ3Status )
  1414. Q3PolyLine_SetData              (TQ3GeometryObject      polyLine,
  1415.                                  const TQ3PolyLineData * polyLineData);
  1416. EXTERN_API_C( TQ3Status )
  1417. Q3PolyLine_GetData              (TQ3GeometryObject      polyLine,
  1418.                                  TQ3PolyLineData *      polyLineData);
  1419. EXTERN_API_C( TQ3Status )
  1420. Q3PolyLine_EmptyData            (TQ3PolyLineData *      polyLineData);
  1421. EXTERN_API_C( TQ3Status )
  1422. Q3PolyLine_GetVertexPosition    (TQ3GeometryObject      polyLine,
  1423.                                  unsigned long          index,
  1424.                                  TQ3Point3D *           position);
  1425. EXTERN_API_C( TQ3Status )
  1426. Q3PolyLine_SetVertexPosition    (TQ3GeometryObject      polyLine,
  1427.                                  unsigned long          index,
  1428.                                  const TQ3Point3D *     position);
  1429. EXTERN_API_C( TQ3Status )
  1430. Q3PolyLine_GetVertexAttributeSet (TQ3GeometryObject     polyLine,
  1431.                                  unsigned long          index,
  1432.                                  TQ3AttributeSet *      attributeSet);
  1433. EXTERN_API_C( TQ3Status )
  1434. Q3PolyLine_SetVertexAttributeSet (TQ3GeometryObject     polyLine,
  1435.                                  unsigned long          index,
  1436.                                  TQ3AttributeSet        attributeSet);
  1437. EXTERN_API_C( TQ3Status )
  1438. Q3PolyLine_GetSegmentAttributeSet (TQ3GeometryObject    polyLine,
  1439.                                  unsigned long          index,
  1440.                                  TQ3AttributeSet *      attributeSet);
  1441. EXTERN_API_C( TQ3Status )
  1442. Q3PolyLine_SetSegmentAttributeSet (TQ3GeometryObject    polyLine,
  1443.                                  unsigned long          index,
  1444.                                  TQ3AttributeSet        attributeSet);
  1445. /******************************************************************************
  1446.  **                                                                          **
  1447.  **                     Torus Data Structure Definitions                     **
  1448.  **                                                                          **
  1449.  *****************************************************************************/
  1450. #endif  /* CALL_NOT_IN_CARBON */
  1451. struct TQ3TorusData {
  1452.     TQ3Point3D                      origin;
  1453.     TQ3Vector3D                     orientation;
  1454.     TQ3Vector3D                     majorRadius;
  1455.     TQ3Vector3D                     minorRadius;
  1456.     float                           ratio;
  1457.     float                           uMin;
  1458.     float                           uMax;
  1459.     float                           vMin;
  1460.     float                           vMax;
  1461.     TQ3EndCap                       caps;
  1462.     TQ3AttributeSet                 interiorAttributeSet;
  1463.     TQ3AttributeSet                 torusAttributeSet;
  1464. };
  1465. typedef struct TQ3TorusData             TQ3TorusData;
  1466. /******************************************************************************
  1467.  **                                                                          **
  1468.  **                             Torus Routines                               **
  1469.  **                                                                          **
  1470.  *****************************************************************************/
  1471. #if CALL_NOT_IN_CARBON
  1472. EXTERN_API_C( TQ3GeometryObject )
  1473. Q3Torus_New                     (const TQ3TorusData *   torusData);
  1474. EXTERN_API_C( TQ3Status )
  1475. Q3Torus_Submit                  (const TQ3TorusData *   torusData,
  1476.                                  TQ3ViewObject          view);
  1477. EXTERN_API_C( TQ3Status )
  1478. Q3Torus_SetData                 (TQ3GeometryObject      torus,
  1479.                                  const TQ3TorusData *   torusData);
  1480. EXTERN_API_C( TQ3Status )
  1481. Q3Torus_GetData                 (TQ3GeometryObject      torus,
  1482.                                  TQ3TorusData *         torusData);
  1483. EXTERN_API_C( TQ3Status )
  1484. Q3Torus_SetOrigin               (TQ3GeometryObject      torus,
  1485.                                  const TQ3Point3D *     origin);
  1486. EXTERN_API_C( TQ3Status )
  1487. Q3Torus_SetOrientation          (TQ3GeometryObject      torus,
  1488.                                  const TQ3Vector3D *    orientation);
  1489. EXTERN_API_C( TQ3Status )
  1490. Q3Torus_SetMajorRadius          (TQ3GeometryObject      torus,
  1491.                                  const TQ3Vector3D *    majorRadius);
  1492. EXTERN_API_C( TQ3Status )
  1493. Q3Torus_SetMinorRadius          (TQ3GeometryObject      torus,
  1494.                                  const TQ3Vector3D *    minorRadius);
  1495. EXTERN_API_C( TQ3Status )
  1496. Q3Torus_SetRatio                (TQ3GeometryObject      torus,
  1497.                                  float                  ratio);
  1498. EXTERN_API_C( TQ3Status )
  1499. Q3Torus_GetOrigin               (TQ3GeometryObject      torus,
  1500.                                  TQ3Point3D *           origin);
  1501. EXTERN_API_C( TQ3Status )
  1502. Q3Torus_GetOrientation          (TQ3GeometryObject      torus,
  1503.                                  TQ3Vector3D *          orientation);
  1504. EXTERN_API_C( TQ3Status )
  1505. Q3Torus_GetMajorRadius          (TQ3GeometryObject      torus,
  1506.                                  TQ3Vector3D *          majorRadius);
  1507. EXTERN_API_C( TQ3Status )
  1508. Q3Torus_GetMinorRadius          (TQ3GeometryObject      torus,
  1509.                                  TQ3Vector3D *          minorRadius);
  1510. EXTERN_API_C( TQ3Status )
  1511. Q3Torus_GetRatio                (TQ3GeometryObject      torus,
  1512.                                  float *                ratio);
  1513. EXTERN_API_C( TQ3Status )
  1514. Q3Torus_EmptyData               (TQ3TorusData *         torusData);
  1515. /******************************************************************************
  1516.  **                                                                          **
  1517.  **                     Triangle Data Structure Definitions                  **
  1518.  **                                                                          **
  1519.  *****************************************************************************/
  1520. #endif  /* CALL_NOT_IN_CARBON */
  1521. struct TQ3TriangleData {
  1522.     TQ3Vertex3D                     vertices[3];
  1523.     TQ3AttributeSet                 triangleAttributeSet;
  1524. };
  1525. typedef struct TQ3TriangleData          TQ3TriangleData;
  1526. /******************************************************************************
  1527.  **                                                                          **
  1528.  **                         Triangle Routines                                **
  1529.  **                                                                          **
  1530.  *****************************************************************************/
  1531. #if CALL_NOT_IN_CARBON
  1532. EXTERN_API_C( TQ3GeometryObject )
  1533. Q3Triangle_New                  (const TQ3TriangleData * triangleData);
  1534. EXTERN_API_C( TQ3Status )
  1535. Q3Triangle_Submit               (const TQ3TriangleData * triangleData,
  1536.                                  TQ3ViewObject          view);
  1537. EXTERN_API_C( TQ3Status )
  1538. Q3Triangle_SetData              (TQ3GeometryObject      triangle,
  1539.                                  const TQ3TriangleData * triangleData);
  1540. EXTERN_API_C( TQ3Status )
  1541. Q3Triangle_GetData              (TQ3GeometryObject      triangle,
  1542.                                  TQ3TriangleData *      triangleData);
  1543. EXTERN_API_C( TQ3Status )
  1544. Q3Triangle_EmptyData            (TQ3TriangleData *      triangleData);
  1545. EXTERN_API_C( TQ3Status )
  1546. Q3Triangle_GetVertexPosition    (TQ3GeometryObject      triangle,
  1547.                                  unsigned long          index,
  1548.                                  TQ3Point3D *           point);
  1549. EXTERN_API_C( TQ3Status )
  1550. Q3Triangle_SetVertexPosition    (TQ3GeometryObject      triangle,
  1551.                                  unsigned long          index,
  1552.                                  const TQ3Point3D *     point);
  1553. EXTERN_API_C( TQ3Status )
  1554. Q3Triangle_GetVertexAttributeSet (TQ3GeometryObject     triangle,
  1555.                                  unsigned long          index,
  1556.                                  TQ3AttributeSet *      attributeSet);
  1557. EXTERN_API_C( TQ3Status )
  1558. Q3Triangle_SetVertexAttributeSet (TQ3GeometryObject     triangle,
  1559.                                  unsigned long          index,
  1560.                                  TQ3AttributeSet        attributeSet);
  1561. /******************************************************************************
  1562.  **                                                                          **
  1563.  **                     TriGrid Data Structure Definitions                   **
  1564.  **                                                                          **
  1565.  *****************************************************************************/
  1566. #endif  /* CALL_NOT_IN_CARBON */
  1567. struct TQ3TriGridData {
  1568.     unsigned long                   numRows;
  1569.     unsigned long                   numColumns;
  1570.     TQ3Vertex3D *                   vertices;
  1571.     TQ3AttributeSet *               facetAttributeSet;
  1572.     TQ3AttributeSet                 triGridAttributeSet;
  1573. };
  1574. typedef struct TQ3TriGridData           TQ3TriGridData;
  1575. /******************************************************************************
  1576.  **                                                                          **
  1577.  **                             TriGrid Routines                             **
  1578.  **                                                                          **
  1579.  *****************************************************************************/
  1580. #if CALL_NOT_IN_CARBON
  1581. EXTERN_API_C( TQ3GeometryObject )
  1582. Q3TriGrid_New                   (const TQ3TriGridData * triGridData);
  1583. EXTERN_API_C( TQ3Status )
  1584. Q3TriGrid_Submit                (const TQ3TriGridData * triGridData,
  1585.                                  TQ3ViewObject          view);
  1586. EXTERN_API_C( TQ3Status )
  1587. Q3TriGrid_SetData               (TQ3GeometryObject      triGrid,
  1588.                                  const TQ3TriGridData * triGridData);
  1589. EXTERN_API_C( TQ3Status )
  1590. Q3TriGrid_GetData               (TQ3GeometryObject      triGrid,
  1591.                                  TQ3TriGridData *       triGridData);
  1592. EXTERN_API_C( TQ3Status )
  1593. Q3TriGrid_EmptyData             (TQ3TriGridData *       triGridData);
  1594. EXTERN_API_C( TQ3Status )
  1595. Q3TriGrid_GetVertexPosition     (TQ3GeometryObject      triGrid,
  1596.                                  unsigned long          rowIndex,
  1597.                                  unsigned long          columnIndex,
  1598.                                  TQ3Point3D *           position);
  1599. EXTERN_API_C( TQ3Status )
  1600. Q3TriGrid_SetVertexPosition     (TQ3GeometryObject      triGrid,
  1601.                                  unsigned long          rowIndex,
  1602.                                  unsigned long          columnIndex,
  1603.                                  const TQ3Point3D *     position);
  1604. EXTERN_API_C( TQ3Status )
  1605. Q3TriGrid_GetVertexAttributeSet (TQ3GeometryObject      triGrid,
  1606.                                  unsigned long          rowIndex,
  1607.                                  unsigned long          columnIndex,
  1608.                                  TQ3AttributeSet *      attributeSet);
  1609. EXTERN_API_C( TQ3Status )
  1610. Q3TriGrid_SetVertexAttributeSet (TQ3GeometryObject      triGrid,
  1611.                                  unsigned long          rowIndex,
  1612.                                  unsigned long          columnIndex,
  1613.                                  TQ3AttributeSet        attributeSet);
  1614. EXTERN_API_C( TQ3Status )
  1615. Q3TriGrid_GetFacetAttributeSet  (TQ3GeometryObject      triGrid,
  1616.                                  unsigned long          faceIndex,
  1617.                                  TQ3AttributeSet *      facetAttributeSet);
  1618. EXTERN_API_C( TQ3Status )
  1619. Q3TriGrid_SetFacetAttributeSet  (TQ3GeometryObject      triGrid,
  1620.                                  unsigned long          faceIndex,
  1621.                                  TQ3AttributeSet        facetAttributeSet);
  1622. /******************************************************************************
  1623.  **                                                                          **
  1624.  **                     TriMesh Data Structure Definitions                   **
  1625.  **                                                                          **
  1626.  *****************************************************************************/
  1627. #endif  /* CALL_NOT_IN_CARBON */
  1628. struct TQ3TriMeshTriangleData {
  1629.     unsigned long                   pointIndices[3];
  1630. };
  1631. typedef struct TQ3TriMeshTriangleData   TQ3TriMeshTriangleData;
  1632. struct TQ3TriMeshEdgeData {
  1633.     unsigned long                   pointIndices[2];
  1634.     unsigned long                   triangleIndices[2];
  1635. };
  1636. typedef struct TQ3TriMeshEdgeData       TQ3TriMeshEdgeData;
  1637. struct TQ3TriMeshAttributeData {
  1638.     TQ3AttributeType                attributeType;              /* The type of attribute       */
  1639.     void *                          data;                       /* Pointer to the contiguous     */
  1640.                                                                 /* attribute data.           */
  1641.     char *                          attributeUseArray;          /* This is only used with custom */
  1642.                                                                 /* attributes                */
  1643. };
  1644. typedef struct TQ3TriMeshAttributeData  TQ3TriMeshAttributeData;
  1645. struct TQ3TriMeshData {
  1646.     TQ3AttributeSet                 triMeshAttributeSet;
  1647.     unsigned long                   numTriangles;
  1648.     TQ3TriMeshTriangleData *        triangles;
  1649.     unsigned long                   numTriangleAttributeTypes;
  1650.     TQ3TriMeshAttributeData *       triangleAttributeTypes;
  1651.     unsigned long                   numEdges;
  1652.     TQ3TriMeshEdgeData *            edges;
  1653.     unsigned long                   numEdgeAttributeTypes;
  1654.     TQ3TriMeshAttributeData *       edgeAttributeTypes;
  1655.     unsigned long                   numPoints;
  1656.     TQ3Point3D *                    points;
  1657.     unsigned long                   numVertexAttributeTypes;
  1658.     TQ3TriMeshAttributeData *       vertexAttributeTypes;
  1659.     TQ3BoundingBox                  bBox;
  1660. };
  1661. typedef struct TQ3TriMeshData           TQ3TriMeshData;
  1662. /******************************************************************************
  1663.  **                                                                          **
  1664.  **                         TriMesh Routines                                 **
  1665.  **                                                                          **
  1666.  *****************************************************************************/
  1667. #if CALL_NOT_IN_CARBON
  1668. EXTERN_API_C( TQ3GeometryObject )
  1669. Q3TriMesh_New                   (const TQ3TriMeshData * triMeshData);
  1670. EXTERN_API_C( TQ3Status )
  1671. Q3TriMesh_Submit                (const TQ3TriMeshData * triMeshData,
  1672.                                  TQ3ViewObject          view);
  1673. EXTERN_API_C( TQ3Status )
  1674. Q3TriMesh_SetData               (TQ3GeometryObject      triMesh,
  1675.                                  const TQ3TriMeshData * triMeshData);
  1676. EXTERN_API_C( TQ3Status )
  1677. Q3TriMesh_GetData               (TQ3GeometryObject      triMesh,
  1678.                                  TQ3TriMeshData *       triMeshData);
  1679. EXTERN_API_C( TQ3Status )
  1680. Q3TriMesh_EmptyData             (TQ3TriMeshData *       triMeshData);
  1681. #endif  /* CALL_NOT_IN_CARBON */
  1682. #if PRAGMA_ENUM_ALWAYSINT
  1683.     #pragma enumsalwaysint reset
  1684.     #ifdef __QD3DGEOMETRY__RESTORE_TWOBYTEINTS
  1685.         #pragma fourbyteints off
  1686.     #endif
  1687. #elif PRAGMA_ENUM_OPTIONS
  1688.     #pragma option enum=reset
  1689. #elif defined(__QD3DGEOMETRY__RESTORE_PACKED_ENUMS)
  1690.     #pragma options(pack_enums)
  1691. #endif
  1692. #if PRAGMA_STRUCT_ALIGN
  1693.     #pragma options align=reset
  1694. #elif PRAGMA_STRUCT_PACKPUSH
  1695.     #pragma pack(pop)
  1696. #elif PRAGMA_STRUCT_PACK
  1697.     #pragma pack()
  1698. #endif
  1699. #ifdef PRAGMA_IMPORT_OFF
  1700. #pragma import off
  1701. #elif PRAGMA_IMPORT
  1702. #pragma import reset
  1703. #endif
  1704. #ifdef __cplusplus
  1705. }
  1706. #endif
  1707. #endif /* __QD3DGEOMETRY__ */