/////////////////////////////////////////////////////////////
// CINEMA 4D SDK                                           //
/////////////////////////////////////////////////////////////
// (c) MAXON Computer GmbH, all rights reserved            //
/////////////////////////////////////////////////////////////

#ifndef __C4DBASEDRAW_H
#define __C4DBASEDRAW_H

#ifdef __API_INTERN__
abc def xyz
#endif

#include "ge_math.h"
#include "c4d_baselist.h"
#include "c4d_basecontainer.h"
#include "c4d_general.h"
#include "matrix4.h"

class BaseDrawHelp
{
	private:
		BaseDrawHelp();
		~BaseDrawHelp();
	public:
		BaseDocument	*GetDocument(void)             { return C4DOS.Br->BbGetDocument(this); }
		BaseTag				*GetActiveTag(void)            { return C4DOS.Br->BbGetActiveTag(this); }
		const Matrix&	GetMg(void)                    { return C4DOS.Br->BbGetMg(this); }
		BaseContainer	GetDisplay(void)               { BaseContainer bc; C4DOS.Br->BbGetDisplay(this,&bc); return bc; }
		void          SetDisplay(BaseContainer *bc)  { C4DOS.Br->BbSetDisplay(this,bc); }
		void					SetMg(const Matrix &mg)        { C4DOS.Br->BbSetMg(this,mg); }
		DRAWFLAGS			GetViewSchedulerFlags() const  { return C4DOS.Br->BbGetViewSchedulerFlags(this); }
		Bool					IsActive() const               { return C4DOS.Br->BbIsActive(this); }
		Bool					IsHighlight() const            { return C4DOS.Br->BbIsHighlight(this); }

		static BaseDrawHelp* Alloc(BaseDraw *bd, BaseDocument *doc);
		static void Free(BaseDrawHelp *&p);
};

#define SET_PEN_USE_PROFILE_COLOR						1

#define MAX_Z									1000000

#define VIEW_NEARCLIPPING			0.01

enum OITMODE
{
	OITMODE_OFF			= 0,
	OITMODE_FIRST		= 1,
	OITMODE_MIDDLE	= 2,
	OITMODE_LAST		= 3
} ENUM_END_LIST(OITMODE);

struct OITInfo 
{
	OITMODE		mode;
	LONG			lPass;
	C4DGLuint nDepthTexture;
	void*			pData;
	SVector4	vScaleOff;
};

struct BDSetSceneCameraMsg
{
	BaseObject* op;
	Bool animate; 
};

#define DRAW_STATISTIC_TRIANGLES					0
#define DRAW_STATISTIC_QUADS							1
#define DRAW_STATISTIC_LINES							2
#define DRAW_STATISTIC_POINTS							3
#define DRAW_STATISTIC_TRIANGLE_STRIPS		4
#define DRAW_STATISTIC_LINE_STRIPS				5

