Mac OS 9
QD3D.h
Go to the documentation of this file.
1 
19 #ifndef __QD3D__
20 #define __QD3D__
21 
22 #ifndef __CONDITIONALMACROS__
23 #include <ConditionalMacros.h>
24 #endif
25 
26 #if TARGET_OS_MAC
27 #ifndef __MACTYPES__
28 #include <MacTypes.h>
29 #endif
30 
31 #endif /* TARGET_OS_MAC */
32 
33 #include <stdio.h>
34 
35 #if PRAGMA_ONCE
36 #pragma once
37 #endif
38 
39 #ifdef __cplusplus
40 extern "C"
41 {
42 #endif
43 
44 #if PRAGMA_IMPORT
45 #pragma import on
46 #endif
47 
48 #if PRAGMA_STRUCT_ALIGN
49 #pragma options align = power
50 #elif PRAGMA_STRUCT_PACKPUSH
51 #pragma pack(push, 2)
52 #elif PRAGMA_STRUCT_PACK
53 #pragma pack(2)
54 #endif
55 
56 #if PRAGMA_ENUM_ALWAYSINT
57 #if defined(__fourbyteints__) && !__fourbyteints__
58 #define __QD3D__RESTORE_TWOBYTEINTS
59 #pragma fourbyteints on
60 #endif
61 #pragma enumsalwaysint on
62 #elif PRAGMA_ENUM_OPTIONS
63 #pragma option enum =int
64 #elif PRAGMA_ENUM_PACK
65 #if __option(pack_enums)
66 #define __QD3D__RESTORE_PACKED_ENUMS
67 #pragma options(!pack_enums)
68 #endif
69 #endif
70 
71 #if TARGET_OS_MAC
72 #define OS_MACINTOSH 1
73 #define OS_WIN32 0
74 #define OS_UNIX 0
75 #define OS_NEXT 0
76 #define WINDOW_SYSTEM_MACINTOSH 1
77 #define WINDOW_SYSTEM_WIN32 0
78 #define WINDOW_SYSTEM_X11 0
79 #define WINDOW_SYSTEM_NEXT 0
80 #endif /* TARGET_OS_MAC */
81 
82 #if TARGET_OS_WIN32
83 #define OS_MACINTOSH 0
84 #define OS_WIN32 1
85 #define OS_UNIX 0
86 #define OS_NEXT 0
87 #define WINDOW_SYSTEM_MACINTOSH 0
88 #define WINDOW_SYSTEM_WIN32 1
89 #define WINDOW_SYSTEM_X11 0
90 #define WINDOW_SYSTEM_NEXT 0
91 #endif /* TARGET_OS_WIN32 */
92 
93 #if TARGET_OS_UNIX
94 #define OS_MACINTOSH 0
95 #define OS_WIN32 0
96 #define WINDOW_SYSTEM_MACINTOSH 0
97 #define WINDOW_SYSTEM_WIN32 0
98 #if NeXT
99 #define OS_UNIX 0
100 #define OS_NEXT 1
101 #define WINDOW_SYSTEM_X11 0
102 #define WINDOW_SYSTEM_NEXT 1
103 #else
104 #define OS_UNIX 1
105 #define OS_NEXT 0
106 #define WINDOW_SYSTEM_X11 1
107 #define WINDOW_SYSTEM_NEXT 0
108 #endif /* NeXT */
109 
110 #endif /* TARGET_OS_UNIX */
111 
112 /******************************************************************************
113  ** **
114  ** Export Control **
115  ** **
116  *****************************************************************************/
117 #if TARGET_OS_WIN32
118 #if defined(WIN32_EXPORTING) /* define when building DLL */
119 #define QD3D_EXPORT __declspec(dllexport)
120 #define QD3D_CALL
121 #define QD3D_CALLBACK
122 #else
123 #define QD3D_EXPORT __declspec(dllimport)
124 #define QD3D_CALL __cdecl
125 #define QD3D_CALLBACK __cdecl
126 #endif /* WIN32_EXPORTING */
127 #else
128 #define QD3D_EXPORT
129 #define QD3D_CALL
130 #define QD3D_CALLBACK
131 #endif /* TARGET_OS_WIN32 */
132 
133  /******************************************************************************
134  ** **
135  ** NULL definition **
136  ** **
137  *****************************************************************************/
138 
139 #ifndef NULL
140 #error /* NULL is undefined? */
141 #endif /* NULL */
142 
143  /******************************************************************************
144  ** **
145  ** Objects **
146  ** **
147  *****************************************************************************/
152  typedef long TQ3ObjectType;
153  typedef struct OpaqueTQ3Object *TQ3Object;
154  /* */
162  typedef TQ3Object TQ3ElementObject;
163  typedef TQ3Object TQ3SharedObject;
164  typedef TQ3Object TQ3ViewObject;
165  typedef TQ3Object TQ3PickObject;
181  typedef TQ3SharedObject TQ3RendererObject;
182  typedef TQ3SharedObject TQ3DrawContextObject;
183  typedef TQ3SharedObject TQ3SetObject;
184  typedef TQ3SharedObject TQ3FileObject;
185  typedef TQ3SharedObject TQ3ShapeObject;
186  typedef TQ3SharedObject TQ3ShapePartObject;
187  typedef TQ3SharedObject TQ3ControllerStateObject;
188  typedef TQ3SharedObject TQ3TrackerObject;
189  typedef TQ3SharedObject TQ3StringObject;
190  typedef TQ3SharedObject TQ3StorageObject;
191  typedef TQ3SharedObject TQ3TextureObject;
192  typedef TQ3SharedObject TQ3ViewHintsObject;
197  typedef TQ3SetObject TQ3AttributeSet;
210  typedef TQ3ShapeObject TQ3GroupObject;
211  typedef TQ3ShapeObject TQ3GeometryObject;
212  typedef TQ3ShapeObject TQ3ShaderObject;
213  typedef TQ3ShapeObject TQ3StyleObject;
214  typedef TQ3ShapeObject TQ3TransformObject;
215  typedef TQ3ShapeObject TQ3LightObject;
216  typedef TQ3ShapeObject TQ3CameraObject;
217  typedef TQ3ShapeObject TQ3UnknownObject;
218  typedef TQ3ShapeObject TQ3ReferenceObject;
219  typedef TQ3ShapeObject TQ3StateOperatorObject;
224  typedef TQ3ShapePartObject TQ3MeshPartObject;
232  typedef TQ3MeshPartObject TQ3MeshEdgePartObject;
233  typedef TQ3MeshPartObject TQ3MeshVertexPartObject;
243  typedef TQ3ShaderObject TQ3SurfaceShaderObject;
244  typedef TQ3ShaderObject TQ3IlluminationShaderObject;
248  typedef struct OpaqueTQ3GroupPosition *TQ3GroupPosition;
252  enum
253  {
254  kQ3StringMaximumLength = 1024
255  };
256 
257  typedef char TQ3ObjectClassNameString[kQ3StringMaximumLength];
258 
259  /******************************************************************************
260  ** **
261  ** Client/Server Things **
262  ** **
263  *****************************************************************************/
264  typedef void *TQ3ControllerRef;
265  /******************************************************************************
266  ** **
267  ** Flags and Switches **
268  ** **
269  *****************************************************************************/
270  enum TQ3Boolean
271  {
272  kQ3False = 0,
273  kQ3True = 1
274  };
275  typedef enum TQ3Boolean TQ3Boolean;
276 
277  enum TQ3Switch
278  {
279  kQ3Off = 0,
280  kQ3On = 1
281  };
282  typedef enum TQ3Switch TQ3Switch;
283 
284  enum TQ3Status
285  {
286  kQ3Failure = 0,
287  kQ3Success = 1
288  };
289  typedef enum TQ3Status TQ3Status;
290 
291  enum TQ3Axis
292  {
293  kQ3AxisX = 0,
294  kQ3AxisY = 1,
295  kQ3AxisZ = 2
296  };
297  typedef enum TQ3Axis TQ3Axis;
298 
299  enum TQ3PixelType
300  {
301  kQ3PixelTypeRGB32 = 0, /* Alpha:8 (ignored), R:8, G:8, B:8 */
302  kQ3PixelTypeARGB32 = 1, /* Alpha:8, R:8, G:8, B:8 */
303  kQ3PixelTypeRGB16 = 2, /* Alpha:1 (ignored), R:5, G:5, B:5 */
304  kQ3PixelTypeARGB16 = 3, /* Alpha:1, R:5, G:5, B:5 */
305  kQ3PixelTypeRGB16_565 = 4, /* Win32 only: 16 bits/pixel, R:5, G:6, B:5 */
306  kQ3PixelTypeRGB24 = 5 /* Win32 only: 24 bits/pixel, R:8, G:8, B:8 */
307  };
308  typedef enum TQ3PixelType TQ3PixelType;
309 
310  enum TQ3Endian
311  {
312  kQ3EndianBig = 0,
313  kQ3EndianLittle = 1
314  };
315  typedef enum TQ3Endian TQ3Endian;
316 
317  enum TQ3EndCapMasks
318  {
319  kQ3EndCapNone = 0,
320  kQ3EndCapMaskTop = 1 << 0,
321  kQ3EndCapMaskBottom = 1 << 1,
322  kQ3EndCapMaskInterior = 1 << 2
323  };
324  typedef enum TQ3EndCapMasks TQ3EndCapMasks;
325 
326  typedef unsigned long TQ3EndCap;
327 
328  enum
329  {
330  kQ3ArrayIndexNULL = ~0
331  };
332 
333  /******************************************************************************
334  ** **
335  ** Point and Vector Definitions **
336  ** **
337  *****************************************************************************/
338  struct TQ3Vector2D
339  {
340  float x;
341  float y;
342  };
343  typedef struct TQ3Vector2D TQ3Vector2D;
344  struct TQ3Vector3D
345  {
346  float x;
347  float y;
348  float z;
349  };
350  typedef struct TQ3Vector3D TQ3Vector3D;
351  struct TQ3Point2D
352  {
353  float x;
354  float y;
355  };
356  typedef struct TQ3Point2D TQ3Point2D;
357  struct TQ3Point3D
358  {
359  float x;
360  float y;
361  float z;
362  };
363  typedef struct TQ3Point3D TQ3Point3D;
365  {
366  float x;
367  float y;
368  float z;
369  float w;
370  };
371  typedef struct TQ3RationalPoint4D TQ3RationalPoint4D;
373  {
374  float x;
375  float y;
376  float w;
377  };
378  typedef struct TQ3RationalPoint3D TQ3RationalPoint3D;
379  /******************************************************************************
380  ** **
381  ** Quaternion **
382  ** **
383  *****************************************************************************/
385  {
386  float w;
387  float x;
388  float y;
389  float z;
390  };
391  typedef struct TQ3Quaternion TQ3Quaternion;
392  /******************************************************************************
393  ** **
394  ** Ray Definition **
395  ** **
396  *****************************************************************************/
397  struct TQ3Ray3D
398  {
399  TQ3Point3D origin;
400  TQ3Vector3D direction;
401  };
402  typedef struct TQ3Ray3D TQ3Ray3D;
403  /******************************************************************************
404  ** **
405  ** Parameterization Data Structures **
406  ** **
407  *****************************************************************************/
408  struct TQ3Param2D
409  {
410  float u;
411  float v;
412  };
413  typedef struct TQ3Param2D TQ3Param2D;
414  struct TQ3Param3D
415  {
416  float u;
417  float v;
418  float w;
419  };
420  typedef struct TQ3Param3D TQ3Param3D;
422  {
423  TQ3Vector3D uTangent;
424  TQ3Vector3D vTangent;
425  };
426  typedef struct TQ3Tangent2D TQ3Tangent2D;
428  {
429  TQ3Vector3D uTangent;
430  TQ3Vector3D vTangent;
431  TQ3Vector3D wTangent;
432  };
433  typedef struct TQ3Tangent3D TQ3Tangent3D;
434  /******************************************************************************
435  ** **
436  ** Polar and Spherical Coordinates **
437  ** **
438  *****************************************************************************/
440  {
441  float r;
442  float theta;
443  };
444  typedef struct TQ3PolarPoint TQ3PolarPoint;
446  {
447  float rho;
448  float theta;
449  float phi;
450  };
451  typedef struct TQ3SphericalPoint TQ3SphericalPoint;
452  /******************************************************************************
453  ** **
454  ** Color Definition **
455  ** **
456  *****************************************************************************/
457  struct TQ3ColorRGB
458  {
459  float r;
460  float g;
461  float b;
462  };
463  typedef struct TQ3ColorRGB TQ3ColorRGB;
465  {
466  float a;
467  float r;
468  float g;
469  float b;
470  };
471  typedef struct TQ3ColorARGB TQ3ColorARGB;
472  /******************************************************************************
473  ** **
474  ** Vertices **
475  ** **
476  *****************************************************************************/
477  struct TQ3Vertex3D
478  {
479  TQ3Point3D point;
480  TQ3AttributeSet attributeSet;
481  };
482  typedef struct TQ3Vertex3D TQ3Vertex3D;
483  /******************************************************************************
484  ** **
485  ** Matrices **
486  ** **
487  *****************************************************************************/
489  {
490  float value[3][3];
491  };
492  typedef struct TQ3Matrix3x3 TQ3Matrix3x3;
494  {
495  float value[4][4];
496  };
497  typedef struct TQ3Matrix4x4 TQ3Matrix4x4;
498  /******************************************************************************
499  ** **
500  ** Bitmap/Pixmap **
501  ** **
502  *****************************************************************************/
503  struct TQ3Pixmap
504  {
505  void *image;
506  unsigned long width;
507  unsigned long height;
508  unsigned long rowBytes;
509  unsigned long pixelSize; /* MUST be 16 or 32 to use with the Interactive
510  Renderer on Mac OS*/
511  TQ3PixelType pixelType;
512  TQ3Endian bitOrder;
513  TQ3Endian byteOrder;
514  };
515  typedef struct TQ3Pixmap TQ3Pixmap;
517  {
518  TQ3StorageObject image;
519  unsigned long width;
520  unsigned long height;
521  unsigned long rowBytes;
522  unsigned long pixelSize; /* MUST be 16 or 32 to use with the Interactive
523  Renderer on Mac OS*/
524  TQ3PixelType pixelType;
525  TQ3Endian bitOrder;
526  TQ3Endian byteOrder;
527  };
528  typedef struct TQ3StoragePixmap TQ3StoragePixmap;
529  struct TQ3Bitmap
530  {
531  unsigned char *image;
532  unsigned long width;
533  unsigned long height;
534  unsigned long rowBytes;
535  TQ3Endian bitOrder;
536  };
537  typedef struct TQ3Bitmap TQ3Bitmap;
539  { /* An image for use as a texture mipmap */
540  unsigned long width; /* Width of mipmap, must be power of 2 */
541  unsigned long height; /* Height of mipmap, must be power of 2 */
542  unsigned long rowBytes; /* Rowbytes of mipmap */
543  unsigned long offset; /* Offset from image base to this mipmap */
544  };
545  typedef struct TQ3MipmapImage TQ3MipmapImage;
546  struct TQ3Mipmap
547  {
548  TQ3StorageObject image; /* Data containing the texture map and */
549  /* if (useMipmapping==kQ3True) the */
550  /* mipmap data */
551  TQ3Boolean useMipmapping; /* True if mipmapping should be used */
552  /* and all mipmaps have been provided */
553  TQ3PixelType pixelType;
554  TQ3Endian bitOrder;
555  TQ3Endian byteOrder;
556  unsigned long reserved; /* leave NULL for next version */
557  TQ3MipmapImage mipmaps[32]; /* The actual number of mipmaps is determined from
558  the size of the first mipmap */
559  };
560  typedef struct TQ3Mipmap TQ3Mipmap;
561 
563  {
564  TQ3StorageObject
565  compressedImage; /* storage obj containing compressed image data */
566 
567  TQ3Endian imageDescByteOrder; /* endianness of the data in the imageDesc */
568  TQ3StorageObject
569  imageDesc; /* storage obj containing image description created by
570  Quicktime to store info about compressed image */
571 
572  TQ3Boolean makeMipmaps;
573 
574  unsigned long width;
575  unsigned long height;
576  unsigned long pixelSize;
577  TQ3PixelType pixelType;
578  };
580 
581  /******************************************************************************
582  ** **
583  ** Higher dimension quantities **
584  ** **
585  *****************************************************************************/
586  struct TQ3Area
587  {
588  TQ3Point2D min;
589  TQ3Point2D max;
590  };
591  typedef struct TQ3Area TQ3Area;
593  {
594  TQ3Vector3D normal;
595  float constant;
596  };
597  typedef struct TQ3PlaneEquation TQ3PlaneEquation;
599  {
600  TQ3Point3D min;
601  TQ3Point3D max;
602  TQ3Boolean isEmpty;
603  };
604  typedef struct TQ3BoundingBox TQ3BoundingBox;
606  {
607  TQ3Point3D origin;
608  float radius;
609  TQ3Boolean isEmpty;
610  };
611  typedef struct TQ3BoundingSphere TQ3BoundingSphere;
628  {
629  kQ3ComputeBoundsExact = 0,
630  kQ3ComputeBoundsApproximate = 1
631  };
632  typedef enum TQ3ComputeBounds TQ3ComputeBounds;
633 
634  /******************************************************************************
635  ** **
636  ** Object System Types **
637  ** **
638  *****************************************************************************/
639 
640  typedef struct OpaqueTQ3XObjectClass *TQ3XObjectClass;
641 
642  typedef unsigned long TQ3XMethodType;
646 #define kQ3XMethodTypeObjectUnregister Q3_METHOD_TYPE('u', 'n', 'r', 'g')
651 #define kQ3XMethodTypeObjectIsDrawable \
652  Q3_METHOD_TYPE('i', 's', 'd', \
653  'r') /* return true from the metahandler if this object can \
654  be submitted in a rendering loop */
655  typedef CALLBACK_API_C(void, TQ3XFunctionPointer)(void);
656  typedef CALLBACK_API_C(TQ3XFunctionPointer,
657  TQ3XMetaHandler)(TQ3XMethodType methodType);
673  typedef CALLBACK_API_C(TQ3Status,
674  TQ3XObjectUnregisterMethod)(TQ3XObjectClass objectClass);
680  /******************************************************************************
681  ** **
682  ** Set Types **
683  ** **
684  *****************************************************************************/
685  typedef long TQ3ElementType;
686  enum
687  {
688  kQ3ElementTypeNone = 0,
689  kQ3ElementTypeUnknown = 32,
690  kQ3ElementTypeSet = 33
691  };
692 
718  /******************************************************************************
719  ** **
720  ** Object System Macros **
721  ** **
722  *****************************************************************************/
723 
724 #define Q3_FOUR_CHARACTER_CONSTANT(a, b, c, d) \
725  ((const unsigned long)((const unsigned long)(a) << 24) | \
726  ((const unsigned long)(b) << 16) | ((const unsigned long)(c) << 8) | \
727  ((const unsigned long)(d)))
728 
729 #define Q3_OBJECT_TYPE(a, b, c, d) \
730  ((TQ3ObjectType)Q3_FOUR_CHARACTER_CONSTANT(a, b, c, d))
731 
732 #define Q3_METHOD_TYPE(a, b, c, d) \
733  ((TQ3XMethodType)Q3_FOUR_CHARACTER_CONSTANT(a, b, c, d))
734 
735  /******************************************************************************
736  ** **
737  ** Object Types **
738  ** **
739  *****************************************************************************/
745 #define kQ3ObjectTypeInvalid 0L
746 #define kQ3ObjectTypeView ((TQ3ObjectType)FOUR_CHAR_CODE('view'))
747 #define kQ3ObjectTypeElement ((TQ3ObjectType)FOUR_CHAR_CODE('elmn'))
748 #define kQ3ElementTypeAttribute ((TQ3ObjectType)FOUR_CHAR_CODE('eatt'))
749 #define kQ3ObjectTypePick ((TQ3ObjectType)FOUR_CHAR_CODE('pick'))
750 #define kQ3PickTypeWindowPoint ((TQ3ObjectType)FOUR_CHAR_CODE('pkwp'))
751 #define kQ3PickTypeWindowRect ((TQ3ObjectType)FOUR_CHAR_CODE('pkwr'))
752 #define kQ3PickTypeWorldRay ((TQ3ObjectType)FOUR_CHAR_CODE('pkry'))
753 #define kQ3ObjectTypeShared ((TQ3ObjectType)FOUR_CHAR_CODE('shrd'))
754 #define kQ3SharedTypeRenderer ((TQ3ObjectType)FOUR_CHAR_CODE('rddr'))
755 #define kQ3RendererTypeWireFrame ((TQ3ObjectType)FOUR_CHAR_CODE('wrfr'))
756 #define kQ3RendererTypeGeneric ((TQ3ObjectType)FOUR_CHAR_CODE('gnrr'))
757 #define kQ3RendererTypeInteractive ((TQ3ObjectType)FOUR_CHAR_CODE('ctwn'))
758 #define kQ3SharedTypeShape ((TQ3ObjectType)FOUR_CHAR_CODE('shap'))
759 
760 #define kQ3ShapeTypeGeometry ((TQ3ObjectType)FOUR_CHAR_CODE('gmtr'))
761 #define kQ3GeometryTypeBox ((TQ3ObjectType)FOUR_CHAR_CODE('box '))
762 #define kQ3GeometryTypeGeneralPolygon ((TQ3ObjectType)FOUR_CHAR_CODE('gpgn'))
763 #define kQ3GeometryTypeLine ((TQ3ObjectType)FOUR_CHAR_CODE('line'))
764 #define kQ3GeometryTypeMarker ((TQ3ObjectType)FOUR_CHAR_CODE('mrkr'))
765 #define kQ3GeometryTypePixmapMarker ((TQ3ObjectType)FOUR_CHAR_CODE('mrkp'))
766 #define kQ3GeometryTypeMesh ((TQ3ObjectType)FOUR_CHAR_CODE('mesh'))
767 #define kQ3GeometryTypeNURBCurve ((TQ3ObjectType)FOUR_CHAR_CODE('nrbc'))
768 #define kQ3GeometryTypeNURBPatch ((TQ3ObjectType)FOUR_CHAR_CODE('nrbp'))
769 #define kQ3GeometryTypePoint ((TQ3ObjectType)FOUR_CHAR_CODE('pnt '))
770 #define kQ3GeometryTypePolygon ((TQ3ObjectType)FOUR_CHAR_CODE('plyg'))
771 #define kQ3GeometryTypePolyLine ((TQ3ObjectType)FOUR_CHAR_CODE('plyl'))
772 #define kQ3GeometryTypeTriangle ((TQ3ObjectType)FOUR_CHAR_CODE('trng'))
773 #define kQ3GeometryTypeTriGrid ((TQ3ObjectType)FOUR_CHAR_CODE('trig'))
774 #define kQ3GeometryTypeCone ((TQ3ObjectType)FOUR_CHAR_CODE('cone'))
775 #define kQ3GeometryTypeCylinder ((TQ3ObjectType)FOUR_CHAR_CODE('cyln'))
776 #define kQ3GeometryTypeDisk ((TQ3ObjectType)FOUR_CHAR_CODE('disk'))
777 #define kQ3GeometryTypeEllipse ((TQ3ObjectType)FOUR_CHAR_CODE('elps'))
778 #define kQ3GeometryTypeEllipsoid ((TQ3ObjectType)FOUR_CHAR_CODE('elpd'))
779 #define kQ3GeometryTypePolyhedron ((TQ3ObjectType)FOUR_CHAR_CODE('plhd'))
780 #define kQ3GeometryTypeTorus ((TQ3ObjectType)FOUR_CHAR_CODE('tors'))
781 #define kQ3GeometryTypeTriMesh ((TQ3ObjectType)FOUR_CHAR_CODE('tmsh'))
782 
783 #define kQ3ShapeTypeShader ((TQ3ObjectType)FOUR_CHAR_CODE('shdr'))
784 #define kQ3ShaderTypeSurface ((TQ3ObjectType)FOUR_CHAR_CODE('sush'))
785 #define kQ3SurfaceShaderTypeTexture ((TQ3ObjectType)FOUR_CHAR_CODE('txsu'))
786 #define kQ3ShaderTypeIllumination ((TQ3ObjectType)FOUR_CHAR_CODE('ilsh'))
787 #define kQ3IlluminationTypePhong ((TQ3ObjectType)FOUR_CHAR_CODE('phil'))
788 #define kQ3IlluminationTypeLambert ((TQ3ObjectType)FOUR_CHAR_CODE('lmil'))
789 #define kQ3IlluminationTypeNULL ((TQ3ObjectType)FOUR_CHAR_CODE('nuil'))
790 #define kQ3ShapeTypeStyle ((TQ3ObjectType)FOUR_CHAR_CODE('styl'))
791 #define kQ3StyleTypeBackfacing ((TQ3ObjectType)FOUR_CHAR_CODE('bckf'))
792 #define kQ3StyleTypeInterpolation ((TQ3ObjectType)FOUR_CHAR_CODE('intp'))
793 #define kQ3StyleTypeFill ((TQ3ObjectType)FOUR_CHAR_CODE('fist'))
794 #define kQ3StyleTypePickID ((TQ3ObjectType)FOUR_CHAR_CODE('pkid'))
795 #define kQ3StyleTypeReceiveShadows ((TQ3ObjectType)FOUR_CHAR_CODE('rcsh'))
796 #define kQ3StyleTypeHighlight ((TQ3ObjectType)FOUR_CHAR_CODE('high'))
797 #define kQ3StyleTypeSubdivision ((TQ3ObjectType)FOUR_CHAR_CODE('sbdv'))
798 #define kQ3StyleTypeOrientation ((TQ3ObjectType)FOUR_CHAR_CODE('ofdr'))
799 #define kQ3StyleTypePickParts ((TQ3ObjectType)FOUR_CHAR_CODE('pkpt'))
800 #define kQ3StyleTypeAntiAlias ((TQ3ObjectType)FOUR_CHAR_CODE('anti'))
801 #define kQ3StyleTypeFog ((TQ3ObjectType)FOUR_CHAR_CODE('fogg'))
802 
803 #define kQ3ShapeTypeTransform ((TQ3ObjectType)FOUR_CHAR_CODE('xfrm'))
804 #define kQ3TransformTypeMatrix ((TQ3ObjectType)FOUR_CHAR_CODE('mtrx'))
805 #define kQ3TransformTypeScale ((TQ3ObjectType)FOUR_CHAR_CODE('scal'))
806 #define kQ3TransformTypeTranslate ((TQ3ObjectType)FOUR_CHAR_CODE('trns'))
807 #define kQ3TransformTypeRotate ((TQ3ObjectType)FOUR_CHAR_CODE('rott'))
808 #define kQ3TransformTypeRotateAboutPoint ((TQ3ObjectType)FOUR_CHAR_CODE('rtap'))
809 #define kQ3TransformTypeRotateAboutAxis ((TQ3ObjectType)FOUR_CHAR_CODE('rtaa'))
810 #define kQ3TransformTypeQuaternion ((TQ3ObjectType)FOUR_CHAR_CODE('qtrn'))
811 #define kQ3TransformTypeReset ((TQ3ObjectType)FOUR_CHAR_CODE('rset'))
812 #define kQ3ShapeTypeLight ((TQ3ObjectType)FOUR_CHAR_CODE('lght'))
813 #define kQ3LightTypeAmbient ((TQ3ObjectType)FOUR_CHAR_CODE('ambn'))
814 #define kQ3LightTypeDirectional ((TQ3ObjectType)FOUR_CHAR_CODE('drct'))
815 #define kQ3LightTypePoint ((TQ3ObjectType)FOUR_CHAR_CODE('pntl'))
816 #define kQ3LightTypeSpot ((TQ3ObjectType)FOUR_CHAR_CODE('spot'))
817 
818 #define kQ3ShapeTypeCamera ((TQ3ObjectType)FOUR_CHAR_CODE('cmra'))
819 #define kQ3CameraTypeOrthographic ((TQ3ObjectType)FOUR_CHAR_CODE('orth'))
820 #define kQ3CameraTypeViewPlane ((TQ3ObjectType)FOUR_CHAR_CODE('vwpl'))
821 #define kQ3CameraTypeViewAngleAspect ((TQ3ObjectType)FOUR_CHAR_CODE('vana'))
822 #define kQ3ShapeTypeStateOperator ((TQ3ObjectType)FOUR_CHAR_CODE('stop'))
823 #define kQ3StateOperatorTypePush ((TQ3ObjectType)FOUR_CHAR_CODE('push'))
824 #define kQ3StateOperatorTypePop ((TQ3ObjectType)FOUR_CHAR_CODE('pop '))
825 #define kQ3ShapeTypeGroup ((TQ3ObjectType)FOUR_CHAR_CODE('grup'))
826 #define kQ3GroupTypeDisplay ((TQ3ObjectType)FOUR_CHAR_CODE('dspg'))
827 #define kQ3DisplayGroupTypeOrdered ((TQ3ObjectType)FOUR_CHAR_CODE('ordg'))
828 #define kQ3DisplayGroupTypeIOProxy ((TQ3ObjectType)FOUR_CHAR_CODE('iopx'))
829 #define kQ3GroupTypeLight ((TQ3ObjectType)FOUR_CHAR_CODE('lghg'))
830 #define kQ3GroupTypeInfo ((TQ3ObjectType)FOUR_CHAR_CODE('info'))
831 
832 #define kQ3ShapeTypeUnknown ((TQ3ObjectType)FOUR_CHAR_CODE('unkn'))
833 #define kQ3UnknownTypeText ((TQ3ObjectType)FOUR_CHAR_CODE('uktx'))
834 #define kQ3UnknownTypeBinary ((TQ3ObjectType)FOUR_CHAR_CODE('ukbn'))
835 #define kQ3ShapeTypeReference ((TQ3ObjectType)FOUR_CHAR_CODE('rfrn'))
836 #define kQ3ReferenceTypeExternal ((TQ3ObjectType)FOUR_CHAR_CODE('rfex'))
837 #define kQ3SharedTypeSet ((TQ3ObjectType)FOUR_CHAR_CODE('set '))
838 #define kQ3SetTypeAttribute ((TQ3ObjectType)FOUR_CHAR_CODE('attr'))
839 #define kQ3SharedTypeDrawContext ((TQ3ObjectType)FOUR_CHAR_CODE('dctx'))
840 #define kQ3DrawContextTypePixmap ((TQ3ObjectType)FOUR_CHAR_CODE('dpxp'))
841 #define kQ3DrawContextTypeMacintosh ((TQ3ObjectType)FOUR_CHAR_CODE('dmac'))
842 #define kQ3DrawContextTypeWin32DC ((TQ3ObjectType)FOUR_CHAR_CODE('dw32'))
843 #define kQ3DrawContextTypeDDSurface ((TQ3ObjectType)FOUR_CHAR_CODE('ddds'))
844 #define kQ3DrawContextTypeX11 ((TQ3ObjectType)FOUR_CHAR_CODE('dx11'))
845 #define kQ3SharedTypeTexture ((TQ3ObjectType)FOUR_CHAR_CODE('txtr'))
846 #define kQ3TextureTypePixmap ((TQ3ObjectType)FOUR_CHAR_CODE('txpm'))
847 #define kQ3TextureTypeMipmap ((TQ3ObjectType)FOUR_CHAR_CODE('txmm'))
848 #define kQ3TextureTypeCompressedPixmap ((TQ3ObjectType)FOUR_CHAR_CODE('txcp'))
849 
850 #define kQ3SharedTypeFile ((TQ3ObjectType)FOUR_CHAR_CODE('file'))
851 #define kQ3SharedTypeStorage ((TQ3ObjectType)FOUR_CHAR_CODE('strg'))
852 #define kQ3StorageTypeMemory ((TQ3ObjectType)FOUR_CHAR_CODE('mems'))
853 #define kQ3MemoryStorageTypeHandle ((TQ3ObjectType)FOUR_CHAR_CODE('hndl'))
854 #define kQ3StorageTypeUnix ((TQ3ObjectType)FOUR_CHAR_CODE('uxst'))
855 #define kQ3UnixStorageTypePath ((TQ3ObjectType)FOUR_CHAR_CODE('unix'))
856 #define kQ3StorageTypeMacintosh ((TQ3ObjectType)FOUR_CHAR_CODE('macn'))
857 #define kQ3MacintoshStorageTypeFSSpec ((TQ3ObjectType)FOUR_CHAR_CODE('macp'))
858 #define kQ3StorageTypeWin32 ((TQ3ObjectType)FOUR_CHAR_CODE('wist'))
859 #define kQ3SharedTypeString ((TQ3ObjectType)FOUR_CHAR_CODE('strn'))
860 #define kQ3StringTypeCString ((TQ3ObjectType)FOUR_CHAR_CODE('strc'))
861 #define kQ3SharedTypeShapePart ((TQ3ObjectType)FOUR_CHAR_CODE('sprt'))
862 #define kQ3ShapePartTypeMeshPart ((TQ3ObjectType)FOUR_CHAR_CODE('spmh'))
863 #define kQ3MeshPartTypeMeshFacePart ((TQ3ObjectType)FOUR_CHAR_CODE('mfac'))
864 #define kQ3MeshPartTypeMeshEdgePart ((TQ3ObjectType)FOUR_CHAR_CODE('medg'))
865 #define kQ3MeshPartTypeMeshVertexPart ((TQ3ObjectType)FOUR_CHAR_CODE('mvtx'))
866 #define kQ3SharedTypeControllerState ((TQ3ObjectType)FOUR_CHAR_CODE('ctst'))
867 #define kQ3SharedTypeTracker ((TQ3ObjectType)FOUR_CHAR_CODE('trkr'))
868 #define kQ3SharedTypeViewHints ((TQ3ObjectType)FOUR_CHAR_CODE('vwhn'))
869 #define kQ3SharedTypeEndGroup ((TQ3ObjectType)FOUR_CHAR_CODE('endg'))
870 
871 /******************************************************************************
872  ** **
873  ** QuickDraw 3D System Routines **
874  ** **
875  *****************************************************************************/
876 #if CALL_NOT_IN_CARBON
885  TQ3Status
886  Q3Initialize(void);
887 
896  TQ3Status
897  Q3Exit(void);
898 
907  TQ3Boolean
908  Q3IsInitialized(void);
909 
918  TQ3Status
919  Q3GetVersion(unsigned long *majorRevision, unsigned long *minorRevision);
920 
934  TQ3Status
935  Q3GetReleaseVersion(unsigned long *releaseRevision);
936 
937  /******************************************************************************
938  ** **
939  ** ObjectClass Routines **
940  ** **
941  *****************************************************************************/
961  TQ3Status
962  Q3ObjectHierarchy_GetTypeFromString(TQ3ObjectClassNameString objectClassString,
963  TQ3ObjectType *objectClassType);
964 
977  TQ3Status
979  TQ3ObjectClassNameString objectClassString);
980 
992  TQ3Boolean
994 
1006  TQ3Boolean
1007  Q3ObjectHierarchy_IsNameRegistered(const char *objectClassName);
1008 
1013 #endif /* CALL_NOT_IN_CARBON */
1015  struct TQ3SubClassData
1016  {
1017  unsigned long
1018  numClasses; /* the # of subclass types found for a parent class */
1019  TQ3ObjectType *classTypes; /* an array containing the class types */
1020  };
1021  typedef struct TQ3SubClassData TQ3SubClassData;
1031 #if CALL_NOT_IN_CARBON
1040  TQ3Status
1042  TQ3SubClassData *subClassData);
1043 
1059  TQ3Status
1061 
1062  /******************************************************************************
1063  ** **
1064  ** Object Routines **
1065  ** **
1066  *****************************************************************************/
1075  TQ3Status
1076  Q3Object_Dispose(TQ3Object object);
1077 
1086  TQ3Object
1087  Q3Object_Duplicate(TQ3Object object);
1088 
1097  TQ3Status
1098  Q3Object_Submit(TQ3Object object, TQ3ViewObject view);
1099 
1108  TQ3Boolean
1109  Q3Object_IsDrawable(TQ3Object object);
1110 
1119  TQ3Boolean
1120  Q3Object_IsWritable(TQ3Object object, TQ3FileObject theFile);
1121 
1122  /******************************************************************************
1123  ** **
1124  ** Object Type Routines **
1125  ** **
1126  *****************************************************************************/
1136  Q3Object_GetType(TQ3Object object);
1137 
1147  Q3Object_GetLeafType(TQ3Object object);
1148 
1157  TQ3Boolean
1158  Q3Object_IsType(TQ3Object object, TQ3ObjectType theType);
1159 
1160  /******************************************************************************
1161  ** **
1162  ** Shared Object Routines **
1163  ** **
1164  *****************************************************************************/
1174  Q3Shared_GetType(TQ3SharedObject sharedObject);
1175 
1184  TQ3SharedObject
1185  Q3Shared_GetReference(TQ3SharedObject sharedObject);
1186 
1210  TQ3Boolean
1211  Q3Shared_IsReferenced(TQ3SharedObject sharedObject);
1212 
1237  unsigned long
1238  Q3Shared_GetEditIndex(TQ3SharedObject sharedObject);
1239 
1257  TQ3Status
1258  Q3Shared_Edited(TQ3SharedObject sharedObject);
1259 
1260  /******************************************************************************
1261  ** **
1262  ** Shape Routines **
1263  ** **
1264  *****************************************************************************/
1339  Q3Shape_GetType(TQ3ShapeObject shape);
1340 
1349  TQ3Status
1350  Q3Shape_GetSet(TQ3ShapeObject shape, TQ3SetObject *theSet);
1351 
1360  TQ3Status
1361  Q3Shape_SetSet(TQ3ShapeObject shape, TQ3SetObject theSet);
1362 
1371  TQ3Status
1372  Q3Shape_AddElement(TQ3ShapeObject shape, TQ3ElementType theType,
1373  const void *data);
1374 
1383  TQ3Status
1384  Q3Shape_GetElement(TQ3ShapeObject shape, TQ3ElementType theType, void *data);
1385 
1394  TQ3Boolean
1395  Q3Shape_ContainsElement(TQ3ShapeObject shape, TQ3ElementType theType);
1396 
1405  TQ3Status
1406  Q3Shape_GetNextElementType(TQ3ShapeObject shape, TQ3ElementType *theType);
1407 
1416  TQ3Status
1417  Q3Shape_EmptyElements(TQ3ShapeObject shape);
1418 
1427  TQ3Status
1428  Q3Shape_ClearElement(TQ3ShapeObject shape, TQ3ElementType theType);
1429 
1430  /******************************************************************************
1431  ** **
1432  ** Color Table Routines **
1433  ** **
1434  *****************************************************************************/
1443  TQ3Status
1444  Q3Bitmap_Empty(TQ3Bitmap *bitmap);
1445 
1454  unsigned long
1455  Q3Bitmap_GetImageSize(unsigned long width, unsigned long height);
1456 
1457 #endif /* CALL_NOT_IN_CARBON */
1458 
1459 #if PRAGMA_ENUM_ALWAYSINT
1460 #pragma enumsalwaysint reset
1461 #ifdef __QD3D__RESTORE_TWOBYTEINTS
1462 #pragma fourbyteints off
1463 #endif
1464 #elif PRAGMA_ENUM_OPTIONS
1465 #pragma option enum =reset
1466 #elif defined(__QD3D__RESTORE_PACKED_ENUMS)
1467 #pragma options(pack_enums)
1468 #endif
1469 
1470 #if PRAGMA_STRUCT_ALIGN
1471 #pragma options align = reset
1472 #elif PRAGMA_STRUCT_PACKPUSH
1473 #pragma pack(pop)
1474 #elif PRAGMA_STRUCT_PACK
1475 #pragma pack()
1476 #endif
1477 
1478 #ifdef PRAGMA_IMPORT_OFF
1479 #pragma import off
1480 #elif PRAGMA_IMPORT
1481 #pragma import reset
1482 #endif
1483 
1484 #ifdef __cplusplus
1485 }
1486 #endif
1487 
1488 #endif /* __QD3D__ */
Set up for compiler independent conditionals.
Basic Macintosh data types.
TQ3SetObject TQ3AttributeSet
Definition: QD3D.h:197
TQ3Boolean Q3Object_IsWritable(TQ3Object object, TQ3FileObject theFile)
TQ3ShapePartObject TQ3MeshPartObject
Definition: QD3D.h:224
TQ3Status Q3Exit(void)
TQ3Status Q3Object_Dispose(TQ3Object object)
TQ3Status Q3Shape_AddElement(TQ3ShapeObject shape, TQ3ElementType theType, const void *data)
TQ3Status Q3Shape_GetElement(TQ3ShapeObject shape, TQ3ElementType theType, void *data)
TQ3Boolean Q3Object_IsDrawable(TQ3Object object)
TQ3Status Q3Bitmap_Empty(TQ3Bitmap *bitmap)
TQ3Boolean Q3ObjectHierarchy_IsTypeRegistered(TQ3ObjectType objectClassType)
typedef CALLBACK_API_C(TQ3Status, TQ3XObjectUnregisterMethod)(TQ3XObjectClass objectClass)
TQ3ShaderObject TQ3SurfaceShaderObject
Definition: QD3D.h:243
TQ3ObjectType Q3Object_GetLeafType(TQ3Object object)
TQ3Status Q3GetVersion(unsigned long *majorRevision, unsigned long *minorRevision)
TQ3Object TQ3ElementObject
Definition: QD3D.h:162
TQ3MeshPartObject TQ3MeshFacePartObject
Definition: QD3D.h:231
TQ3GroupObject TQ3DisplayGroupObject
Definition: QD3D.h:237
TQ3Boolean Q3Shape_ContainsElement(TQ3ShapeObject shape, TQ3ElementType theType)
TQ3ObjectType Q3Object_GetType(TQ3Object object)
TQ3ComputeBounds
Definition: QD3D.h:628
long TQ3ObjectType
Definition: QD3D.h:152
TQ3Status Q3ObjectHierarchy_GetTypeFromString(TQ3ObjectClassNameString objectClassString, TQ3ObjectType *objectClassType)
TQ3ObjectType Q3Shape_GetType(TQ3ShapeObject shape)
TQ3Status Q3Shape_ClearElement(TQ3ShapeObject shape, TQ3ElementType theType)
unsigned long Q3Shared_GetEditIndex(TQ3SharedObject sharedObject)
TQ3Status Q3Shape_GetNextElementType(TQ3ShapeObject shape, TQ3ElementType *theType)
TQ3Status Q3Shape_GetSet(TQ3ShapeObject shape, TQ3SetObject *theSet)
TQ3SharedObject TQ3RendererObject
Definition: QD3D.h:181
TQ3Boolean Q3Shared_IsReferenced(TQ3SharedObject sharedObject)
TQ3Status Q3ObjectHierarchy_GetStringFromType(TQ3ObjectType objectClassType, TQ3ObjectClassNameString objectClassString)
unsigned long Q3Bitmap_GetImageSize(unsigned long width, unsigned long height)
struct OpaqueTQ3GroupPosition * TQ3GroupPosition
Definition: QD3D.h:248
TQ3Status Q3Shared_Edited(TQ3SharedObject sharedObject)
TQ3Status Q3GetReleaseVersion(unsigned long *releaseRevision)
TQ3Status Q3Shape_EmptyElements(TQ3ShapeObject shape)
TQ3ShapeObject TQ3GroupObject
Definition: QD3D.h:210
TQ3Boolean Q3ObjectHierarchy_IsNameRegistered(const char *objectClassName)
TQ3Status Q3Shape_SetSet(TQ3ShapeObject shape, TQ3SetObject theSet)
TQ3Status Q3ObjectHierarchy_GetSubClassData(TQ3ObjectType objectClassType, TQ3SubClassData *subClassData)
TQ3Status Q3Initialize(void)
TQ3ObjectType Q3Shared_GetType(TQ3SharedObject sharedObject)
long TQ3ElementType
Definition: QD3D.h:684
TQ3Boolean Q3IsInitialized(void)
TQ3Boolean Q3Object_IsType(TQ3Object object, TQ3ObjectType theType)
TQ3Status Q3ObjectHierarchy_EmptySubClassData(TQ3SubClassData *subClassData)
TQ3SharedObject Q3Shared_GetReference(TQ3SharedObject sharedObject)
TQ3Object Q3Object_Duplicate(TQ3Object object)
TQ3Status Q3Object_Submit(TQ3Object object, TQ3ViewObject view)
Definition: QD3D.h:587
Definition: QD3D.h:530
Definition: QD3D.h:599
Definition: QD3D.h:606
Definition: QD3D.h:465
Definition: QD3D.h:458
Definition: QD3D.h:563
Definition: QD3D.h:489
Definition: QD3D.h:494
Definition: QD3D.h:539
Definition: QD3D.h:547
Definition: QD3D.h:409
Definition: QD3D.h:415
Definition: QD3D.h:504
Definition: QD3D.h:593
Definition: QD3D.h:352
Definition: QD3D.h:358
Definition: QD3D.h:440
Definition: QD3D.h:385
Definition: QD3D.h:373
Definition: QD3D.h:365
Definition: QD3D.h:398
Definition: QD3D.h:446
Definition: QD3D.h:517
Definition: QD3D.h:1015
Definition: QD3D.h:422
Definition: QD3D.h:428
Definition: QD3D.h:339
Definition: QD3D.h:345
Definition: QD3D.h:478
Definition: RAVE.h:426