Added ClipNode::set/getReferenceFrame();
This commit is contained in:
@@ -34,10 +34,31 @@ class OSG_EXPORT ClipNode : public Group
|
||||
|
||||
META_Node(osg, ClipNode);
|
||||
|
||||
enum ReferenceFrame
|
||||
{
|
||||
RELATIVE_RF,
|
||||
ABSOLUTE_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 setReferenceFrame(ReferenceFrame rf);
|
||||
|
||||
ReferenceFrame getReferenceFrame() const { return _referenceFrame; }
|
||||
|
||||
|
||||
/** Creates six clip planes corresponding to the given BoundingBox. */
|
||||
void createClipBox(const BoundingBox& bb,unsigned int clipPlaneNumberBase=0);
|
||||
|
||||
|
||||
/** Adds the clipplane. Returns true on success, and false if the plane
|
||||
* has already been added, or if clipplane is NULL. */
|
||||
bool addClipPlane(ClipPlane* clipplane);
|
||||
@@ -81,8 +102,10 @@ class OSG_EXPORT ClipNode : public Group
|
||||
|
||||
virtual ~ClipNode();
|
||||
|
||||
StateAttribute::GLModeValue _value;
|
||||
ClipPlaneList _planes;
|
||||
StateAttribute::GLModeValue _value;
|
||||
ClipPlaneList _planes;
|
||||
|
||||
ReferenceFrame _referenceFrame;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user