52 #include "OSDTransformNode.hh" 67 void OSDTransformNode::enterOSD( GLState &_state,
const DrawModes::DrawMode &_drawMode )
69 _state.push_modelview_matrix();
71 int left, bottom, width, height;
72 _state.get_viewport( left, bottom, width, height );
74 double aspect = _state.aspect();
76 _state.push_projection_matrix();
77 _state.reset_projection();
79 _state.perspective( 45.0, aspect, 0.8, 20.0 );
81 _state.push_modelview_matrix();
82 _state.reset_modelview();
84 double posX = left + center_[0] * width;
85 double posY = bottom + center_[1] * height;
89 _state.pop_modelview_matrix();
97 _state.set_modelview( modelview );
98 _state.
translate( pos[0], pos[1], pos[2], MULT_FROM_LEFT );
105 void OSDTransformNode::leaveOSD( GLState &_state,
const DrawModes::DrawMode &_drawMode )
107 _state.pop_projection_matrix();
108 _state.pop_modelview_matrix();
Namespace providing different geometric functions concerning angles.
void translate(Scalar _x, Scalar _y, Scalar _z, MultiplyFrom _mult_from=MULT_FROM_RIGHT)
multiply self with translation matrix (x,y,z)
GLMatrixT< double > GLMatrixd
typedef