OpenSceneGraph 2.8.3
|
Node for defining the position of ClipPlanes in the scene. More...
Public Types | |
enum | ReferenceFrame { RELATIVE_RF, ABSOLUTE_RF } |
typedef std::vector< ref_ptr < ClipPlane > > | ClipPlaneList |
Public Member Functions | |
ClipNode () | |
ClipNode (const ClipNode &es, const CopyOp ©op=CopyOp::SHALLOW_COPY) | |
META_Node (osg, ClipNode) | |
void | setReferenceFrame (ReferenceFrame rf) |
Set the light sources's ReferenceFrame, either to be relative to its parent reference frame, or relative to an absolute coordinate frame. | |
ReferenceFrame | getReferenceFrame () const |
void | createClipBox (const BoundingBox &bb, unsigned int clipPlaneNumberBase=0) |
Creates six clip planes corresponding to the given BoundingBox. | |
bool | addClipPlane (ClipPlane *clipplane) |
Adds the clipplane. | |
bool | removeClipPlane (ClipPlane *clipplane) |
Removes the clipplane. | |
bool | removeClipPlane (unsigned int pos) |
Remove the ClipPlane with the given index. | |
unsigned int | getNumClipPlanes () const |
Returns the number of ClipPlanes. | |
ClipPlane * | getClipPlane (unsigned int pos) |
Get ClipPlane at the given index position. | |
const ClipPlane * | getClipPlane (unsigned int pos) const |
Get const ClipPlane at the given index position. | |
void | setClipPlaneList (const ClipPlaneList &cpl) |
Set the ClipPlaneList. | |
ClipPlaneList & | getClipPlaneList () |
Get the ClipPlaneList. | |
const ClipPlaneList & | getClipPlaneList () const |
Get the const ClipPlaneList. | |
void | setStateSetModes (StateSet &, StateAttribute::GLModeValue) const |
Set the GLModes for all ClipPlanes, on the StateSet. | |
void | setLocalStateSetModes (StateAttribute::GLModeValue=StateAttribute::ON) |
Set up the local StateSet. | |
virtual BoundingSphere | computeBound () const |
Compute the bounding sphere around Node's geometry or children. | |
Protected Member Functions | |
virtual | ~ClipNode () |
Protected Attributes | |
StateAttribute::GLModeValue | _value |
ClipPlaneList | _planes |
ReferenceFrame | _referenceFrame |
Node for defining the position of ClipPlanes in the scene.
typedef std::vector<ref_ptr<ClipPlane> > osg::ClipNode::ClipPlaneList |
osg::ClipNode::ClipNode | ( | ) |
virtual osg::ClipNode::~ClipNode | ( | ) | [protected, virtual] |
bool osg::ClipNode::addClipPlane | ( | ClipPlane * | clipplane | ) |
Adds the clipplane.
Returns true on success, and false if the plane has already been added, or if clipplane is NULL.
virtual BoundingSphere osg::ClipNode::computeBound | ( | ) | const [virtual] |
Compute the bounding sphere around Node's geometry or children.
This method is automatically called by getBound() when the bounding sphere has been marked dirty via dirtyBound().
Reimplemented from osg::Group.
void osg::ClipNode::createClipBox | ( | const BoundingBox & | bb, |
unsigned int | clipPlaneNumberBase = 0 |
||
) |
Creates six clip planes corresponding to the given BoundingBox.
ClipPlane* osg::ClipNode::getClipPlane | ( | unsigned int | pos | ) | [inline] |
Get ClipPlane at the given index position.
const ClipPlane* osg::ClipNode::getClipPlane | ( | unsigned int | pos | ) | const [inline] |
Get const ClipPlane at the given index position.
ClipPlaneList& osg::ClipNode::getClipPlaneList | ( | ) | [inline] |
Get the ClipPlaneList.
const ClipPlaneList& osg::ClipNode::getClipPlaneList | ( | ) | const [inline] |
Get the const ClipPlaneList.
unsigned int osg::ClipNode::getNumClipPlanes | ( | ) | const [inline] |
Returns the number of ClipPlanes.
ReferenceFrame osg::ClipNode::getReferenceFrame | ( | ) | const [inline] |
osg::ClipNode::META_Node | ( | osg | , |
ClipNode | |||
) |
bool osg::ClipNode::removeClipPlane | ( | unsigned int | pos | ) |
Remove the ClipPlane with the given index.
Returns true on success, false if pos is not a valid plane index.
bool osg::ClipNode::removeClipPlane | ( | ClipPlane * | clipplane | ) |
Removes the clipplane.
Returns true on success, false if clipplane isn't in this ClipNode.
void osg::ClipNode::setClipPlaneList | ( | const ClipPlaneList & | cpl | ) | [inline] |
Set the ClipPlaneList.
void osg::ClipNode::setLocalStateSetModes | ( | StateAttribute::GLModeValue | = StateAttribute::ON | ) |
Set up the local StateSet.
void osg::ClipNode::setReferenceFrame | ( | ReferenceFrame | rf | ) |
Set the light sources's ReferenceFrame, either to be relative to its parent reference frame, or relative to an absolute coordinate frame.
RELATIVE_RF is the default. Note: setting the ReferenceFrame to be ABSOLUTE_RF will also set the CullingActive flag on the light source, and hence all of its parents, to false, thereby disabling culling of it and all its parents. This is necessary to prevent inappropriate culling, but may impact cull times if the absolute light source is deep in the scene graph. It is therefore recommended to only use absolute light source at the top of the scene.
void osg::ClipNode::setStateSetModes | ( | StateSet & | , |
StateAttribute::GLModeValue | |||
) | const |
Set the GLModes for all ClipPlanes, on the StateSet.
ClipPlaneList osg::ClipNode::_planes [protected] |
ReferenceFrame osg::ClipNode::_referenceFrame [protected] |
StateAttribute::GLModeValue osg::ClipNode::_value [protected] |
![]() | Generated at Tue Mar 22 2011 13:20:21 for the OpenSceneGraph by doxygen 1.7.3. |