File:  [NeXTSTEP 3.3 examples] / Examples / AppKit / BackspaceViews / Teapot / Teapot.m
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs
Tue Apr 24 17:48:35 2018 UTC (8 years, 1 month ago) by root
Branches: NeXT, MAIN
CVS tags: NeXTSTEP33, HEAD
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
  

unix.superglobalmegacorp.com

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