#ifndef RTS_GLOBJ_H #define RTS_GLOBJ_H #include "objJedi.h" #include #include #include #include using namespace std; #define BUFSIZE 20000 #define OBJ_NOT_SELECTED 0x0000 #define OBJ_SELECTED 0x0001 #define OBJ_SELECTED_PRIMITIVES 0x0002 #define RTS_GLOBJ_SINGLE_NEW_SELECTION 0 #define RTS_GLOBJ_SINGLE_ADD_SELECTION 1 #define RTS_GLOBJ_SINGLE_SUB_SELECTION 2 #define RTS_GLOBJ_MULTI_NEW_SELECTION 3 #define RTS_GLOBJ_MULTI_ADD_SELECTION 4 #define RTS_GLOBJ_MULTI_SUB_SELECTION 5 class rts_glOBJ : public rtsOBJ { private: int is_selected; //the object, or part of the object, is selected list selected_primitives; //rendering variables GLint dl; bool dl_valid; //true if the display list is valid OBJint f_CreateDisplayList(); void f_RenderPointList(unsigned int pointlist); void f_RenderLineStrip(unsigned int line); void f_RenderFace(unsigned int face); OBJint f_RenderTexCoord(vertex_texture &texcoord); OBJint f_RenderNormal(vertex_normal &normal); OBJint f_RenderVertex(vertex_position &v); OBJint f_RenderPrimitive(unsigned int id); void SelectMultipleHits(GLuint* buffer, unsigned int num_hits); void SelectClosestHit(GLuint* buffer, unsigned int num_hits); void SelectPrimitive(unsigned int primitive); void UnselectMultipleHits(GLuint* buffer, unsigned int num_hits); void UnselectClosestHit(GLuint* buffer, unsigned int num_hits); void UnselectPrimitive(unsigned int primitive); public: //constructors //basic rts_glOBJ() { is_selected = false; dl_valid = false; cout<