class BaseView : public BaseList2D
{
	private:
		BaseView();
		~BaseView();
	public:
		void GetFrame(LONG *cl, LONG *ct, LONG *cr, LONG *cb);
		void GetSafeFrame(LONG *cl, LONG *ct, LONG *cr, LONG *cb);
		void GetViewParameter(Vector *offset, Vector *scale, Vector *scale_z) const;
		Matrix GetMg(void) { return C4DOS.Bv->GetMg(this); }
		Matrix GetMi(void) { return C4DOS.Bv->GetMi(this); }
		const Matrix& GetBaseMatrix() const { return C4DOS.Bv->GetBaseMatrix(this); }
		void SetBaseMatrix(const Matrix &m) { C4DOS.Bv->SetBaseMatrix(this, m); }
		const Real GetPlanarRotation() const { return C4DOS.Bv->GetPlanarRotation(this); }
		void SetPlanarRotation(Real r) { C4DOS.Bv->SetPlanarRotation(this, r); }
		LONG GetProjection(void) { return C4DOS.Bv->GetProjection(this); }
		Bool TestPoint(Real x, Real y) { return C4DOS.Bv->TestPoint(this,x,y); }
		Bool TestPointZ(const Vector &p) { return C4DOS.Bv->TestPointZ(this,p); }
		Bool TestClipping3D(const Vector &mp, const Vector &rad, const Matrix &mg, Bool *clip2d, Bool *clipz);
		Bool ClipLine2D(Vector *p1, Vector *p2) { return C4DOS.Bv->ClipLine2D(this,p1,p2); }
		Bool ClipLineZ(Vector *p1, Vector *p2) { return C4DOS.Bv->ClipLineZ(this,p1,p2); }
		Vector WS(const Vector &p) { return C4DOS.Bv->WS(this,p); }
		Vector SW(const Vector &p) { return C4DOS.Bv->SW(this,p); }
		Vector SW_Reference(Real x, Real y, const Vector &wp) { return C4DOS.Bv->SW_R(this,x,y,wp); }
		Vector WC(const Vector &p) { return C4DOS.Bv->WC(this,p); }
		Vector CW(const Vector &p) { return C4DOS.Bv->CW(this,p); }
		Vector SC(const Vector &p) { return C4DOS.Bv->SC(this,p); }
		Vector CS(const Vector &p, Bool z_inverse) { return C4DOS.Bv->CS(this,p,z_inverse); }
		Vector WC_V(const Vector &v) { return C4DOS.Bv->WC_V(this,v); }
		Vector CW_V(const Vector &v) { return C4DOS.Bv->CW_V(this,v); }
		Bool BackfaceCulling(const Vector &n, const Vector &p) { return C4DOS.Bv->BackfaceCulling(this,n,p); }
		Bool ZSensitiveNear(void) { return C4DOS.Bv->ZSensitiveNear(this); }
		Real ZSensitiveNearClipping(void) { return C4DOS.Bv->ZSensitiveNearClipping(this); }
		StereoCameraInfo* GetStereoInfo() const { return C4DOS.Bv->GetStereoInfo(this); }
		Bool ZSensitiveFar(void) { return C4DOS.Bv->ZSensitiveFar(this); }
		Real ZSensitiveFarClipping(void) { return C4DOS.Bv->ZSensitiveFarClipping(this); }

		Real PW_S(Real z, Bool horizontal);										//Pixel Unit to World Unit with screen z
		Real WP_S(Real z, Bool horizontal);										//World Unit to Pixel Unit with screen z
		Real PW_W(const Vector &p, Bool horizontal);					//Pixel Unit at world position to World Unit
		Real WP_W(const Vector &p, Bool horizontal);					//World Unit at world position to Pixel Unit

		Vector ProjectPointOnLine(const Vector &p, const Vector &v, Real mouse_x, Real mouse_y, Real *offset = NULL, LONG *err = NULL);
		Vector ProjectPointOnPlane(const Vector &p, const Vector &v, Real mouse_x, Real mouse_y, LONG *err = NULL);
};

// for GetViewMatrix
#define DRAW_GET_VIEWMATRIX_PROJECTION						0
#define DRAW_GET_VIEWMATRIX_PROJECTION_LARGE_Z		1
#define DRAW_GET_VIEWMATRIX_INV_CAMERA						2
#define DRAW_GET_VIEWMATRIX_MODELVIEW_PROJECTION	3 // slow

class BaseDraw : public BaseView
{
	private:
		BaseDraw();
		~BaseDraw();

		// only access through GetParameter/SetParameter!!!
		BaseContainer GetData(void);
		void SetData(const BaseContainer &bc, Bool add=TRUE);
		BaseContainer* GetDataInstance(void);

	public:
		GeData GetParameterData(LONG id);

	public:
		static     BaseDraw* Alloc() { return C4DOS.Br->AllocBaseDraw(); }
		static     void Free(BaseDraw*& bd) { C4DOS.Br->FreeBaseDraw(bd); }

