20 GlColorStack() : colorstack() {}
23 void Push(
double r,
double g,
double b,
double a=1.0 )
25 Push( Color(r,g,b,a) );
28 void Push( Color col )
30 colorstack.push( col );
31 glColor4f( col.r, col.g, col.b, col.a );
36 if( colorstack.size() < 1 )
37 PRINT_WARN1(
"Attempted to ColorStack.Pop() but ColorStack %p is empty",
41 Color& old = colorstack.top();
43 glColor4f( old.r, old.g, old.b, old.a );
48 {
return colorstack.size(); }
51 std::stack<Color> colorstack;
54 std::list<Model*> models_sorted;
56 Camera* current_camera;
58 PerspectiveCamera perspective_camera;
64 bool clicked_empty_space;
65 int empty_space_startx, empty_space_starty;
66 std::list<Model*> selected_models;
67 Model* last_selection;
72 void RecordRay(
double x1,
double y1,
double x2,
double y2 );
75 void DrawGlobalGrid();
77 void AddModel(
Model* mod );
78 void RemoveModel(
Model* mod );
123 virtual int handle(
int event );
124 void resize(
int X,
int Y,
int W,
int H);
127 double *wx,
double *wy,
double* wz );
139 { colorstack.Push( col ); }
141 void PushColor(
double r,
double g,
double b,
double a )
142 { colorstack.Push( r,g,b,a ); }
160 (fabs( camera.
pitch() ) < 0.1) ); }