TGLClip Abstract clipping shape - derives from TGLPhysicalShape Adds clip mode (inside/outside) and pure virtual method to approximate shape as set of planes. This plane set is used to perform interactive clipping using OpenGL clip planes.
enum TGLClip::EMode { | kOutside | |
kInside | ||
}; | ||
enum TGLPhysicalShape::EManip { | kTranslateX | |
kTranslateY | ||
kTranslateZ | ||
kTranslateAll | ||
kScaleX | ||
kScaleY | ||
kScaleZ | ||
kScaleAll | ||
kRotateX | ||
kRotateY | ||
kRotateZ | ||
kRotateAll | ||
kManipAll | ||
}; |
Construct a clip plane object, based on supplied 'plane', with initial manipulation pivot at 'center', with drawn extents (in local x/y axes) of 'extents' Plane can have center pivot translated in all directions, and rotated round center in X/Y axes , the in-plane axes. It cannot be scaled Note theorectically a plane is of course infinite - however we want to draw the object in viewer - so we fake it with a single GL face (polygon) - extents defines the width/depth of this - should be several times scene extents - see Setup().
Update clip plane object to follow passed 'plane' equation. Center pivot is shifted to nearest point on new plane.
Return set of planes (actually a single) describing this clip plane.