home *** CD-ROM | disk | FTP | other *** search
/ Apple WWDC 1996 / WWDC96_1996 (CD).toast / Technology Materials / QuickTime VR / Windows / Samples / QD3DSample / Box3DSupport.h < prev    next >
Encoding:
C/C++ Source or Header  |  1996-05-03  |  2.3 KB  |  77 lines  |  [TEXT/LMAN]

  1. // Box3dSupport.c - QuickDraw 3d routines - interface
  2. //
  3. // This file contains
  4. //
  5. // Created 27th Dec 1994, Nick Thompson, DEVSUPPORT
  6. //
  7. // Modification History:
  8. //
  9. //    12/27/94        nick        initial version
  10.  
  11. #ifndef _BOX3DSUPPORT_H_
  12. #define _BOX3DSUPPORT_H_
  13.  
  14. #include <windows.h>
  15.  
  16. // QuickDraw 3D stuff
  17. #include "QD3D.h"            // QuickDraw 3D lives in here
  18. #include "QD3DIO.h"
  19. #include "QD3DErrors.h"
  20. #include "QD3DMath.h"
  21. #include "QD3DDrawContext.h"
  22. #include "QD3DShader.h"
  23. #include "QD3DTransform.h"
  24. #include "QD3DGroup.h"
  25. #include "QD3DRenderer.h"
  26. #include "QD3DCamera.h"
  27. #include "QD3DLight.h"
  28. #include "QD3DGeometry.h"
  29. #include "QD3DSet.h"
  30. #include "QD3DAcceleration.h"
  31. #include "QD3DStorage.h"
  32. #include "QD3DView.h"
  33.  
  34. enum
  35. {
  36.     kA3BtnZoom        = 1,
  37.     kA3BtnRotate,
  38.     kA3BtnPan
  39. };
  40.  
  41. struct _documentRecord
  42. {
  43.     TQ3Boolean        fControlStripVisible;    // if control strip is visible
  44.     TQ3ViewObject    fView ;                // the view for the scene
  45.     TQ3GroupObject    fModel ;            // object in the scene being modelled
  46.     TQ3StyleObject    fInterpolation ;    // interpolation style used when rendering
  47.     TQ3StyleObject    fBackFacing ;        // whether to draw shapes that face away from the camera
  48.     TQ3StyleObject    fFillStyle ;        // whether drawn as solid filled object or decomposed to components
  49.     TQ3Matrix4x4    fRotation;            // the transform for the model
  50.     TQ3ShaderObject    fIllumination;
  51.  
  52.     HWND            fWindow;            // destination window to blit offscreen buffer onto
  53.     unsigned long    fWidth;
  54.     unsigned long    fHeight;
  55.     HDC                fMemoryDC;            // memory device context for offscreen buffer
  56.     HBITMAP            fBitmap;            // offscreen bitmap to draw into (really a pixelmap)
  57.     void            *fBitStorage;        // storage for bits in offscreen bitmap (pixelmap)
  58.  
  59.     unsigned long    fViewerMode;        /* which button is active */
  60. };
  61.  
  62. typedef struct _documentRecord DocumentRec, *DocumentPtr ;
  63.  
  64. //---------------------------------------------------------------------------------------
  65.  
  66. TQ3ViewObject             MyNewView(DocumentPtr theDocument) ;
  67. TQ3DrawContextObject    MyNewDrawContext(DocumentPtr theDocument) ;
  68. TQ3CameraObject         MyNewCamera(DocumentPtr theDocument) ;
  69. TQ3GroupObject            MyNewLights(void) ;
  70. TQ3GroupObject             MyNewModel(void) ;
  71.  
  72. void pvCamera_Fit(DocumentPtr theDocument);
  73. void pvBBoxCenter(TQ3BoundingBox *bbox, TQ3Point3D *center);
  74. void pvBBox_Get(DocumentPtr theDocument, TQ3BoundingBox *bbox);
  75.  
  76. #endif
  77.