55 #include "CartesianClippingNode.hh" 65 CartesianClippingNode::CartesianClippingNode(
BaseNode* _parent,
66 const std::string& _name )
69 set_cursor(
Vec3f( 0, 0, 0 ) );
81 if ( is_enabled( XY_PLANE ) )
89 xy_plane[3] = cursor_[2];
96 xy_plane[3] = -cursor_[2];
99 glClipPlane( GL_CLIP_PLANE0, xy_plane );
103 if ( is_enabled( YZ_PLANE ) )
105 GLdouble yz_plane[4];
111 yz_plane[3] = cursor_[0];
118 yz_plane[3] = -cursor_[0];
121 glClipPlane( GL_CLIP_PLANE1, yz_plane );
125 if ( is_enabled( XZ_PLANE ) )
127 GLdouble xz_plane[4];
133 xz_plane[3] = cursor_[1];
140 xz_plane[3] = -cursor_[1];
143 glClipPlane( GL_CLIP_PLANE2, xz_plane );
190 CartesianClippingNode::set_enabled(
Plane _plane )
200 CartesianClippingNode::is_enabled(
Plane _plane )
const 202 return ( enabled_ == _plane );
Vec3d eye() const
get eye point
void leave(GLState &_state, const DrawModes::DrawMode &_drawmode)
stop clipping
static void enable(GLenum _cap)
replaces glEnable, but supports locking
VectorT< float, 3 > Vec3f
const Vec3f & cursor() const
get position
void set_cursor(const Vec3f &_pos)
set position
static void disable(GLenum _cap)
replaces glDisable, but supports locking
Namespace providing different geometric functions concerning angles.
DrawMode NONE
not a valid draw mode
void enter(GLState &_state, const DrawModes::DrawMode &_drawmode)
begin clipping