home *** CD-ROM | disk | FTP | other *** search
/ Apple Developer Connection 1998 Fall: Game Toolkit / Disc.iso / SDKs / QuickTime Mac / PInterfaces / QD3DIO.p < prev    next >
Encoding:
Text File  |  1998-04-09  |  21.7 KB  |  526 lines  |  [TEXT/MPS ]

  1. {
  2.      File:        QD3DIO.p
  3.  
  4.      Contains:    QuickDraw 3D IO API                                                
  5.  
  6.      Version:    Technology:    Quickdraw 3D 1.5.4
  7.                  Release:    QuickTime 3.0
  8.  
  9.      Copyright:    © 1995-1998 by Apple Computer, Inc., all rights reserved.
  10.  
  11.      Bugs?:        Please include the the file and version information (from above) with
  12.                  the problem description.  Developers belonging to one of the Apple
  13.                  developer programs can submit bug reports to:
  14.  
  15.                      devsupport@apple.com
  16.  
  17. }
  18. {$IFC UNDEFINED UsingIncludes}
  19. {$SETC UsingIncludes := 0}
  20. {$ENDC}
  21.  
  22. {$IFC NOT UsingIncludes}
  23.  UNIT QD3DIO;
  24.  INTERFACE
  25. {$ENDC}
  26.  
  27. {$IFC UNDEFINED __QD3DIO__}
  28. {$SETC __QD3DIO__ := 1}
  29.  
  30. {$I+}
  31. {$SETC QD3DIOIncludes := UsingIncludes}
  32. {$SETC UsingIncludes := 1}
  33.  
  34. {$IFC UNDEFINED __QD3D__}
  35. {$I QD3D.p}
  36. {$ENDC}
  37.  
  38. {$IFC UNDEFINED __QD3DDRAWCONTEXT__}
  39. {$I QD3DDrawContext.p}
  40. {$ENDC}
  41. {$IFC UNDEFINED __QD3DVIEW__}
  42. {$I QD3DView.p}
  43. {$ENDC}
  44.  
  45.  
  46. {$PUSH}
  47. {$ALIGN POWER}
  48. {$LibExport+}
  49.  
  50. {*****************************************************************************
  51.  **                                                                              **
  52.  **                                    Basic Types                                 **                                                    
  53.  **                                                                              **
  54.  ****************************************************************************}
  55.  
  56. TYPE
  57.     TQ3Uns8                                = UInt8;
  58.     TQ3Int8                                = SInt8;
  59.     TQ3Uns16                            = UInt16;
  60.     TQ3Int16                            = SInt16;
  61.     TQ3Uns32                            = UInt32;
  62.     TQ3Int32                            = SInt32;
  63. {$IFC TARGET_RT_BIG_ENDIAN }
  64.     TQ3Uns64Ptr = ^TQ3Uns64;
  65.     TQ3Uns64 = RECORD
  66.         hi:                        UInt32;
  67.         lo:                        UInt32;
  68.     END;
  69.  
  70.     TQ3Int64Ptr = ^TQ3Int64;
  71.     TQ3Int64 = RECORD
  72.         hi:                        SInt32;
  73.         lo:                        UInt32;
  74.     END;
  75.  
  76. {$ELSEC}
  77.     TQ3Uns64 = RECORD
  78.         lo:                        UInt32;
  79.         hi:                        UInt32;
  80.     END;
  81.  
  82.     TQ3Int64 = RECORD
  83.         lo:                        UInt32;
  84.         hi:                        SInt32;
  85.     END;
  86.  
  87. {$ENDC}  {TARGET_RT_BIG_ENDIAN}
  88.  
  89.     TQ3Float32                            = Single;
  90.     TQ3Float64                            = Double;
  91.     TQ3Size                                = TQ3Uns32;
  92. {*****************************************************************************
  93.  **                                                                              **
  94.  **                                    File Types                                 **
  95.  **                                                                              **
  96.  ****************************************************************************}
  97.     TQ3FileModeMasks             = LONGINT;
  98. CONST
  99.     kQ3FileModeNormal            = {TQ3FileModeMasks}0;
  100.     kQ3FileModeStream            = {TQ3FileModeMasks}$01;
  101.     kQ3FileModeDatabase            = {TQ3FileModeMasks}$02;
  102.     kQ3FileModeText                = {TQ3FileModeMasks}$04;
  103.  
  104.  
  105. TYPE
  106.     TQ3FileMode                            = UInt32;
  107. {*****************************************************************************
  108.  **                                                                              **
  109.  **                                    Method Types                             **
  110.  **                                                                              **
  111.  ****************************************************************************}
  112. {
  113.  *    IO Methods
  114.  *
  115.  *    The IO system treats all objects as groups of typed information.
  116.  *    When you register your element or attribute, the "elementType" is the 
  117.  *    binary type of your object, the "elementName" the ascii type.
  118.  *    
  119.  *    All objects in the metafile are made up of a "root" or parent object which
  120.  *    defines the instantiated object type. You may define the format of your 
  121.  *    data any way you wish as long as you use the primitives types above and the
  122.  *    routines below.
  123.  *
  124.  *    Root Objects are often appended with additional child objects, called 
  125.  *    subobjects. You may append your object with other QuickDraw 3D objects.
  126.  *    
  127.  *    Writing is straightforward: an object traverses itself any other objects 
  128.  *    that make it up, then writes its own data. Writing uses two methods: 
  129.  *    TQ3XObjectTraverseMethod and TQ3XObjectWriteMethod.
  130.  *
  131.  *    The TQ3XObjectTraverseMethod method should:
  132.  *    + First, Determine if the data should be written 
  133.  *        - if you don't want to write out your object after examining your
  134.  *            data, return kQ3Success in your Traverse method without calling
  135.  *            any other submit calls.
  136.  *     + Next, calculate the size of your object on disk
  137.  *     + Gather whatever state from the view you need to preserve
  138.  *         - you may access the view state NOW, as the state of the
  139.  *             view duing your TQ3XObjectWriteMethod will not be valid. You may
  140.  *             pass a temporary buffer to your write method.
  141.  *     + Submit your view write data using Q3View_SubmitWriteData
  142.  *         - note that you MUST call this before any other "_Submit" call.
  143.  *         - you may pass in a "deleteMethod" for your data. This method
  144.  *             will be called whether or not your write method succeeds or fails.
  145.  *     + Submit your subobjects to the view
  146.  *     
  147.  *     The TQ3XObjectWriteMethod method should:
  148.  *     + Write your data format to the file using the primitives routines below.
  149.  *         - If you passed a "deleteMethod" in your Q3View_SubmitWriteData, that
  150.  *             method will be called upon exit of your write method.
  151.  *
  152.  *    Reading is less straightforward because your root object and
  153.  *    any subobjects must be read inside of your TQ3XObjectReadDataMethod. There 
  154.  *    is an implicit state contained in the file while reading, which you must 
  155.  *    be aware of. When you first enter the read method, you must physically 
  156.  *    read in your data format using the primitives routines until
  157.  *    
  158.  *    Q3File_IsEndOfData(file) == kQ3True
  159.  *    
  160.  *    Generally, your data format should be self-descriptive such that you do not
  161.  *    need to call Q3File_IsEndOfData to determine if you are done reading. 
  162.  *    However, this call is useful for determining zero-sized object or 
  163.  *    determining the end of an object's data.
  164.  *    
  165.  *    Once you have read in all the data, you may collect subobjects. A metafile
  166.  *    object ONLY has subobjects if it is in a container. The call
  167.  *    
  168.  *    Q3File_IsEndOfContainer(file)
  169.  *    
  170.  *    returns kQ3False if subobjects exist, and kQ3True if subobjects do not 
  171.  *    exist.
  172.  *    
  173.  *    At this point, you may use
  174.  *    
  175.  *    Q3File_GetNextObjectType
  176.  *    Q3File_IsNextObjectOfType
  177.  *    Q3File_ReadObject
  178.  *    Q3File_SkipObject
  179.  *    
  180.  *    to iterate through the subobjects until Q3File_IsEndOfContainer(file) 
  181.  *    is kQ3True.
  182.  * 
  183.  }
  184.  
  185. {
  186.  * IO Methods
  187.  }
  188.  
  189. CONST
  190.     kQ3XMethodTypeObjectFileVersion = 'vers';                    {  version  }
  191.     kQ3XMethodTypeObjectTraverse = 'trvs';                        {  byte count  }
  192.     kQ3XMethodTypeObjectTraverseData = 'trvd';                    {  byte count  }
  193.     kQ3XMethodTypeObjectWrite    = 'writ';                        {  Dump info to file  }
  194.     kQ3XMethodTypeObjectReadData = 'rddt';                        {  Read info from file into buffer or, attach read data to parent  }
  195.     kQ3XMethodTypeObjectRead    = 'read';
  196.     kQ3XMethodTypeObjectAttach    = 'attc';
  197.  
  198. {
  199.  *    TQ3XObjectTraverseMethod
  200.  *
  201.  *    For "elements" (meaning "attributes, too), you will be passed NULL for 
  202.  *    object. Sorry, custom objects will be available in the next major revision.
  203.  *
  204.  *    The "data" is a pointer to your internal element data.
  205.  *
  206.  *    The view is the current traversal view.
  207.  }
  208.  
  209. TYPE
  210. {$IFC TYPED_FUNCTION_POINTERS}
  211.     TQ3XObjectTraverseMethod = FUNCTION(object: TQ3Object; data: UNIV Ptr; view: TQ3ViewObject): TQ3Status; C;
  212. {$ELSEC}
  213.     TQ3XObjectTraverseMethod = ProcPtr;
  214. {$ENDC}
  215.  
  216. {
  217.  *  TQ3XObjectTraverseDataMethod
  218.  }
  219. {$IFC TYPED_FUNCTION_POINTERS}
  220.     TQ3XObjectTraverseDataMethod = FUNCTION(object: TQ3Object; data: UNIV Ptr; view: TQ3ViewObject): TQ3Status; C;
  221. {$ELSEC}
  222.     TQ3XObjectTraverseDataMethod = ProcPtr;
  223. {$ENDC}
  224.  
  225. {
  226.  *  TQ3XObjectWriteMethod
  227.  }
  228. {$IFC TYPED_FUNCTION_POINTERS}
  229.     TQ3XObjectWriteMethod = FUNCTION(object: UNIV Ptr; theFile: TQ3FileObject): TQ3Status; C;
  230. {$ELSEC}
  231.     TQ3XObjectWriteMethod = ProcPtr;
  232. {$ENDC}
  233.  
  234. {
  235.  *  Custom object writing 
  236.  }
  237. {$IFC TYPED_FUNCTION_POINTERS}
  238.     TQ3XDataDeleteMethod = PROCEDURE(data: UNIV Ptr); C;
  239. {$ELSEC}
  240.     TQ3XDataDeleteMethod = ProcPtr;
  241. {$ENDC}
  242.  
  243. FUNCTION Q3XView_SubmitWriteData(view: TQ3ViewObject; size: TQ3Size; data: UNIV Ptr; deleteData: TQ3XDataDeleteMethod): TQ3Status; C;
  244. FUNCTION Q3XView_SubmitSubObjectData(view: TQ3ViewObject; objectClass: TQ3XObjectClass; size: UInt32; data: UNIV Ptr; deleteData: TQ3XDataDeleteMethod): TQ3Status; C;
  245. {
  246.  *  TQ3XObjectReadMethod
  247.  }
  248.  
  249. TYPE
  250. {$IFC TYPED_FUNCTION_POINTERS}
  251.     TQ3XObjectReadMethod = FUNCTION(theFile: TQ3FileObject): TQ3Object; C;
  252. {$ELSEC}
  253.     TQ3XObjectReadMethod = ProcPtr;
  254. {$ENDC}
  255.  
  256. {
  257.  *    TQ3XObjectReadDataMethod
  258.  *
  259.  *  For "elements" (meaning "attributes", too), you must allocate stack space 
  260.  *    and call Q3Set_Add on "parentObject", which is an TQ3SetObject.
  261.  *
  262.  *    Otherwise, parentObject is whatever object your element is a subobject of...
  263.  }
  264. {$IFC TYPED_FUNCTION_POINTERS}
  265.     TQ3XObjectReadDataMethod = FUNCTION(parentObject: TQ3Object; theFile: TQ3FileObject): TQ3Status; C;
  266. {$ELSEC}
  267.     TQ3XObjectReadDataMethod = ProcPtr;
  268. {$ENDC}
  269.  
  270. {
  271.  *  TQ3XObjectAttachMethod
  272.  }
  273. {$IFC TYPED_FUNCTION_POINTERS}
  274.     TQ3XObjectAttachMethod = FUNCTION(childObject: TQ3Object; parentObject: TQ3Object): TQ3Status; C;
  275. {$ELSEC}
  276.     TQ3XObjectAttachMethod = ProcPtr;
  277. {$ENDC}
  278.  
  279.  
  280.  
  281. {*****************************************************************************
  282.  **                                                                              **
  283.  **                                Versioning                                     **
  284.  **                                                                              **
  285.  ****************************************************************************}
  286.     TQ3FileVersion                        = UInt32;
  287.  
  288. {*****************************************************************************
  289.  **                                                                              **
  290.  **                                File Routines                                 **
  291.  **                                                                              **
  292.  ****************************************************************************}
  293. {
  294.  * Creation and accessors
  295.  }
  296. FUNCTION Q3File_New: TQ3FileObject; C;
  297. FUNCTION Q3File_GetStorage(theFile: TQ3FileObject; VAR storage: TQ3StorageObject): TQ3Status; C;
  298. FUNCTION Q3File_SetStorage(theFile: TQ3FileObject; storage: TQ3StorageObject): TQ3Status; C;
  299. {
  300.  * Opening, and accessing "open" state, closing/cancelling
  301.  }
  302. FUNCTION Q3File_OpenRead(theFile: TQ3FileObject; VAR mode: TQ3FileMode): TQ3Status; C;
  303. FUNCTION Q3File_OpenWrite(theFile: TQ3FileObject; mode: TQ3FileMode): TQ3Status; C;
  304. FUNCTION Q3File_IsOpen(theFile: TQ3FileObject; VAR isOpen: TQ3Boolean): TQ3Status; C;
  305. FUNCTION Q3File_GetMode(theFile: TQ3FileObject; VAR mode: TQ3FileMode): TQ3Status; C;
  306. FUNCTION Q3File_GetVersion(theFile: TQ3FileObject; VAR version: TQ3FileVersion): TQ3Status; C;
  307. FUNCTION Q3File_Close(theFile: TQ3FileObject): TQ3Status; C;
  308. FUNCTION Q3File_Cancel(theFile: TQ3FileObject): TQ3Status; C;
  309. {
  310.  * Writing (Application)
  311.  }
  312. FUNCTION Q3View_StartWriting(view: TQ3ViewObject; theFile: TQ3FileObject): TQ3Status; C;
  313. FUNCTION Q3View_EndWriting(view: TQ3ViewObject): TQ3ViewStatus; C;
  314. {
  315.  * Reading (Application)
  316.  }
  317. FUNCTION Q3File_GetNextObjectType(theFile: TQ3FileObject): TQ3ObjectType; C;
  318. FUNCTION Q3File_IsNextObjectOfType(theFile: TQ3FileObject; ofType: TQ3ObjectType): TQ3Boolean; C;
  319. FUNCTION Q3File_ReadObject(theFile: TQ3FileObject): TQ3Object; C;
  320. FUNCTION Q3File_SkipObject(theFile: TQ3FileObject): TQ3Status; C;
  321. FUNCTION Q3File_IsEndOfData(theFile: TQ3FileObject): TQ3Boolean; C;
  322. FUNCTION Q3File_IsEndOfContainer(theFile: TQ3FileObject; rootObject: TQ3Object): TQ3Boolean; C;
  323. FUNCTION Q3File_IsEndOfFile(theFile: TQ3FileObject): TQ3Boolean; C;
  324. {    
  325.  *  External file references
  326.  }
  327. FUNCTION Q3File_MarkAsExternalReference(theFile: TQ3FileObject; sharedObject: TQ3SharedObject): TQ3Status; C;
  328. FUNCTION Q3File_GetExternalReferences(theFile: TQ3FileObject): TQ3GroupObject; C;
  329. {    
  330.  *  Tracking editing in read-in objects with custom elements
  331.  }
  332. FUNCTION Q3Shared_ClearEditTracking(sharedObject: TQ3SharedObject): TQ3Status; C;
  333. FUNCTION Q3Shared_GetEditTrackingState(sharedObject: TQ3SharedObject): TQ3Boolean; C;
  334. {    
  335.  *  Reading objects inside a group one-by-one
  336.  }
  337.  
  338. TYPE
  339.     TQ3FileReadGroupStateMasks     = LONGINT;
  340. CONST
  341.     kQ3FileReadWholeGroup        = {TQ3FileReadGroupStateMasks}0;
  342.     kQ3FileReadObjectsInGroup    = {TQ3FileReadGroupStateMasks}$01;
  343.     kQ3FileCurrentlyInsideGroup    = {TQ3FileReadGroupStateMasks}$02;
  344.  
  345.  
  346. TYPE
  347.     TQ3FileReadGroupState                = UInt32;
  348. FUNCTION Q3File_SetReadInGroup(theFile: TQ3FileObject; readGroupState: TQ3FileReadGroupState): TQ3Status; C;
  349. FUNCTION Q3File_GetReadInGroup(theFile: TQ3FileObject; VAR readGroupState: TQ3FileReadGroupState): TQ3Status; C;
  350.  
  351. {
  352.  * Idling
  353.  }
  354.  
  355. TYPE
  356. {$IFC TYPED_FUNCTION_POINTERS}
  357.     TQ3FileIdleMethod = FUNCTION(theFile: TQ3FileObject; idlerData: UNIV Ptr): TQ3Status; C;
  358. {$ELSEC}
  359.     TQ3FileIdleMethod = ProcPtr;
  360. {$ENDC}
  361.  
  362. FUNCTION Q3File_SetIdleMethod(theFile: TQ3FileObject; idle: TQ3FileIdleMethod; idleData: UNIV Ptr): TQ3Status; C;
  363.  
  364. {*****************************************************************************
  365.  **                                                                              **
  366.  **                                Primitives Routines                             **
  367.  **                                                                              **
  368.  ****************************************************************************}
  369. FUNCTION Q3NewLine_Write(theFile: TQ3FileObject): TQ3Status; C;
  370. FUNCTION Q3Uns8_Read(VAR data: TQ3Uns8; theFile: TQ3FileObject): TQ3Status; C;
  371. FUNCTION Q3Uns8_Write(data: ByteParameter; theFile: TQ3FileObject): TQ3Status; C;
  372. FUNCTION Q3Uns16_Read(VAR data: TQ3Uns16; theFile: TQ3FileObject): TQ3Status; C;
  373. FUNCTION Q3Uns16_Write(data: TQ3Uns16; theFile: TQ3FileObject): TQ3Status; C;
  374. FUNCTION Q3Uns32_Read(VAR data: TQ3Uns32; theFile: TQ3FileObject): TQ3Status; C;
  375. FUNCTION Q3Uns32_Write(data: TQ3Uns32; theFile: TQ3FileObject): TQ3Status; C;
  376. FUNCTION Q3Int8_Read(VAR data: TQ3Int8; theFile: TQ3FileObject): TQ3Status; C;
  377. FUNCTION Q3Int8_Write(data: TQ3Int8; theFile: TQ3FileObject): TQ3Status; C;
  378. FUNCTION Q3Int16_Read(VAR data: TQ3Int16; theFile: TQ3FileObject): TQ3Status; C;
  379. FUNCTION Q3Int16_Write(data: TQ3Int16; theFile: TQ3FileObject): TQ3Status; C;
  380. FUNCTION Q3Int32_Read(VAR data: TQ3Int32; theFile: TQ3FileObject): TQ3Status; C;
  381. FUNCTION Q3Int32_Write(data: TQ3Int32; theFile: TQ3FileObject): TQ3Status; C;
  382. FUNCTION Q3Uns64_Read(VAR data: TQ3Uns64; theFile: TQ3FileObject): TQ3Status; C;
  383. FUNCTION Q3Uns64_Write(data: TQ3Uns64; theFile: TQ3FileObject): TQ3Status; C;
  384. FUNCTION Q3Int64_Read(VAR data: TQ3Int64; theFile: TQ3FileObject): TQ3Status; C;
  385. FUNCTION Q3Int64_Write(data: TQ3Int64; theFile: TQ3FileObject): TQ3Status; C;
  386. FUNCTION Q3Float32_Read(VAR data: TQ3Float32; theFile: TQ3FileObject): TQ3Status; C;
  387. FUNCTION Q3Float32_Write(data: TQ3Float32; theFile: TQ3FileObject): TQ3Status; C;
  388. FUNCTION Q3Float64_Read(VAR data: TQ3Float64; theFile: TQ3FileObject): TQ3Status; C;
  389. FUNCTION Q3Float64_Write(data: TQ3Float64; theFile: TQ3FileObject): TQ3Status; C;
  390. FUNCTION Q3Size_Pad(size: TQ3Size): TQ3Size; C;
  391. {
  392.  * Pass a pointer to a buffer of kQ3StringMaximumLength bytes
  393.  }
  394. FUNCTION Q3String_Read(data: CStringPtr; VAR length: UInt32; theFile: TQ3FileObject): TQ3Status; C;
  395. FUNCTION Q3String_Write(data: ConstCStringPtr; theFile: TQ3FileObject): TQ3Status; C;
  396.  * This call will read Q3Size_Pad(size) bytes,
  397.  *    but only place size bytes into data.
  398.  }
  399. FUNCTION Q3RawData_Read(VAR data: UInt8; size: UInt32; theFile: TQ3FileObject): TQ3Status; C;
  400.  * This call will write Q3Size_Pad(size) bytes,
  401.  *    adding 0's to pad to the nearest 4 byte boundary.
  402.  }
  403. FUNCTION Q3RawData_Write({CONST}VAR data: UInt8; size: UInt32; theFile: TQ3FileObject): TQ3Status; C;
  404. {*****************************************************************************
  405.  **                                                                              **
  406.  **                        Convenient Primitives Routines                         **
  407.  **                                                                              **
  408.  ****************************************************************************}
  409. FUNCTION Q3Point2D_Read(VAR point2D: TQ3Point2D; theFile: TQ3FileObject): TQ3Status; C;
  410. FUNCTION Q3Point2D_Write({CONST}VAR point2D: TQ3Point2D; theFile: TQ3FileObject): TQ3Status; C;
  411. FUNCTION Q3Point3D_Read(VAR point3D: TQ3Point3D; theFile: TQ3FileObject): TQ3Status; C;
  412. FUNCTION Q3Point3D_Write({CONST}VAR point3D: TQ3Point3D; theFile: TQ3FileObject): TQ3Status; C;
  413. FUNCTION Q3RationalPoint3D_Read(VAR point3D: TQ3RationalPoint3D; theFile: TQ3FileObject): TQ3Status; C;
  414. FUNCTION Q3RationalPoint3D_Write({CONST}VAR point3D: TQ3RationalPoint3D; theFile: TQ3FileObject): TQ3Status; C;
  415. FUNCTION Q3RationalPoint4D_Read(VAR point4D: TQ3RationalPoint4D; theFile: TQ3FileObject): TQ3Status; C;
  416. FUNCTION Q3RationalPoint4D_Write({CONST}VAR point4D: TQ3RationalPoint4D; theFile: TQ3FileObject): TQ3Status; C;
  417. FUNCTION Q3Vector2D_Read(VAR vector2D: TQ3Vector2D; theFile: TQ3FileObject): TQ3Status; C;
  418. FUNCTION Q3Vector2D_Write({CONST}VAR vector2D: TQ3Vector2D; theFile: TQ3FileObject): TQ3Status; C;
  419. FUNCTION Q3Vector3D_Read(VAR vector3D: TQ3Vector3D; theFile: TQ3FileObject): TQ3Status; C;
  420. FUNCTION Q3Vector3D_Write({CONST}VAR vector3D: TQ3Vector3D; theFile: TQ3FileObject): TQ3Status; C;
  421. FUNCTION Q3Matrix4x4_Read(VAR matrix4x4: TQ3Matrix4x4; theFile: TQ3FileObject): TQ3Status; C;
  422. FUNCTION Q3Matrix4x4_Write({CONST}VAR matrix4x4: TQ3Matrix4x4; theFile: TQ3FileObject): TQ3Status; C;
  423. FUNCTION Q3Tangent2D_Read(VAR tangent2D: TQ3Tangent2D; theFile: TQ3FileObject): TQ3Status; C;
  424. FUNCTION Q3Tangent2D_Write({CONST}VAR tangent2D: TQ3Tangent2D; theFile: TQ3FileObject): TQ3Status; C;
  425. FUNCTION Q3Tangent3D_Read(VAR tangent3D: TQ3Tangent3D; theFile: TQ3FileObject): TQ3Status; C;
  426. FUNCTION Q3Tangent3D_Write({CONST}VAR tangent3D: TQ3Tangent3D; theFile: TQ3FileObject): TQ3Status; C;
  427. {    This call affects only text Files - it is a no-op in binary files }
  428. FUNCTION Q3Comment_Write(comment: CStringPtr; theFile: TQ3FileObject): TQ3Status; C;
  429. {*****************************************************************************
  430.  **                                                                              **
  431.  **                                Unknown Object                                 **
  432.  **                                                                              **
  433.  **        Unknown objects are generated when reading files which contain         **
  434.  **        custom data which has not been registered in the current             **
  435.  **        instantiation of QuickDraw 3D.                                         **
  436.  **                                                                              **
  437.  ****************************************************************************}
  438. FUNCTION Q3Unknown_GetType(unknownObject: TQ3UnknownObject): TQ3ObjectType; C;
  439. FUNCTION Q3Unknown_GetDirtyState(unknownObject: TQ3UnknownObject; VAR isDirty: TQ3Boolean): TQ3Status; C;
  440. FUNCTION Q3Unknown_SetDirtyState(unknownObject: TQ3UnknownObject; isDirty: TQ3Boolean): TQ3Status; C;
  441.  
  442. {*****************************************************************************
  443.  **                                                                              **
  444.  **                            Unknown Text Routines                             **
  445.  **                                                                              **
  446.  ****************************************************************************}
  447.  
  448. TYPE
  449.     TQ3UnknownTextDataPtr = ^TQ3UnknownTextData;
  450.     TQ3UnknownTextData = RECORD
  451.         objectName:                CStringPtr;                                {  '\0' terminated  }
  452.         contents:                CStringPtr;                                {  '\0' terminated  }
  453.     END;
  454.  
  455. FUNCTION Q3UnknownText_GetData(unknownObject: TQ3UnknownObject; VAR unknownTextData: TQ3UnknownTextData): TQ3Status; C;
  456. FUNCTION Q3UnknownText_EmptyData(VAR unknownTextData: TQ3UnknownTextData): TQ3Status; C;
  457.  
  458. {*****************************************************************************
  459.  **                                                                              **
  460.  **                            Unknown Binary Routines                             **
  461.  **                                                                              **
  462.  ****************************************************************************}
  463.  
  464. TYPE
  465.     TQ3UnknownBinaryDataPtr = ^TQ3UnknownBinaryData;
  466.     TQ3UnknownBinaryData = RECORD
  467.         objectType:                TQ3ObjectType;
  468.         size:                    UInt32;
  469.         byteOrder:                TQ3Endian;
  470.         contents:                CStringPtr;
  471.     END;
  472.  
  473. FUNCTION Q3UnknownBinary_GetData(unknownObject: TQ3UnknownObject; VAR unknownBinaryData: TQ3UnknownBinaryData): TQ3Status; C;
  474. FUNCTION Q3UnknownBinary_EmptyData(VAR unknownBinaryData: TQ3UnknownBinaryData): TQ3Status; C;
  475.  
  476. FUNCTION Q3UnknownBinary_GetTypeString(unknownObject: TQ3UnknownObject; VAR typeString: CStringPtr): TQ3Status; C;
  477. FUNCTION Q3UnknownBinary_EmptyTypeString(VAR typeString: CStringPtr): TQ3Status; C;
  478. {*****************************************************************************
  479.  **                                                                              **
  480.  **                            ViewHints routines                                 **
  481.  **                                                                              **
  482.  **        ViewHints are an object in a metafile to give you some hints on how     **
  483.  **        to render a scene.    You may create a view with any of the objects     **
  484.  **        retrieved from it, or you can just throw it away.                     **
  485.  **                                                                              **
  486.  **        To write a view hints to a file, create a view hints object from a     **
  487.  **        view and write the view hints.                                         **
  488.  **                                                                              **
  489.  ****************************************************************************}
  490. FUNCTION Q3ViewHints_New(view: TQ3ViewObject): TQ3ViewHintsObject; C;
  491. FUNCTION Q3ViewHints_SetRenderer(viewHints: TQ3ViewHintsObject; renderer: TQ3RendererObject): TQ3Status; C;
  492. FUNCTION Q3ViewHints_GetRenderer(viewHints: TQ3ViewHintsObject; VAR renderer: TQ3RendererObject): TQ3Status; C;
  493. FUNCTION Q3ViewHints_SetCamera(viewHints: TQ3ViewHintsObject; camera: TQ3CameraObject): TQ3Status; C;
  494. FUNCTION Q3ViewHints_GetCamera(viewHints: TQ3ViewHintsObject; VAR camera: TQ3CameraObject): TQ3Status; C;
  495. FUNCTION Q3ViewHints_SetLightGroup(viewHints: TQ3ViewHintsObject; lightGroup: TQ3GroupObject): TQ3Status; C;
  496. FUNCTION Q3ViewHints_GetLightGroup(viewHints: TQ3ViewHintsObject; VAR lightGroup: TQ3GroupObject): TQ3Status; C;
  497. FUNCTION Q3ViewHints_SetAttributeSet(viewHints: TQ3ViewHintsObject; attributeSet: TQ3AttributeSet): TQ3Status; C;
  498. FUNCTION Q3ViewHints_GetAttributeSet(viewHints: TQ3ViewHintsObject; VAR attributeSet: TQ3AttributeSet): TQ3Status; C;
  499. FUNCTION Q3ViewHints_SetDimensionsState(viewHints: TQ3ViewHintsObject; isValid: TQ3Boolean): TQ3Status; C;
  500. FUNCTION Q3ViewHints_GetDimensionsState(viewHints: TQ3ViewHintsObject; VAR isValid: TQ3Boolean): TQ3Status; C;
  501. FUNCTION Q3ViewHints_SetDimensions(viewHints: TQ3ViewHintsObject; width: UInt32; height: UInt32): TQ3Status; C;
  502. FUNCTION Q3ViewHints_GetDimensions(viewHints: TQ3ViewHintsObject; VAR width: UInt32; VAR height: UInt32): TQ3Status; C;
  503. FUNCTION Q3ViewHints_SetMaskState(viewHints: TQ3ViewHintsObject; isValid: TQ3Boolean): TQ3Status; C;
  504. FUNCTION Q3ViewHints_GetMaskState(viewHints: TQ3ViewHintsObject; VAR isValid: TQ3Boolean): TQ3Status; C;
  505. FUNCTION Q3ViewHints_SetMask(viewHints: TQ3ViewHintsObject; {CONST}VAR mask: TQ3Bitmap): TQ3Status; C;
  506. FUNCTION Q3ViewHints_GetMask(viewHints: TQ3ViewHintsObject; VAR mask: TQ3Bitmap): TQ3Status; C;
  507. { Call Q3Bitmap_Empty when done with the mask    }
  508. FUNCTION Q3ViewHints_SetClearImageMethod(viewHints: TQ3ViewHintsObject; clearMethod: TQ3DrawContextClearImageMethod): TQ3Status; C;
  509. FUNCTION Q3ViewHints_GetClearImageMethod(viewHints: TQ3ViewHintsObject; VAR clearMethod: TQ3DrawContextClearImageMethod): TQ3Status; C;
  510. FUNCTION Q3ViewHints_SetClearImageColor(viewHints: TQ3ViewHintsObject; {CONST}VAR color: TQ3ColorARGB): TQ3Status; C;
  511. FUNCTION Q3ViewHints_GetClearImageColor(viewHints: TQ3ViewHintsObject; VAR color: TQ3ColorARGB): TQ3Status; C;
  512.  
  513.  
  514. {$ALIGN RESET}
  515. {$POP}
  516.  
  517. {$SETC UsingIncludes := QD3DIOIncludes}
  518.  
  519. {$ENDC} {__QD3DIO__}
  520.  
  521. {$IFC NOT UsingIncludes}
  522.  END.
  523. {$ENDC}
  524.