This is NeXTView.h in view mode; [Download] [Up]
#import <appkit/appkit.h> #import "WireFrame.h" #import "Thinker.h" // this code is copyright Darcy Brockbank, 1993 // // You may freely reuse and distribute this code in any way shape or // form, provided that this notice stays intact. // // darcy@hasc.ca, samurai@cs.mcgill.ca // // StefView was implemented out of WorldSpaceView and retains some of the // movement properties... // // The code for WorldSpaceView was written by Sam Streeper at NeXT, I think, // and there were two other contributors, but I can't find their names in the // source for it. // // NeXTView shows a simple (ha!) spinning NeXTcube logo, in full 3D. The 3D code // came from an app I wrote a long time ago called "WireFrame", and so the code // is pretty scary. As well, this thing is only a quick hack, though a nice one. // // This thing has room for improvement, and if you do so, send me a copy! // // - darcy typedef struct { float l,b,r,t; } BRECT; @interface NeXTView:View { id buffer; id spot; id clearSpot; id sbuffer; float xpos; float ypos; BRECT old; NXPoint ballTo; NXPoint maxCoord; NXPoint redrawTo; NXRect redraw; NXSize oldSize; int framesPerSecond; int currentFrame; NXSize imageSize; BStimeval now, then; BStimeval nextRotationTime; id sharedInspectorPanel; Axis axis; Direction spin; Origin worldOrigin,localOrigin,curOrigin; float currentZoom; id list; float translationRate; NXColor backgroundColour; } - loadDir:(const char *)d; - draw; - oneStep; - sizeTo:(NXCoord)width :(NXCoord)height; - newViewSize; - (const char *)windowTitle; - loadWorld:(const char *)dir; - free; - tryToChangeCentre; - initFrame:(const NXRect *)rect; - firstObject; - setTranslationRate:sender; - setZoom:sender; - rotateZ:sender; - rotatez:sender; - rotateX:sender; - rotatex:sender; - rotateY:sender; - rotatey:sender; - addThisObject:anObject; @end
These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.