From Ulrich Hertlein, spelling corrections and a few Doxgen comments.
This commit is contained in:
@@ -22,6 +22,11 @@
|
||||
|
||||
namespace osgSim {
|
||||
|
||||
/** VisibilityGroup renders (traverses) it's children only when the camera is inside a specified visibility volume.
|
||||
* The visibility volume is intersected with a line segment that extends from
|
||||
* the current camera's eye-point along the view vector for a given segment length.
|
||||
* If an intersection is detected then the node's children are traversed.
|
||||
*/
|
||||
class OSGSIM_EXPORT VisibilityGroup : public osg::Group
|
||||
{
|
||||
public :
|
||||
@@ -34,19 +39,32 @@ class OSGSIM_EXPORT VisibilityGroup : public osg::Group
|
||||
META_Node(osgSim, VisibilityGroup);
|
||||
|
||||
virtual void traverse(osg::NodeVisitor& nv);
|
||||
|
||||
|
||||
/** Set the subgraph that is intersected for the visibility determination.*/
|
||||
void setVisibilityVolume(osg::Node* node) { _visibilityVolume = node; }
|
||||
|
||||
/** Get the subgraph that is intersected for the visibility determination.*/
|
||||
osg::Node* getVisibilityVolume() { return _visibilityVolume.get(); }
|
||||
|
||||
/** Get the const subgraph that is intersected for the visibility determination.*/
|
||||
const osg::Node* getVisibilityVolume() const { return _visibilityVolume.get(); }
|
||||
|
||||
|
||||
/** Set the traversal mask for the intersection testing.*/
|
||||
void setVolumeIntersectionMask(osg::Node::NodeMask mask) { _volumeIntersectionMask = mask; }
|
||||
|
||||
/** Get the traversal mask for the intersection testing.*/
|
||||
osg::Node::NodeMask getVolumeIntersectionMask() const { return _volumeIntersectionMask; }
|
||||
|
||||
|
||||
/** Set the length of the intersection segment.
|
||||
* The segments extends this many database units from the camera eye-point along the look vector.
|
||||
* If this is left at zero then the diameter of the bounding sphere of the visibility volume is used.*/
|
||||
void setSegmentLength(float length) { _segmentLength = length; }
|
||||
|
||||
/** Get the length of the intersection segment.*/
|
||||
float getSegmentLength() const { return _segmentLength; }
|
||||
|
||||
|
||||
protected :
|
||||
|
||||
|
||||
virtual ~VisibilityGroup() {}
|
||||
|
||||
osg::ref_ptr<osg::Node> _visibilityVolume;
|
||||
|
||||
Reference in New Issue
Block a user