home *** CD-ROM | disk | FTP | other *** search
/ NeXTSTEP 3.0 / NeXTSTEP3.0.iso / NextDeveloper / Examples / AppKit / BackspaceViews / Teapot / Teapot.m < prev    next >
Encoding:
Text File  |  1992-06-08  |  466 b   |  28 lines

  1. #import "Teapot.h"
  2. #import <ri/ri.h>
  3.  
  4. static RtFloat resolution[] = {6, 6, 6};
  5.  
  6. @implementation Teapot : N3DShape
  7. - renderSelf:(RtToken)context
  8. {
  9.     RiGeometricApproximation( RI_TESSELATION, RI_PARAMETRIC,
  10.                 resolution, RI_NULL );
  11.  
  12.     RiRotate(-90,1,0,0);
  13.     RiTranslate(0,0,-0.5);
  14.     RiScale(0.3, 0.3, 0.3);
  15.     RiGeometry("teapot", RI_NULL);
  16.   
  17.   return self;
  18. }
  19.  
  20. - setResolution:(RtFloat)val
  21. {
  22.     resolution[0] = resolution[1] = resolution[2] = val;
  23.     return self;
  24. }
  25.  
  26. @end
  27.   
  28.