		LONG       GetFrameScreen(LONG *cl, LONG *ct, LONG *cr, LONG *cb); // runs only with activated OpenGL, -2: no OpenGL window, -1: offscreen view, 0: system error, 1: success
		Bool       HasCameraLink(void) { return C4DOS.Br->HasCameraLink(this); }
		void       SetSceneCamera(BaseObject *op, Bool animate = FALSE)  { C4DOS.Br->SetSceneCamera(this,op,animate); }
		BaseObject *GetSceneCamera(const BaseDocument *doc)  { return C4DOS.Br->GetSceneCamera(this,doc); }
		BaseObject *GetEditorCamera(void)  { return C4DOS.Br->GetEditorCamera(this); }
		DISPLAYFILTER GetDisplayFilter() { return C4DOS.Br->GetDisplayFilter(this); }
		DISPLAYEDITSTATE GetEditState() { return C4DOS.Br->GetEditState(this); }
		Bool IsViewOpen(BaseDocument *doc)  { return C4DOS.Br->IsViewOpen(this,doc); }

#define INIT_CLIPBOX_ADJUSTGLSIZE		1
		void InitClipbox(LONG left, LONG top, LONG right, LONG bottom, LONG flags) { C4DOS.Br->InitClipbox(this, left, top, right, bottom, flags); }
		void InitView(BaseContainer *camera, const Matrix &op_m, Real sv, Real pix_x, Real pix_y, Bool fitview) { C4DOS.Br->InitView(this, camera, op_m, sv, pix_x, pix_y, fitview); }
		void InitializeView(BaseDocument *doc, BaseObject *cam, Bool editorsv) { C4DOS.Br->InitializeView(this, doc, cam, editorsv); }
		void AddMessageHook(BaseDrawMessageHook fn) { C4DOS.Br->AddMessageHook(this, fn); }
		
		Bool AddToPostPass(BaseObject *op, BaseDrawHelp *bh)  { return C4DOS.Br->AddToPostPass(this,op,bh,0); }

		Vector GetObjectColor(BaseDrawHelp *bh, BaseObject *op, Bool lines = FALSE)  { return C4DOS.Br->GetObjectColor(this,op,bh,lines); }
		Vector CheckColor(const Vector &col)  { return C4DOS.Br->CheckColor(this,col); }
		
		void SetTransparency(LONG trans)  { C4DOS.Br->SetTransparency(this,trans); }
		LONG GetTransparency(void)  { return C4DOS.Br->GetTransparency(this); }
		
		Bool PointInRange(const Vector &p, LONG x, LONG y)  { return C4DOS.Br->PointInRange(this,p,x,y); }
		void SetPen(const Vector &col, LONG flags = 0)  { C4DOS.Br->SetPen(this,col,flags); }
		void SetPointSize(Real pointsize) { C4DOS.Br->SetPointSize(this,pointsize); }
		Vector ConvertColor(const Vector &c) { return C4DOS.Br->ConvertColor(this, c); }
		Vector ConvertColorReverse(const Vector &c) { return C4DOS.Br->ConvertColorReverse(this, c); }
		Real SimpleShade(const Vector &p, const Vector &n)  { return C4DOS.Br->SimpleShade(this,p,n); }

		void LineZOffset(LONG offset) { C4DOS.Br->LineZOffset(this,offset); }
		void SetDepth(Bool enable) { C4DOS.Br->SetDepth(this, enable); }
		void SetMatrix_Projection() { C4DOS.Br->SetMatrix_Projection(this); } // sets the projection matrix
		void SetMatrix_Screen() { C4DOS.Br->SetMatrix_Screen(this); } // sets the transformation matrix to screencoordinates
		void SetMatrix_Screen(LONG zoffset) { C4DOS.Br->SetMatrix_ScreenO(this, zoffset); } // sets the transformation matrix to screencoordinates
		void SetMatrix_Screen(LONG zoffset, const Matrix4* m) { C4DOS.Br->SetMatrix_ScreenOM(this, zoffset, m); } // sets the transformation matrix to screencoordinates
		void SetMatrix_Camera() { C4DOS.Br->SetMatrix_Camera(this); } // sets the transformation matrix to camerasystem
		void SetMatrix_Matrix(BaseObject *op,const Matrix &mg) { C4DOS.Br->SetMatrix_Matrix(this, op, mg); } // sets the transformation matrix to the given matrix
		void SetMatrix_Matrix(BaseObject *op,const Matrix &mg, LONG zoffset) { C4DOS.Br->SetMatrix_MatrixO(this, op, mg, zoffset); } // sets the transformation matrix to the given matrix
		void SetClipPlaneOffset(Real o) { C4DOS.Br->SetClipPlaneOffset(this, o); }
// flags for DrawLine,LineStrip,DrawHandle,DrawPoly,...
#define NOCLIP_D	1	// clip against the view border
#define NOCLIP_Z		2	// z clipping
		void LineStripBegin() { C4DOS.Br->LineStripBegin(this); }
		void LineStrip(const Vector &vp,const Vector &vc,LONG flags) { C4DOS.Br->LineStrip(this, vp, vc, flags); }
		void LineStripEnd() { C4DOS.Br->LineStripEnd(this); }

