Google

class SG_EXPORT osg::Polytope

A Polytope class for representing convex clipping volumes made up.

Public Methods

[more]inline Polytope()
[more]inline Polytope(const Polytope& cv)
[more]inline Polytope(const PlaneList& pl)
[more]inline ~Polytope()
[more]inline void clear()
[more]inline Polytope& operator = (const Polytope& cv)
[more]void setToUnitFrustum(bool withNear=true, bool withFar=true)
Create a Polytope with is cube, centered at 0,0,0, with sides of 2 units
[more]inline void set(const PlaneList& pl)
[more]inline void add(const osg::Plane& pl)
[more]inline void flip()
flip/reverse the orientation of all the planes
[more]inline PlaneList& getPlaneList()
[more]inline const PlaneList& getPlaneList() const
[more]inline void setReferenceVertexList(VertexList& vertices)
[more]inline VertexList& getReferenceVertexList()
[more]inline const VertexList& getReferenceVertexList() const
[more]inline void setupMask()
[more]inline ClippingMask& getCurrentMask()
[more]inline ClippingMask getCurrentMask() const
[more]inline void setResultMask(ClippingMask mask)
[more]inline ClippingMask getResultMask() const
[more]MaskStack& getMaskStack()
[more]const MaskStack& getMaskStack() const
[more]inline void pushCurrentMask()
[more]inline void popCurrentMask()
[more]inline bool contains(const osg::Vec3& v) const
Check whether a vertex is contained with clipping set
[more]inline bool contains(const std::vector<Vec3>& vertices)
Check whether any part of vertex list is contained with clipping set
[more]inline bool contains(const osg::BoundingSphere& bs)
Check whether any part of a bounding sphere is contained within clipping set.
[more]inline bool contains(const osg::BoundingBox& bb)
Check whether any part of a bounding box is contained within clipping set.
[more]inline bool containsAllOf(const std::vector<Vec3>& vertices)
Check whether all of vertex list is contained with clipping set
[more]inline bool containsAllOf(const osg::BoundingSphere& bs)
Check whether the entire bounding sphere is contained within clipping set
[more]inline bool containsAllOf(const osg::BoundingBox& bb)
Check whether the entire bounding box is contained within clipping set
[more]inline void transform(const osg::Matrix& matrix)
Transform the clipping set by matrix.
[more]inline void transformProvidingInverse(const osg::Matrix& matrix)
Transform the clipping set by provide a pre inverted matrix.

Public Members

[more]typedef unsigned int ClippingMask
[more]typedef std::vector<Plane> PlaneList
[more]typedef std::vector<Vec3> VertexList
[more]typedef fast_back_stack<ClippingMask> MaskStack

Protected Fields

[more]MaskStack _maskStack
[more]ClippingMask _resultMask
[more]PlaneList _planeList
[more]VertexList _referenceVertexList


Documentation

A Polytope class for representing convex clipping volumes made up. When adding planes, their normals should point inwards (into the volume)
otypedef unsigned int ClippingMask

otypedef std::vector<Plane> PlaneList

otypedef std::vector<Vec3> VertexList

otypedef fast_back_stack<ClippingMask> MaskStack

oinline Polytope()

oinline Polytope(const Polytope& cv)

oinline Polytope(const PlaneList& pl)

oinline ~Polytope()

oinline void clear()

oinline Polytope& operator = (const Polytope& cv)

ovoid setToUnitFrustum(bool withNear=true, bool withFar=true)
Create a Polytope with is cube, centered at 0,0,0, with sides of 2 units

oinline void set(const PlaneList& pl)

oinline void add(const osg::Plane& pl)

oinline void flip()
flip/reverse the orientation of all the planes

oinline PlaneList& getPlaneList()

oinline const PlaneList& getPlaneList() const

oinline void setReferenceVertexList(VertexList& vertices)

oinline VertexList& getReferenceVertexList()

oinline const VertexList& getReferenceVertexList() const

oinline void setupMask()

oinline ClippingMask& getCurrentMask()

oinline ClippingMask getCurrentMask() const

oinline void setResultMask(ClippingMask mask)

oinline ClippingMask getResultMask() const

oMaskStack& getMaskStack()

oconst MaskStack& getMaskStack() const

oinline void pushCurrentMask()

oinline void popCurrentMask()

oinline bool contains(const osg::Vec3& v) const
Check whether a vertex is contained with clipping set

oinline bool contains(const std::vector<Vec3>& vertices)
Check whether any part of vertex list is contained with clipping set

oinline 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.

oinline 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.

oinline bool containsAllOf(const std::vector<Vec3>& vertices)
Check whether all of vertex list is contained with clipping set

oinline bool containsAllOf(const osg::BoundingSphere& bs)
Check whether the entire bounding sphere is contained within clipping set

oinline bool containsAllOf(const osg::BoundingBox& bb)
Check whether the entire bounding box is contained within clipping set

oinline 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

oinline void transformProvidingInverse(const osg::Matrix& matrix)
Transform the clipping set by provide a pre inverted matrix. see transform for details.

oMaskStack _maskStack

oClippingMask _resultMask

oPlaneList _planeList

oVertexList _referenceVertexList


This class has no child classes.

Alphabetic index HTML hierarchy of classes or Java



This page was generated with the help of DOC++.