This is SchoolView.h in view mode; [Download] [Up]
/********************************************************************** SchoolView.h Author: David C. "Slam" Lambert Date: 1 February, 1993 **********************************************************************/ #import <appkit/View.h> struct boid { float x; float y; float xVel; float yVel; float xAcc; float yAcc; }; typedef struct boid BOID; #define BOID_X(b) ((b)->x) #define BOID_Y(b) ((b)->y) #define BOID_XVEL(b) ((b)->xVel) #define BOID_YVEL(b) ((b)->yVel) #define BOID_XACC(b) ((b)->xAcc) #define BOID_YACC(b) ((b)->yAcc) #define ABS(x) ((x>0.0)?x:-x) #define XDIFF(b0, b1) ((b0->x) - (b1->x)) #define YDIFF(b0, b1) ((b0->y) - (b1->y)) #define NORM(q1, q2) (sqrt(q1*q1 + q2*q2)) #define MIN_DIST (0.5) @interface SchoolView:View { int schoolCount; int goalChgFreq; BOOL hasColor; BOOL followMouse; float maxVel; float minVel; float distExp; float accLimit; float avoidFact; float matchFact; float targetFact; float minRadius; float centerFact; float momentum; float distComp; char *schoolString; char *oldString; float *coords; float *oldCoords; NXPoint goalPoint; BOID *theSchools; NXColor theBackColor; id theFont; id thePanel; id countField; id countSlider; id vMaxField; id vMaxSlider; id avoidField; id avoidSlider; id followSwitch; id targetImage; } + initialize; - initFrame:(const NXRect *)theFrame; - free; - setup; - oneStep; - setValues; - didLockFocus; - awakeFromNib; - writeDefaults; - inspector:sender; - takeValues:sender; - computeAccelerations; - (BOOL)useBufferedWindow; - (BOOL)ignoreMouseMovement; - sizeTo:(NXCoord)w :(NXCoord)h; - drawSelf:(const NXRect *)theRects :(int)rectCount; @end
These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.