OSG  3.4.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
VisibilityGroup.h
Go to the documentation of this file.
1 /* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield
2  *
3  * This library is open source and may be redistributed and/or modified under
4  * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
5  * (at your option) any later version. The full license is in LICENSE file
6  * included with this distribution, and on the openscenegraph.org website.
7  *
8  * This library is distributed in the hope that it will be useful,
9  * but WITHOUT ANY WARRANTY; without even the implied warranty of
10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11  * OpenSceneGraph Public License for more details.
12 */
13 
14 #ifndef OSGSIM_VISIBILITYGROUP
15 #define OSGSIM_VISIBILITYGROUP 1
16 
17 #include <osg/Node>
18 #include <osg/Group>
19 #include <osg/NodeVisitor>
20 
21 #include <osgSim/Export>
22 
23 namespace osgSim {
24 
31 {
32  public :
33 
35 
38 
40 
41  virtual void traverse(osg::NodeVisitor& nv);
42 
44  void setVisibilityVolume(osg::Node* node) { _visibilityVolume = node; }
45 
47  osg::Node* getVisibilityVolume() { return _visibilityVolume.get(); }
48 
50  const osg::Node* getVisibilityVolume() const { return _visibilityVolume.get(); }
51 
53  void setVolumeIntersectionMask(osg::Node::NodeMask mask) { _volumeIntersectionMask = mask; }
54 
56  osg::Node::NodeMask getVolumeIntersectionMask() const { return _volumeIntersectionMask; }
57 
61  void setSegmentLength(float length) { _segmentLength = length; }
62 
64  float getSegmentLength() const { return _segmentLength; }
65 
66  protected :
67 
68  virtual ~VisibilityGroup() {}
69 
73 };
74 
75 }
76 #endif
#define OSGSIM_EXPORT
Definition: Export.h:38
#define META_Node(library, name)
Definition: Node.h:59
float getSegmentLength() const
void setVolumeIntersectionMask(osg::Node::NodeMask mask)
osg::Node * getVisibilityVolume()
osg::ref_ptr< osg::Node > _visibilityVolume
osg::Node::NodeMask getVolumeIntersectionMask() const
void setSegmentLength(float length)
Definition: Node.h:71
osg::Node::NodeMask _volumeIntersectionMask
const osg::Node * getVisibilityVolume() const
unsigned int NodeMask
Definition: Node.h:352
void setVisibilityVolume(osg::Node *node)