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-29 20:09:11 +00:00
|
|
|
extern id cameraview_i;
|
2010-09-11 10:06:04 +00:00
|
|
|
|
2010-09-29 20:09:11 +00:00
|
|
|
extern byte renderlist[1024 * 1024 * 4];
|
2010-09-11 10:06:04 +00:00
|
|
|
|
|
|
|
void CameraMoveto (vec3_t p);
|
|
|
|
void CameraLineto (vec3_t p);
|
|
|
|
|
2010-09-29 20:09:11 +00:00
|
|
|
extern BOOL timedrawing;
|
2010-09-11 10:06:04 +00:00
|
|
|
|
2010-09-29 20:09:11 +00:00
|
|
|
@interface CameraView: NSView
|
2010-09-11 23:14:08 +00:00
|
|
|
{
|
2010-09-29 20:09:11 +00:00
|
|
|
float xa, ya, za;
|
|
|
|
float move;
|
2010-09-11 10:06:04 +00:00
|
|
|
|
2010-09-29 20:09:11 +00:00
|
|
|
float *zbuffer;
|
|
|
|
unsigned *imagebuffer;
|
2010-09-11 10:06:04 +00:00
|
|
|
|
2010-09-29 20:09:11 +00:00
|
|
|
BOOL angleChange; // JR 6.8.95
|
2010-09-11 10:06:04 +00:00
|
|
|
|
2010-09-29 20:09:11 +00:00
|
|
|
vec3_t origin;
|
|
|
|
vec3_t matrix[3];
|
2010-09-11 10:06:04 +00:00
|
|
|
|
2010-09-29 20:09:11 +00:00
|
|
|
NSPoint dragspot;
|
2010-09-11 10:06:04 +00:00
|
|
|
|
|
|
|
drawmode_t drawmode;
|
|
|
|
|
2010-09-29 20:09:11 +00:00
|
|
|
NSBezierPath *xycamera;
|
|
|
|
NSBezierPath *xycamera_aim;
|
|
|
|
NSBezierPath *zcamera;
|
2010-09-23 04:29:12 +00:00
|
|
|
|
2003-03-18 19:48:24 +00:00
|
|
|
// UI links
|
2010-09-29 20:09:11 +00:00
|
|
|
id mode_radio_i;
|
2003-03-18 19:48:24 +00:00
|
|
|
}
|
|
|
|
|
2010-09-29 20:09:11 +00:00
|
|
|
- (id) setXYOrigin: (NSPoint *)pt;
|
|
|
|
- (id) setZOrigin: (float)pt;
|
2003-03-18 19:48:24 +00:00
|
|
|
|
2010-09-29 20:09:11 +00:00
|
|
|
- (id) setOrigin: (vec3_t)org
|
|
|
|
angle: (float)angle;
|
2003-03-18 19:48:24 +00:00
|
|
|
|
2010-09-29 20:09:11 +00:00
|
|
|
- (id) getOrigin: (vec3_t)org;
|
2003-03-18 19:48:24 +00:00
|
|
|
|
2010-09-29 20:09:11 +00:00
|
|
|
- (float) yawAngle;
|
2003-03-18 19:48:24 +00:00
|
|
|
|
2010-09-29 20:09:11 +00:00
|
|
|
- (id) matrixFromAngles;
|
|
|
|
- (id) _keyDown: (NSEvent *)theEvent;
|
2003-03-18 19:48:24 +00:00
|
|
|
|
2010-09-29 20:09:11 +00:00
|
|
|
- (id) drawMode: sender;
|
|
|
|
- (id) setDrawMode: (drawmode_t)mode;
|
2003-03-18 19:48:24 +00:00
|
|
|
|
2010-09-29 20:09:11 +00:00
|
|
|
- (id) homeView: sender;
|
2003-03-18 19:48:24 +00:00
|
|
|
|
2010-09-28 19:43:35 +00:00
|
|
|
- (void) XYDrawSelf; // for drawing viewpoint in XY view
|
|
|
|
- (void) ZDrawSelf; // for drawing viewpoint in XY view
|
2010-09-29 20:09:11 +00:00
|
|
|
- (BOOL) XYmouseDown: (NSPoint *)pt // return YES if brush handled
|
|
|
|
flags: (int)flags;
|
2010-09-11 16:41:18 +00:00
|
|
|
|
2010-09-29 20:09:11 +00:00
|
|
|
- (BOOL) ZmouseDown: (NSPoint *)pt // return YES if brush handled
|
|
|
|
flags: (int)flags;
|
2010-09-11 10:06:04 +00:00
|
|
|
|
2010-09-29 20:09:11 +00:00
|
|
|
- (id) upFloor: sender;
|
|
|
|
- (id) downFloor: sender;
|
2003-03-18 19:48:24 +00:00
|
|
|
|
2010-09-11 10:06:04 +00:00
|
|
|
@end
|
|
|
|
#endif // CameraView_h
|