49 #include "CartesianClippingNode.hh" 59 CartesianClippingNode::CartesianClippingNode(
BaseNode* _parent,
60 const std::string& _name )
63 set_cursor(
Vec3f( 0, 0, 0 ) );
75 if ( is_enabled( XY_PLANE ) )
83 xy_plane[3] = cursor_[2];
90 xy_plane[3] = -cursor_[2];
93 glClipPlane( GL_CLIP_PLANE0, xy_plane );
97 if ( is_enabled( YZ_PLANE ) )
105 yz_plane[3] = cursor_[0];
112 yz_plane[3] = -cursor_[0];
115 glClipPlane( GL_CLIP_PLANE1, yz_plane );
119 if ( is_enabled( XZ_PLANE ) )
121 GLdouble xz_plane[4];
127 xz_plane[3] = cursor_[1];
134 xz_plane[3] = -cursor_[1];
137 glClipPlane( GL_CLIP_PLANE2, xz_plane );
184 CartesianClippingNode::set_enabled( Plane _plane )
194 CartesianClippingNode::is_enabled( Plane _plane )
const 196 return ( enabled_ == _plane );
const Vec3f & cursor() const
get position
Namespace providing different geometric functions concerning angles.
void enter(GLState &_state, const DrawModes::DrawMode &_drawmode) override
begin clipping
static void disable(GLenum _cap, bool _warnRemoved=true)
replaces glDisable, but supports locking
VectorT< float, 3 > Vec3f
void set_cursor(const Vec3f &_pos)
set position
void leave(GLState &_state, const DrawModes::DrawMode &_drawmode) override
stop clipping
DrawMode NONE
not a valid draw mode
static void enable(GLenum _cap, bool _warnRemoved=true)
replaces glEnable, but supports locking
Vec3d eye() const
get eye point