#include <OSGVolume.h>

Public Member Functions | |
| bool | operator== (const Volume &other) const |
| bool | operator!= (const Volume &other) const |
Destructor | |
| virtual | ~Volume (void) |
State | |
| void | setValid (const bool value=true) |
| bool | isValid (void) const |
| void | setEmpty (const bool value=true) |
| bool | isEmpty (void) const |
| void | setStatic (const bool value=true) |
| bool | isStatic (void) const |
| void | setInfinite (const bool value=true) |
| bool | isInfinite (void) const |
| bool | isUntouchable (void) const |
| UInt16 | getState (void) const |
| void | setState (UInt16 state) |
Get Values | |
| virtual void | getCenter (Pnt3f ¢er) const =0 |
| virtual float | getScalarVolume (void) const =0 |
| virtual void | getBounds (Pnt3f &min, Pnt3f &max) const =0 |
| Pnt3f | getMin (void) const |
| Pnt3f | getMax (void) const |
Extending | |
| virtual void | extendBy (const Pnt3f &pt)=0 |
| virtual void | extendBy (const Volume &volume)=0 |
Intersection | |
| virtual bool | intersect (const Pnt3f &point) const =0 |
| virtual bool | intersect (const Line &line) const =0 |
| virtual bool | intersect (const Line &line, Real32 &enter, Real32 &exit) const =0 |
| virtual bool | intersect (const Volume &volume) const =0 |
| virtual bool | isOnSurface (const Pnt3f &point) const =0 |
Transformation | |
| virtual void | transform (const Matrix &matrix)=0 |
Output | |
| virtual void | dump (UInt32 uiIndent=0, const BitVector bvFlags=0) const =0 |
Protected Member Functions | |
Constructors | |
| Volume (void) | |
| Volume (const Volume &obj) | |
Protected Attributes | |
| UInt16 | _state |
Private Types | |
| enum | State { OSGVALID = 1, OSGEMPTY = 2, OSGSTATIC = 4, OSGINFINITE = 8 } |
Definition at line 55 of file OSGVolume.h.
enum osg::Volume::State [private] |
Definition at line 163 of file OSGVolume.h.
00164 { 00165 OSGVALID = 1, 00166 OSGEMPTY = 2, 00167 OSGSTATIC = 4, 00168 OSGINFINITE = 8 00169 };
| osg::Volume::~Volume | ( | void | ) | [inline, virtual] |
| osg::Volume::Volume | ( | void | ) | [inline, protected] |
| osg::Volume::Volume | ( | const Volume & | obj | ) | [inline, protected] |
| void osg::Volume::setValid | ( | const bool | value = true |
) | [inline] |
set the volume to be valid
Definition at line 82 of file OSGVolume.inl.
References _state, isStatic(), and OSGVALID.
Referenced by osg::Surface::adjustVolume(), osg::Slices::adjustVolume(), osg::ProxyGroup::adjustVolume(), osg::Particles::adjustVolume(), osg::Geometry::adjustVolume(), osg::DVRVolume::adjustVolume(), osg::Node::invalidateVolume(), osg::BoxVolume::setBounds(), and osg::BoxVolume::setBoundsByCenterAndSize().
00083 { 00084 if(!isStatic()) 00085 { 00086 if(value == true) 00087 _state |= OSGVALID; 00088 else 00089 _state &= ~OSGVALID; 00090 } 00091 }
| bool osg::Volume::isValid | ( | void | ) | const [inline] |
Checks if the volume is valid
Definition at line 96 of file OSGVolume.inl.
References _state, and OSGVALID.
Referenced by osg::extend(), osg::Group::intersect(), osg::Geometry::intersect(), osg::DVRVolume::intersect(), and osg::Node::invalidateVolume().
| void osg::Volume::setEmpty | ( | const bool | value = true |
) | [inline] |
set the volume to contain nothing
Definition at line 104 of file OSGVolume.inl.
References _state, OSGEMPTY, OSGINFINITE, and OSGVALID.
Referenced by osg::Surface::adjustVolume(), osg::Slices::adjustVolume(), osg::ProxyGroup::adjustVolume(), osg::Particles::adjustVolume(), osg::Geometry::adjustVolume(), osg::DVRVolume::adjustVolume(), osg::BoxVolume::BoxVolume(), osg::CylinderVolume::CylinderVolume(), osg::ParticleBSPTree::doBuild(), osg::SphereVolume::extendBy(), osg::BoxVolume::extendBy(), osg::BoxVolume::setBounds(), osg::BoxVolume::setBoundsByCenterAndSize(), osg::SphereVolume::setValue(), osg::SphereVolume::SphereVolume(), and osg::Node::updateVolume().
00105 { 00106 if(value == true) 00107 { 00108 _state |= OSGEMPTY; 00109 _state |= OSGVALID; 00110 _state &= ~OSGINFINITE; 00111 } 00112 else 00113 { 00114 _state &= ~OSGEMPTY; 00115 } 00116 }
| bool osg::Volume::isEmpty | ( | void | ) | const [inline] |
Checks if the volume is empty
Definition at line 121 of file OSGVolume.inl.
References _state, and OSGEMPTY.
Referenced by osg::extend(), osg::SphereVolume::extendBy(), osg::BoxVolume::extendBy(), osg::BoxVolume::getCenter(), osg::SphereVolume::getScalarVolume(), osg::CylinderVolume::getScalarVolume(), osg::BoxVolume::getScalarVolume(), osg::intersect(), osg::BoxVolume::intersect(), and osg::BoxVolume::transform().
| void osg::Volume::setStatic | ( | const bool | value = true |
) | [inline] |
| bool osg::Volume::isStatic | ( | void | ) | const [inline] |
Checks if the volume is static
Definition at line 74 of file OSGVolume.inl.
References _state, and OSGSTATIC.
Referenced by osg::extend(), osg::Node::invalidateVolume(), and setValid().
| void osg::Volume::setInfinite | ( | const bool | value = true |
) | [inline] |
set the volume to be infinite
Definition at line 129 of file OSGVolume.inl.
References _state, OSGEMPTY, OSGINFINITE, and OSGVALID.
Referenced by osg::extend(), osg::BoxVolume::setBounds(), and osg::BoxVolume::setBoundsByCenterAndSize().
00130 { 00131 if(value == true) 00132 { 00133 _state |= OSGINFINITE; 00134 _state |= OSGVALID; 00135 _state &= ~OSGEMPTY; 00136 } 00137 else 00138 { 00139 _state &= ~OSGINFINITE; 00140 } 00141 }
| bool osg::Volume::isInfinite | ( | void | ) | const [inline] |
Checks if the volume is infinite
Definition at line 146 of file OSGVolume.inl.
References _state, and OSGINFINITE.
Referenced by osg::extend(), and osg::intersect().
00147 { 00148 return (_state & OSGINFINITE) ? true : false; 00149 }
| bool osg::Volume::isUntouchable | ( | void | ) | const [inline] |
Checks if the volume is untouchable, i.e. it's values should not be changed. Mainly used internally to speed up early outs in extendBy().
Definition at line 157 of file OSGVolume.inl.
References _state, OSGINFINITE, OSGSTATIC, and OSGVALID.
Referenced by osg::SphereVolume::extendBy(), and osg::BoxVolume::extendBy().
00158 { 00159 return (_state & (OSGINFINITE | OSGVALID | OSGSTATIC)) != OSGVALID; 00160 }
| UInt16 osg::Volume::getState | ( | void | ) | const [inline] |
get the volume's state
Definition at line 166 of file OSGVolume.inl.
References _state.
Referenced by osg::osg::FieldDataTraits< DynamicVolume >::copyToBin(), and osg::DynamicVolume::instanceChanged().
00167 { 00168 return _state; 00169 }
| void osg::Volume::setState | ( | UInt16 | val | ) | [inline] |
set the volume's state
Definition at line 174 of file OSGVolume.inl.
References _state.
Referenced by osg::osg::FieldDataTraits< DynamicVolume >::copyFromBin().
00175 { 00176 _state = val; 00177 }
| virtual void osg::Volume::getCenter | ( | Pnt3f & | center | ) | const [pure virtual] |
Implemented in osg::BoxVolume, osg::CylinderVolume, osg::DynamicVolume, osg::FrustumVolume, osg::PolytopeVolume, and osg::SphereVolume.
Referenced by osg::DynamicVolume::getCenter().
| virtual float osg::Volume::getScalarVolume | ( | void | ) | const [pure virtual] |
Implemented in osg::BoxVolume, osg::CylinderVolume, osg::DynamicVolume, osg::FrustumVolume, osg::PolytopeVolume, and osg::SphereVolume.
Referenced by osg::DynamicVolume::getScalarVolume().
Implemented in osg::BoxVolume, osg::CylinderVolume, osg::DynamicVolume, osg::FrustumVolume, osg::PolytopeVolume, and osg::SphereVolume.
Referenced by osg::Billboard::adjustVolume(), osg::extend(), osg::DynamicVolume::getBounds(), getMax(), getMin(), and osg::intersect().
| Pnt3f osg::Volume::getMin | ( | void | ) | const [inline] |
Return the lowest point of the volume. Just a convience wrapper for getBounds()
Reimplemented in osg::BoxVolume.
Definition at line 184 of file OSGVolume.inl.
References getBounds().
00185 { 00186 Pnt3f pmin; 00187 Pnt3f pmax; 00188 00189 getBounds(pmin, pmax); 00190 00191 return pmin; 00192 }
| Pnt3f osg::Volume::getMax | ( | void | ) | const [inline] |
Return the highest point of the volume. Just a convience wrapper for getBounds()
Reimplemented in osg::BoxVolume.
Definition at line 199 of file OSGVolume.inl.
References getBounds().
Referenced by osg::RenderAction::drawHierarchicalMultiFrameOcclusionBB(), osg::RenderAction::drawMultiFrameOcclusionBB(), and osg::RenderAction::dropFunctor().
00200 { 00201 Pnt3f pmin; 00202 Pnt3f pmax; 00203 00204 getBounds(pmin, pmax); 00205 00206 return pmax; 00207 }
| virtual void osg::Volume::extendBy | ( | const Pnt3f & | pt | ) | [pure virtual] |
Implemented in osg::BoxVolume, osg::CylinderVolume, osg::DynamicVolume, osg::FrustumVolume, osg::PolytopeVolume, and osg::SphereVolume.
Referenced by osg::Surface::adjustVolume(), osg::Slices::adjustVolume(), osg::ProxyGroup::adjustVolume(), osg::Particles::adjustVolume(), osg::Geometry::adjustVolume(), osg::DVRVolume::adjustVolume(), osg::Billboard::adjustVolume(), osg::DynamicVolume::extendBy(), and osg::Node::updateVolume().
| virtual void osg::Volume::extendBy | ( | const Volume & | volume | ) | [pure virtual] |
Implemented in osg::BoxVolume, osg::CylinderVolume, osg::DynamicVolume, osg::FrustumVolume, osg::PolytopeVolume, and osg::SphereVolume.
| virtual bool osg::Volume::intersect | ( | const Pnt3f & | point | ) | const [pure virtual] |
Implemented in osg::BoxVolume, osg::CylinderVolume, osg::DynamicVolume, osg::FrustumVolume, osg::PolytopeVolume, and osg::SphereVolume.
Referenced by osg::DynamicVolume::intersect().
| virtual bool osg::Volume::intersect | ( | const Line & | line | ) | const [pure virtual] |
Implemented in osg::BoxVolume, osg::CylinderVolume, osg::DynamicVolume, osg::FrustumVolume, osg::PolytopeVolume, and osg::SphereVolume.
| virtual bool osg::Volume::intersect | ( | const Line & | line, | |
| Real32 & | enter, | |||
| Real32 & | exit | |||
| ) | const [pure virtual] |
Implemented in osg::BoxVolume, osg::CylinderVolume, osg::DynamicVolume, osg::FrustumVolume, osg::PolytopeVolume, and osg::SphereVolume.
| virtual bool osg::Volume::intersect | ( | const Volume & | volume | ) | const [pure virtual] |
Implemented in osg::BoxVolume, osg::CylinderVolume, osg::DynamicVolume, osg::FrustumVolume, osg::PolytopeVolume, and osg::SphereVolume.
| virtual bool osg::Volume::isOnSurface | ( | const Pnt3f & | point | ) | const [pure virtual] |
Implemented in osg::BoxVolume, osg::CylinderVolume, osg::DynamicVolume, osg::FrustumVolume, osg::PolytopeVolume, and osg::SphereVolume.
Referenced by osg::DynamicVolume::isOnSurface().
| virtual void osg::Volume::transform | ( | const Matrix & | matrix | ) | [pure virtual] |
| virtual void osg::Volume::dump | ( | UInt32 | uiIndent = 0, |
|
| const BitVector | bvFlags = 0 | |||
| ) | const [pure virtual] |
Implemented in osg::BoxVolume, osg::CylinderVolume, osg::DynamicVolume, osg::FrustumVolume, osg::PolytopeVolume, and osg::SphereVolume.
Referenced by osg::DynamicVolume::dump(), and osg::volDump().
| bool Volume::operator== | ( | const Volume & | other | ) | const |
| bool Volume::operator!= | ( | const Volume & | other | ) | const |
UInt16 osg::Volume::_state [protected] |
Definition at line 149 of file OSGVolume.h.
Referenced by getState(), osg::DynamicVolume::instanceChanged(), isEmpty(), isInfinite(), isStatic(), isUntouchable(), isValid(), osg::FrustumVolume::operator=(), osg::BoxVolume::operator=(), operator==(), setEmpty(), setInfinite(), setState(), setStatic(), and setValid().
1.5.5