This is Cube.h in view mode; [Download] [Up]
/***************************************************************************** * * poly program : Cube.h nov 7 91 david stes * * a Cube is a Control containing exactly one CubeCell. the idea is to let a * user manipulate a cube with a dark (front) face that represents the window * on a 3d space. * * initially, the cube appears as a dark square. next, by clicking on a vertex * or a face, the user rotates the cube. it's possible to do a full turn * without a mouseup. * * instance vars * none. * * public methods * -initFrame:......................initializing a new Cube * -(BOOL)acceptsFirstMouse.........YES * -reset...........................set to frontview * -setmatrix:(float*)set...........copy 9 floats into cube tfmatrix * -getmatrix:(float*)get...........copy 9 floats from cube tfmatrix * -mouseDown.......................private version * -read * * code history * nov 8 91 : v0.0 stes create * jan24 92 : v0.1 stes inspectorname for ib * *****************************************************************************/ #import <appkit/Control.h> /* the Class we're subclassing */ #import <objc/objc.h> /* BOOL */ #import <appkit/graphics.h> /* NXRect,NXPoint etc. */ @interface Cube : Control { /* no instance variables */ } /* methods overriden from super */ - initFrame:(const NXRect *)frameRect; - (BOOL)acceptsFirstMouse; - mouseDown:(NXEvent *)theEvent; /* target-actions methods */ - reset :sender; /* reading and setting value */ - setmatrix:(float *)set; - getmatrix:(float *)get; - (const char *)inspectorName; @end
These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.