		void DrawPoint2D(const Vector &p)  { C4DOS.Br->DrawPoint2D(this,p); }
		void DrawLine2D(const Vector &p1, const Vector &p2)  { C4DOS.Br->DrawLine2D(this,p1,p2); }
		void DrawHandle2D(const Vector &p, DRAWHANDLE type=DRAWHANDLE_SMALL) { C4DOS.Br->DrawHandle2D(this,p,type); }
		void DrawCircle2D(LONG mx, LONG my, Real rad) { C4DOS.Br->DrawCircle2D(this,mx,my,rad); }
		void DrawHandle(const Vector &vp,DRAWHANDLE type,LONG flags) { C4DOS.Br->DrawHandle(this, vp, type, flags); }
		void DrawPointArray(LONG cnt, const SVector *vp, const SReal *vc = NULL, LONG colcnt = 0, const SVector *vn = NULL) { C4DOS.Br->DrawPointArray(this, cnt, vp, vc, colcnt, vn); }
		void DrawLine(const Vector &p1, const Vector &p2,LONG flags) { C4DOS.Br->DrawLine(this, p1, p2, flags); }
		void DrawArc(const Vector &pos, Real radius, Real angle_start, Real angle_end, LONG subdiv=32, LONG flags=0) { C4DOS.Br->DrawArc(this, pos, radius, angle_start, angle_end, subdiv, flags);  }
		void DrawPoly(Vector *vp,Vector *vf,Vector *vn,LONG anz,LONG flags) { C4DOS.Br->DrawPoly(this,vp,vf,vn,anz,flags); }
		void DrawTexture(const BaseBitmap *bmp, Vector *padr4, Vector *cadr, Vector *vnadr, Vector *uvadr, LONG pntcnt, DRAW_ALPHA alphamode, DRAW_TEXTUREFLAGS flags) { C4DOS.Br->DrawTexture(this,bmp,padr4,cadr,vnadr,uvadr,pntcnt,alphamode,flags); }
		void DrawTexture(C4DGLuint bmp, Vector *padr4, Vector *cadr, Vector *vnadr, Vector *uvadr, LONG pntcnt, DRAW_ALPHA alphamode) { C4DOS.Br->DrawTexture1(this,bmp,padr4,cadr,vnadr,uvadr,pntcnt,alphamode); }
		void DrawCircle(const Matrix &m) { C4DOS.Br->DrawCircle(this,m); }
		void DrawBox(const Matrix &m, Real size, const Vector &col, Bool wire) { C4DOS.Br->DrawBox(this,m,size,col,wire); }
		void DrawPolygon(Vector *p, Vector *f, Bool quad) { C4DOS.Br->DrawPolygon(this,p,f,quad); }
		void DrawSphere(const Vector &off, const Vector &size, const Vector &col, LONG flags) { C4DOS.Br->DrawSphere(this, off, size, col, flags); }
#define BDRAW_DRAW_SPHERE_FLAGS_NO_SHADING				1
		void DrawArrayEnd() { C4DOS.Br->DrawArrayEnd(this); }
		DRAWRESULT DrawPolygonObject(BaseDrawHelp *bh, BaseObject *op, DRAWOBJECT flags, BaseObject* parent=NULL, const Vector &col = Vector(.5)) { return C4DOS.Br->DrawPObject(this,bh,op,flags,DRAWPASS_OBJECT,parent,col); }
		DRAWRESULT DrawObject(BaseDrawHelp *bh, BaseObject *op, DRAWOBJECT flags, DRAWPASS drawpass, BaseObject* parent=NULL, const Vector &col = Vector(.5)) { return C4DOS.Br->DrawPObject(this,bh,op,flags|DRAWOBJECT_PRIVATE_ANY,drawpass,parent,col); }
		Bool DrawScene(LONG flags) { return C4DOS.Br->DrawScene(this, flags); }
		DISPLAYMODE GetReductionMode() const { return C4DOS.Br->GetReductionMode(this); }
		Bool GetHighlightPassColor(const BaseDrawHelp& bh, Bool lineObject, Vector &col) const { return C4DOS.Br->GetHighlightPassColor(this, bh, lineObject, col); }
		GlFrameBuffer* GetHighlightFramebuffer(const SVector& vMin = SVector(-1.0f), const SVector& vMax = SVector(1.0f)) { return C4DOS.Br->GetHighlightFramebuffer(this, vMin, vMax); }

