This is ForestCamera.h in view mode; [Download] [Up]
// ForestCamera.h -- render a scene of 1 (or someday more) trees
#import <3Dkit/3Dkit.h>
#define TO_CAMERA 0
#define TO_WORLD 1
typedef enum {ANGLE, TWIST, SHRINK, BRANCHFACTOR, LEVELS} treeParameter;
// Note: SD is short for the random part (like but not precisely Std Deviation)
@interface ForestCamera:N3DCamera
{ int redraw_mode; // 1=continuous
int dirty;
// id's for sliders :
id angleText; id angleSlider; id SDangleText; id SDangleSlider;
id levelsText; id levelsSlider; id SDlevelsText; id SDlevelsSlider;
id twistText; id twistSlider; id SDtwistText; id SDtwistSlider;
id shrinkText; id shrinkSlider; id SDshrinkText; id SDshrinkSlider;
id branchFactorText; id SDbranchFactorText;
id branchFactorSlider; id SDbranchFactorSlider;
id theRotator;
id theTree;
}
- redrawNow :sender;
- dumpRib :sender;
// If Trees could be first-responders, these could be eliminated:
- newParameter :sender;
- redrawMode :sender;
- (int)redraw_mode;
- randomMode :sender;
@end
These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.