Annotation of Examples/3Dkit/Simple/SimpleShape.m, revision 1.1.1.1

1.1       root        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: static const RtFloat eightByEight[] = {8, 8, 8};
                     11: 
                     12: @implementation SimpleShape:N3DShape
                     13: - renderSelf:(RtToken)context
                     14: {
                     15:   RiGeometricApproximation( RI_TESSELATION, RI_PARAMETRIC,
                     16:                            eightByEight, RI_NULL );
                     17:   // generate a Torus
                     18:   RiTorus(0.8, 0.3, 0.0, 360.0, 360.0, RI_NULL);
                     19:   
                     20:   // comment out the above and uncomment the following lines to render a Teapot
                     21:   // RiScale(0.4, 0.4, 0.4);
                     22:   // RiGeometry("teapot", RI_NULL);
                     23:   
                     24:   return self;
                     25: }
                     26: @end
                     27:   

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.