|
|
Sample Programs from NeXSTEP 3.3
#import "SimpleShape.h"
#import <ri/ri.h>
/*
* You may freely copy, distribute and reuse the code in this example.
* NeXT disclaims any warranty of any kind, expressed or implied,
* as to its fitness for any particular use.
*/
static const RtFloat eightByEight[] = {8, 8, 8};
@implementation SimpleShape:N3DShape
- renderSelf:(RtToken)context
{
RiGeometricApproximation( RI_TESSELATION, RI_PARAMETRIC,
eightByEight, RI_NULL );
// generate a Torus
RiTorus(0.8, 0.3, 0.0, 360.0, 360.0, RI_NULL);
// comment out the above and uncomment the following lines to render a Teapot
// RiScale(0.4, 0.4, 0.4);
// RiGeometry("teapot", RI_NULL);
return self;
}
@end
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.