		Bool InitDrawXORPolyLine() { return C4DOS.Br->InitDrawXORLine(this); }
		void FreeDrawXORPolyLine() { C4DOS.Br->FreeDrawXORLine(this); }
		void DrawXORPolyLine(const SReal* p, LONG cnt) { C4DOS.Br->DrawXORPolyLine(this, p, cnt); }
		void BeginDrawXORPolyLine() { C4DOS.Br->BeginDrawXORPolyLine(this); }
		void EndDrawXORPolyLine(Bool blit) { C4DOS.Br->EndDrawXORPolyLine(this, blit); }

		void SetLightList(LONG mode) { C4DOS.Br->SetLightList(this,mode); }
#define BDRAW_SETLIGHTLIST_NOLIGHTS				-1
#define BDRAW_SETLIGHTLIST_SCENELIGHTS		0
#define BDRAW_SETLIGHTLIST_QUICKSHADING		1

		void InitUndo(BaseDocument *doc) { C4DOS.Br->InitUndo(this,doc); }
		void DoUndo(BaseDocument *doc) { C4DOS.Br->DoUndo(this,doc); }

		void SetDrawParam(LONG id,const GeData &data) { C4DOS.Br->SetDrawParam(this,id,data); }
		GeData GetDrawParam(LONG id) { return C4DOS.Br->GetDrawParam(this,id); }
#define DRAW_PARAMETER_LINEWIDTH				1000	// [SET/GET] Real LineWidth
#define DRAW_PARAMETER_ALPHA_THRESHOLD	1002	// [SET/GET] Real 0 ... 1.0 (make sure to set old value after change!
#define DRAW_PARAMETER_SETZ							2
	#define DRAW_Z_LOWEREQUAL	0
	#define DRAW_Z_GREATER		1
	#define DRAW_Z_ALWAYS			2
	#define DRAW_Z_EQUAL			3
	#define DRAW_Z_LOWER			4
#define DRAW_PARAMETER_OGL_CULLING			10
	#define DRAW_PARAMETER_OGL_CULLING_OFF				0
	#define DRAW_PARAMETER_OGL_CULLING_FRONT			1
	#define DRAW_PARAMETER_OGL_CULLING_BACK				2
	#define DRAW_PARAMETER_OGL_CULLING_FRONT_AND_BACK 3
#define DRAW_PARAMETER_USE_Z						11

		// use with BASEDRAW_DRAWPORTTYPE
#define DRAWPORT_TYPE_SOFTWARE					0
//#define DRAWPORT_TYPE_OGL								1
#define DRAWPORT_TYPE_OGL_HQ						2

		Bool TestBreak() { return C4DOS.Br->TestBreak(this); }
		OITInfo& GetOITInfo() { return C4DOS.Br->GetOITInfo(this); }
		Bool GetFullscreenPolygonVectors(LONG &lAttributeCount, const GlVertexBufferAttributeInfo* const *&ppAttibuteInfo, LONG &lVectorInfoCount, const GlVertexBufferVectorInfo* const* &ppVectorInfo)
		{ return C4DOS.Br->GetFullscreenPolygonVectors(this, lAttributeCount, ppAttibuteInfo, lVectorInfoCount, ppVectorInfo); }
		Bool DrawFullscreenPolygon(LONG lVectorInfoCount, const GlVertexBufferVectorInfo* const* ppVectorInfo)
		{ return C4DOS.Br->DrawFullscreenPolygon(this, lVectorInfoCount, ppVectorInfo); }
		LONG GetGlLightCount() const { return C4DOS.Br->GetGlLightCount(this); }
		const GlLight* GetGlLight(LONG lIndex) const { return C4DOS.Br->GetGlLight(this, lIndex); }
		Bool GetDrawStatistics(BaseContainer &bc) const { return C4DOS.Br->GetDrawStatistics(this, bc); }
		DRAWPASS GetDrawPass() const { return C4DOS.Br->GetDrawPass(this); }

		const Matrix4& GetViewMatrix(LONG n);

