A Polytope class for representing convex clipping volumes made up.
Public Methods
-
inline Polytope()
-
inline Polytope(const Polytope& cv)
-
inline Polytope(const PlaneList& pl)
-
inline ~Polytope()
-
inline void clear()
-
inline Polytope& operator = (const Polytope& cv)
-
void setToUnitFrustum(bool withNear=true, bool withFar=true)
- Create a Polytope with is cube, centered at 0,0,0, with sides of 2 units
-
inline void set(const PlaneList& pl)
-
inline void add(const osg::Plane& pl)
-
inline void flip()
- flip/reverse the orientation of all the planes
-
inline PlaneList& getPlaneList()
-
inline const PlaneList& getPlaneList() const
-
inline void setReferenceVertexList(VertexList& vertices)
-
inline VertexList& getReferenceVertexList()
-
inline const VertexList& getReferenceVertexList() const
-
inline void setupMask()
-
inline ClippingMask& getCurrentMask()
-
inline ClippingMask getCurrentMask() const
-
inline void setResultMask(ClippingMask mask)
-
inline ClippingMask getResultMask() const
-
MaskStack& getMaskStack()
-
const MaskStack& getMaskStack() const
-
inline void pushCurrentMask()
-
inline void popCurrentMask()
-
inline bool contains(const osg::Vec3& v) const
- Check whether a vertex is contained with clipping set
-
inline bool contains(const std::vector<Vec3>& vertices)
- Check whether any part of vertex list is contained with clipping set
-
inline bool contains(const osg::BoundingSphere& bs)
- Check whether any part of a bounding sphere is contained within clipping set.
-
inline bool contains(const osg::BoundingBox& bb)
- Check whether any part of a bounding box is contained within clipping set.
-
inline bool containsAllOf(const std::vector<Vec3>& vertices)
- Check whether all of vertex list is contained with clipping set
-
inline bool containsAllOf(const osg::BoundingSphere& bs)
- Check whether the entire bounding sphere is contained within clipping set
-
inline bool containsAllOf(const osg::BoundingBox& bb)
- Check whether the entire bounding box is contained within clipping set
-
inline void transform(const osg::Matrix& matrix)
- Transform the clipping set by matrix.
-
inline void transformProvidingInverse(const osg::Matrix& matrix)
- Transform the clipping set by provide a pre inverted matrix.
Public Members
-
typedef unsigned int ClippingMask
-
typedef std::vector<Plane> PlaneList
-
typedef std::vector<Vec3> VertexList
-
typedef fast_back_stack<ClippingMask> MaskStack
Protected Fields
-
MaskStack _maskStack
-
ClippingMask _resultMask
-
PlaneList _planeList
-
VertexList _referenceVertexList
Documentation
A Polytope class for representing convex clipping volumes made up.
When adding planes, their normals should point inwards (into the volume)
- typedef unsigned int ClippingMask
- typedef std::vector<Plane> PlaneList
- typedef std::vector<Vec3> VertexList
- typedef fast_back_stack<ClippingMask> MaskStack
- inline Polytope()
- inline Polytope(const Polytope& cv)
- inline Polytope(const PlaneList& pl)
- inline ~Polytope()
- inline void clear()
- inline Polytope& operator = (const Polytope& cv)
- void setToUnitFrustum(bool withNear=true, bool withFar=true)
- Create a Polytope with is cube, centered at 0,0,0, with sides of 2 units
- inline void set(const PlaneList& pl)
- inline void add(const osg::Plane& pl)
- inline void flip()
- flip/reverse the orientation of all the planes
- inline PlaneList& getPlaneList()
- inline const PlaneList& getPlaneList() const
- inline void setReferenceVertexList(VertexList& vertices)
- inline VertexList& getReferenceVertexList()
- inline const VertexList& getReferenceVertexList() const
- inline void setupMask()
- inline ClippingMask& getCurrentMask()
- inline ClippingMask getCurrentMask() const
- inline void setResultMask(ClippingMask mask)
- inline ClippingMask getResultMask() const
- MaskStack& getMaskStack()
- const MaskStack& getMaskStack() const
- inline void pushCurrentMask()
- inline void popCurrentMask()
- inline bool contains(const osg::Vec3& v) const
- Check whether a vertex is contained with clipping set
- inline bool contains(const std::vector<Vec3>& vertices)
- Check whether any part of vertex list is contained with clipping set
- inline bool contains(const osg::BoundingSphere& bs)
- Check whether any part of a bounding sphere is contained within clipping set.
Using a mask to determine which planes should be used for the check, and
modifying the mask to turn off planes which wouldn't contribute to clipping
of any internal objects. This feature is used in osgUtil::CullVisitor
to prevent redundant plane checking.
- inline bool contains(const osg::BoundingBox& bb)
- Check whether any part of a bounding box is contained within clipping set.
Using a mask to determine which planes should be used for the check, and
modifying the mask to turn off planes which wouldn't contribute to clipping
of any internal objects. This feature is used in osgUtil::CullVisitor
to prevent redundant plane checking.
- inline bool containsAllOf(const std::vector<Vec3>& vertices)
- Check whether all of vertex list is contained with clipping set
- inline bool containsAllOf(const osg::BoundingSphere& bs)
- Check whether the entire bounding sphere is contained within clipping set
- inline bool containsAllOf(const osg::BoundingBox& bb)
- Check whether the entire bounding box is contained within clipping set
- inline void transform(const osg::Matrix& matrix)
- Transform the clipping set by matrix. Note, this operations carries out
the calculation of the inverse of the matrix since to transforms
planes must be multiplied my the inverse transposed. This
make this operation expensive. If the inverse has been already
calculated elsewhere then use transformProvidingInverse() instead.
See http://www.worldserver.com/turk/computergraphics/NormalTransformations.pdf
- inline void transformProvidingInverse(const osg::Matrix& matrix)
- Transform the clipping set by provide a pre inverted matrix.
see transform for details.
- MaskStack _maskStack
- ClippingMask _resultMask
- PlaneList _planeList
- VertexList _referenceVertexList
- This class has no child classes.
Alphabetic index HTML hierarchy of classes or Java
This page was generated with the help of DOC++.