// any module relying on imodel will need to link against the mathlib
#include"mathlib.h"
// state flags
#define DRAW_GL_FILL 0x0001
#define DRAW_GL_LIGHTING 0x0010
#define DRAW_GL_TEXTURE_2D 0x0100
#define DRAW_GL_BLEND 0x1000
// predefined state combinations
#define DRAW_GL_WIRE 0x0000
#define DRAW_GL_FLAT 0x0001
#define DRAW_GL_SOLID 0x0011
#define DRAW_GL_TEXTURED 0x0111
// mode
#define DRAW_WIRE 0
#define DRAW_SOLID 1
#define DRAW_TEXTURED 2
// render flags
#define DRAW_RF_NONE 0x0000
#define DRAW_RF_SEL_OUTLINE 0x0001
#define DRAW_RF_SEL_FILL 0x0010
#define DRAW_RF_XY 0x0011
#define DRAW_RF_CAM 0x0100
classIRender
{
public:
virtual~IRender(){}
virtualvoidIncRef()=0;// increments the reference counter for this object
virtualvoidDecRef()=0;// decrements the reference counter for this object, deletes the object if reference count is zero
virtualvoidDraw(intstate,intrflags)const=0;// render the object - state = the opengl state
virtualconstaabb_t*GetAABB()const=0;
};
classISelect
{
public:
virtual~ISelect(){}
virtualvoidIncRef()=0;// increments the reference counter for this object
virtualvoidDecRef()=0;// decrements the reference counter for this object, deletes the object if reference count is zero
virtualboolTestRay(constray_t*ray,vec_t*dist)const=0;// test ray intersection, return bool true if intersects, and store distance to closest point of intersection
//virtual bool TestBox(const aabb_t *aabb) const = 0; // test aabb intersection, return bool true if touching or intersecting
};
classIEdit
{
public:
virtual~IEdit(){}
virtualvoidIncRef()=0;// increments the reference counter for this object
virtualvoidDecRef()=0;// decrements the reference counter for this object, deletes the object if reference count is zero