		EditorWindow *GetEditorWindow()  { return C4DOS.Br->GetEditorWindow(this); }
		void SetTexture(BaseBitmap *bm, Bool tile, DRAW_ALPHA alphamode, DRAW_TEXTUREFLAGS flags) { return C4DOS.Br->SetTexture(this, bm, tile, alphamode, flags); }
		void OverrideCamera(StereoCameraInfo* si) { C4DOS.Bv->OverrideCamera(this, si); }

		void GetGridStep(Real &step, Real &fade) { C4DOS.Br->GetGridStep(this, step, fade); }
};

struct ViewportPixel
{
	BaseObject* op;   // the object
	Real z;           // z coordinate of current element
	LONG i;           // element index (may be point, polygon, edge (4*polygon+edge) or spline point (segment offset + point))
	ViewportPixel* next; // next element
};

#define VIEWPORT_CLEAR_POINT      1
#define VIEWPORT_CLEAR_POLYGON    2
#define VIEWPORT_CLEAR_EDGE       4

class ViewportSelect
{
	private:
		ViewportSelect();
		~ViewportSelect();
	public:
		static ViewportSelect* Alloc();
		static void Free(ViewportSelect *&p);

		static Bool PickObject(BaseDraw* bd, BaseDocument* doc, LONG x, LONG y, LONG rad, VIEWPORT_PICK_FLAGS flags, LassoSelection* ls, C4DObjectList* list, Matrix4* m = NULL);
		// the i member of ViewportPixel is unused; x1, x2, y1 and y2 are inclusive; VIEWPORT_PICK_FLAGS_ALLOW_OGL must be set
		static Bool PickObject(BaseDraw* bd, BaseDocument* doc, LONG x, LONG y, LONG rad, LONG &xr, LONG &yr, LONG &wr, LONG &hr, ViewportPixel **&pixels, VIEWPORT_PICK_FLAGS flags, LassoSelection* ls, C4DObjectList* list, Matrix4* m = NULL);
		static Bool PickObject(BaseDraw* bd, BaseDocument* doc, LONG x1, LONG y1, LONG x2, LONG y2, LONG &xr, LONG &yr, LONG &wr, LONG &hr, ViewportPixel **&pixels, VIEWPORT_PICK_FLAGS flags, LassoSelection* ls, C4DObjectList* list, Matrix4* m = NULL);

		Bool Init(LONG w, LONG h, BaseDraw* bd, BaseObject* op, LONG mode, Bool onlyvisible, VIEWPORTSELECTFLAGS flags = VIEWPORTSELECTFLAGS_0);
		Bool Init(LONG w, LONG h, BaseDraw* bd, AtomArray* ar, LONG mode, Bool onlyvisible, VIEWPORTSELECTFLAGS flags = VIEWPORTSELECTFLAGS_0);
		
		ViewportPixel* GetPixelInfoPoint(LONG x, LONG y);
		ViewportPixel* GetPixelInfoPolygon(LONG x, LONG y);
		ViewportPixel* GetPixelInfoEdge(LONG x, LONG y);
		ViewportPixel* GetNearestPoint(BaseObject* op, LONG &x, LONG &y, LONG maxrad = MAXLONGl, Bool onlyselected = FALSE, LONG* ignorelist = NULL, LONG ignorecnt = 0);
		ViewportPixel* GetNearestPolygon(BaseObject* op, LONG &x, LONG &y, LONG maxrad = MAXLONGl, Bool onlyselected = FALSE, LONG* ignorelist = NULL, LONG ignorecnt = 0);
		ViewportPixel* GetNearestEdge(BaseObject* op, LONG &x, LONG &y, LONG maxrad = MAXLONGl, Bool onlyselected = FALSE, LONG* ignorelist = NULL, LONG ignorecnt = 0);

		// points must be in camera space
		Bool DrawPolygon(const Vector* p, LONG ptcnt, LONG i, BaseObject* op, Bool onlyvisible = -1);
		Bool DrawHandle(const Vector& p, LONG i, BaseObject* op, Bool onlyvisible = -1);

		void ShowHotspot(EditorWindow *bw, LONG x, LONG y);
		void SetBrushRadius(LONG r);
		static void ShowHotspot(EditorWindow *bw, LONG x, LONG y, LONG rad, Bool bRemove);
		void ClearPixelInfo(LONG x, LONG y, UCHAR mask);
		Bool GetCameraCoordinates(Real x, Real y, Real z, Vector &v);
};

#endif
