home *** CD-ROM | disk | FTP | other *** search
/ Stone Design / Stone Design.iso / Stone_Friends / Wave / WavesWorld / Source / IBPalettes / WW3DKit / WW3DCameraTemplate.h < prev    next >
Encoding:
Text File  |  1995-03-22  |  2.2 KB  |  64 lines

  1. // copyright 1993 Michael B. Johnson; some portions copyright 1994, MIT
  2. // see COPYRIGHT for reuse legalities
  3. //
  4.  
  5.  
  6. #import <appkit/appkit.h>
  7. #import <3Dkit/3Dkit.h>
  8.  
  9. @interface WW3DCameraTemplate:Object
  10. {
  11.     N3DProjectionType    projectionType;     /* perpective or orthographic */
  12.     BOOL                projectionTypeRecorded;
  13.     NXColor        backgroundColor; /* color of rectangle under RIB */
  14.     BOOL                backgroundColorRecorded;
  15.     BOOL                doesDrawBackgroundColor;
  16.     BOOL                doesDrawBackgroundColorRecorded;
  17.     N3DHider        hider;
  18.     BOOL                hiderRecorded;
  19.  
  20.     float               l, r, t, b;   // projectionRectangle;
  21.     BOOL                projectionRectangleRecorded;
  22.  
  23.     RtPoint        eyePoint, viewPoint;  /* view vector */
  24.     BOOL                eyePointRecorded;
  25.     BOOL                viewPointRecorded;
  26.     float        rollAngle;  /* neg. rot. about uBasis */
  27.     BOOL                rollAngleRecorded;
  28.     float        fieldOfView;
  29.     BOOL                fieldOfViewRecorded;
  30.     float        pixelAspectRatio;
  31.     BOOL                pixelAspectRatioRecorded;
  32.     float        nearPlane, farPlane;
  33.     BOOL                nearPlaneRecorded;
  34.     BOOL                farPlaneRecorded;
  35.     RtPoint        sBasis, tBasis, uBasis;  /* basis w.r.t. world space */
  36.     BOOL                sBasisRecorded;
  37.     BOOL                tBasisRecorded;
  38.     BOOL                uBasisRecorded;
  39.     
  40.     RtMatrix        preTransform;    /* pre-multiply the camera matrix by
  41.                     this matrix, if desired (cache for
  42.                     above object) */
  43.     BOOL                preTransformRecorded;
  44.     BOOL                usesPreTransformMatrix;
  45.     BOOL                usesPreTransformMatrixRecorded;
  46.     RtMatrix        transform; /* world-to-eye transformation:
  47.                     ct = Te . R, Te translates eye
  48.                     point to origin, R rotates view
  49.                     vector, V = view - eye, such
  50.                     that it is parallel with the
  51.                     z-axis, and rotates the resulting
  52.                     vector about the z-axis by
  53.                     -rollAngle. */
  54.     BOOL                transformRecorded;
  55.     RtFloat             fStop, focalLength, focalDistance;
  56.     BOOL                fStopRecorded;
  57.     BOOL                focalLengthRecorded;
  58.     BOOL                focalDistanceRecorded;
  59. }
  60.  
  61. - applyToCamera:aCamera;
  62.  
  63. @end
  64.