2010-09-01 10:37:10 +00:00
|
|
|
#ifndef CameraView_h
|
|
|
|
#define CameraView_h
|
|
|
|
|
2003-05-06 21:52:58 +00:00
|
|
|
#include <AppKit/AppKit.h>
|
2010-09-09 11:46:38 +00:00
|
|
|
|
|
|
|
#include "QF/mathlib.h"
|
|
|
|
|
2003-05-06 21:52:58 +00:00
|
|
|
#include "SetBrush.h"
|
2003-03-18 19:48:24 +00:00
|
|
|
|
2010-09-09 11:46:38 +00:00
|
|
|
#include "render.h"
|
|
|
|
|
2010-09-11 10:06:04 +00:00
|
|
|
extern id cameraview_i;
|
|
|
|
|
|
|
|
extern byte renderlist[1024 * 1024 * 4];
|
|
|
|
|
|
|
|
void CameraMoveto (vec3_t p);
|
|
|
|
void CameraLineto (vec3_t p);
|
|
|
|
|
|
|
|
extern BOOL timedrawing;
|
|
|
|
|
2010-09-11 23:14:08 +00:00
|
|
|
@interface CameraView:NSView
|
|
|
|
{
|
2010-09-11 10:06:04 +00:00
|
|
|
float xa, ya, za;
|
|
|
|
float move;
|
|
|
|
|
|
|
|
float *zbuffer;
|
|
|
|
unsigned *imagebuffer;
|
|
|
|
|
|
|
|
BOOL angleChange; // JR 6.8.95
|
|
|
|
|
|
|
|
vec3_t origin;
|
|
|
|
vec3_t matrix[3];
|
|
|
|
|
|
|
|
NSPoint dragspot;
|
|
|
|
|
|
|
|
drawmode_t drawmode;
|
|
|
|
|
2003-03-18 19:48:24 +00:00
|
|
|
// UI links
|
2010-09-11 10:06:04 +00:00
|
|
|
id mode_radio_i;
|
|
|
|
|
2003-03-18 19:48:24 +00:00
|
|
|
}
|
|
|
|
|
2010-09-11 10:06:04 +00:00
|
|
|
-setXYOrigin:(NSPoint *) pt;
|
|
|
|
-setZOrigin:(float) pt;
|
2003-03-18 19:48:24 +00:00
|
|
|
|
2010-09-11 10:06:04 +00:00
|
|
|
-setOrigin:(vec3_t)
|
|
|
|
org
|
2010-09-11 16:41:18 +00:00
|
|
|
angle:(float)angle;
|
2003-03-18 19:48:24 +00:00
|
|
|
|
2010-09-11 16:41:18 +00:00
|
|
|
-getOrigin:(vec3_t)org;
|
2003-03-18 19:48:24 +00:00
|
|
|
|
2010-09-11 10:06:04 +00:00
|
|
|
-(float) yawAngle;
|
2003-03-18 19:48:24 +00:00
|
|
|
|
2010-09-11 10:06:04 +00:00
|
|
|
-matrixFromAngles;
|
2010-09-11 16:41:18 +00:00
|
|
|
-_keyDown:(NSEvent *)theEvent;
|
2003-03-18 19:48:24 +00:00
|
|
|
|
2010-09-11 10:06:04 +00:00
|
|
|
-drawMode:sender;
|
|
|
|
-setDrawMode:(drawmode_t) mode;
|
2003-03-18 19:48:24 +00:00
|
|
|
|
2010-09-11 10:06:04 +00:00
|
|
|
-homeView:sender;
|
2003-03-18 19:48:24 +00:00
|
|
|
|
2010-09-11 10:06:04 +00:00
|
|
|
-XYDrawSelf; // for drawing viewpoint in XY view
|
|
|
|
-ZDrawSelf; // for drawing viewpoint in XY view
|
2010-09-11 16:41:18 +00:00
|
|
|
-(BOOL) XYmouseDown:(NSPoint *)pt flags:(int)flags;// return YES if brush handled
|
|
|
|
|
|
|
|
-(BOOL) ZmouseDown:(NSPoint *)pt flags:(int)flags;// return YES if brush handled
|
2010-09-11 10:06:04 +00:00
|
|
|
|
|
|
|
-upFloor:sender;
|
|
|
|
-downFloor:sender;
|
2003-03-18 19:48:24 +00:00
|
|
|
|
2010-09-11 10:06:04 +00:00
|
|
|
@end
|
|
|
|
#endif // CameraView_h
|