home *** CD-ROM | disk | FTP | other *** search
/ NeXTSTEP 3.0 / NeXTSTEP3.0.iso / NextDeveloper / Examples / 3Dkit / Simple / SimpleShape.m < prev   
Text File  |  1992-06-02  |  552b  |  24 lines

  1. #import "SimpleShape.h"
  2. #import <ri/ri.h>
  3.  
  4. /*
  5.  *  You may freely copy, distribute and reuse the code in this example.
  6.  *  NeXT disclaims any warranty of any kind, expressed or implied,
  7.  *  as to its fitness for any particular use.
  8.  */
  9.  
  10. @implementation SimpleShape:N3DShape
  11. - renderSelf:(RtToken)context
  12. {
  13.   // generate a Torus
  14.   RiTorus(0.8, 0.3, 0.0, 360.0, 360.0, RI_NULL);
  15.   
  16.   // comment out the above and uncomment the following lines to render a Teapot
  17.   // RiScale(0.4, 0.4, 0.4);
  18.   // RiGeometry("teapot", RI_NULL);
  19.   
  20.   return self;
  21. }
  22. @end
  23.   
  24.