home *** CD-ROM | disk | FTP | other *** search
- #import <appkit/appkit.h>
- #import "CFWireFrame.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 CreepyFace, I think,
- // and there were two other contributors, but I can't find their names in the
- // source for it.
- //
- // CreepyFaceView shows a simple (ha!) spinning CreepyFace logo, in full 3D. The 3D code
- // came from an app I wrote a long time ago called "CFWireFrame", 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 CreepyFaceView: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
-