|
|
Sample Programs from NeXSTEP 3.3
#import "Teapot.h"
#import <ri/ri.h>
static RtFloat resolution[] = {6, 6, 6};
@implementation Teapot : N3DShape
- renderSelf:(RtToken)context
{
RiGeometricApproximation( RI_TESSELATION, RI_PARAMETRIC,
resolution, RI_NULL );
RiRotate(-90,1,0,0);
RiTranslate(0,0,-0.5);
RiScale(0.3, 0.3, 0.3);
RiGeometry("teapot", RI_NULL);
return self;
}
- setResolution:(RtFloat)val
{
resolution[0] = resolution[1] = resolution[2] = val;
return self;
}
@end
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.