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

  1. // copyright 1993 Michael B. Johnson; some portions copyright 1994, MIT
  2. // see COPYRIGHT for reuse legalities
  3. //
  4.  
  5. #import <appkit/appkit.h>
  6. #import <3Dkit/3Dkit.h>
  7. #import <math.h>
  8. #import "WW3DCamera.h"
  9. #import "Protocol_WWRenderable.h"
  10.  
  11. @interface RIBCommand : Object < WWRenderable >
  12. {
  13.   RtBound    boundingBox;
  14.   BOOL       dirtyBoundingBox;
  15.   int        howManyPoints; // note that each subclass should set this appropriately...
  16.   int        n;
  17.   RtToken    *tokens;
  18.   char       **archiveVector;
  19.   int        *printfNVector;
  20.   int        *printfTypeVector;
  21.   RtPointer  *parms;
  22.  
  23.   id myShape; // this is a pointer to the shape which has this
  24.               // RIBCommand embedded in it.  In order to calculate it's 
  25.               // bounding box, it needs access to the 4x4s of this shape.
  26. }
  27.  
  28. - (void)setN:(int)newN tokens:(RtToken *)newTokens parms:(RtPointer *)newParms 
  29.         archiveVector:(char **)newArchiveVector printfTypeVector:(int *)newPrintfTypeVector printfNVector:(int *)newPrintfNVector;
  30.  
  31. - (int)n;
  32. - (RtToken *)tokens;
  33. - (RtPointer *)parms;
  34. - (char **)archiveVector;
  35. - (int *)printfNVector;
  36. - (int *)printfTypeVector;
  37. - getBoundingBox:(RtBound *)bbox;
  38.  
  39. - setMyShape:shape;
  40. - shape;
  41.  
  42. // the next two routines should only be used by subclasses...
  43. - writeParameterList:(NXStream *)stream;
  44. - writeParameterListForInventor:(NXStream *)stream atTabLevel:(int)tab;
  45.  
  46. @end
  47.  
  48. #define PI        (3.1415926535897932384626433)
  49. // just for name space niceness, I use wwPI also...
  50. #define wwPI        (3.1415926535897932384626433)
  51. #define DtoR         (wwPI/180.0)
  52. #define RtoD         (180.0/wwPI)
  53. #define    toDegrees(r)    ((r)*RtoD)
  54. #define    toRadians(d)    ((d)*DtoR)
  55. #define RI_BEZIER       "bezier"
  56. #define RI_BSPLINE       "b-spline"
  57.