class SG_EXPORT osg::Plane

A plane class.

Public Methods

[more]inline Plane()
[more]inline Plane(const Plane& pl)
[more]inline Plane(const float a, const float b, const float c, const float d)
[more]inline Plane(const Vec4& vec)
[more]inline Plane(const Vec3& norm, const float d)
[more]inline Plane(const Vec3& v1, const Vec3& v2, const Vec3& v3)
[more]inline Plane& operator = (const Plane& pl)
[more]inline void set(const Plane& pl)
[more]inline void set(const float a, const float b, const float c, const float d)
[more]inline void set(const Vec4& vec)
[more]inline void set(const Vec3& norm, const float d)
[more]inline void set(const Vec3& v1, const Vec3& v2, const Vec3& v3)
[more]inline void flip()
flip/reverse the orientation of the plane
[more]inline void makeUnitLength()
[more]inline void calculateUpperLowerBBCorners()
calculate the upper and lower bounding box corners to be used in the intersect(BoundingBox&) method for speeding calculations
[more]inline const bool valid() const
[more]inline Vec4& asVec4()
[more]inline const Vec4& asVec4() const
[more]inline float& operator [] (const int i)
[more]inline float operator [] (const int i) const
[more]inline osg::Vec3 getNormal()
[more]inline const float distance(const osg::Vec3& v) const
calculate the distance between a point and the plane
[more]inline const int intersect(const std::vector<Vec3>& vertices) const
intersection test between plane and vertex list return 1 if the bs is completely above plane, return 0 if the bs intersects the plane, return -1 if the bs is completely below the plane
[more]inline const int intersect(const BoundingSphere& bs) const
intersection test between plane and bounding sphere.
[more]inline const int intersect(const BoundingBox& bb) const
intersection test between plane and bounding sphere.
[more]inline void transform(const osg::Matrix& matrix)
Transform the plane by matrix.
[more]inline void transformProvidingInverse(const osg::Matrix& matrix)
Transform the plane by provide a pre inverted matrix.

Protected Fields

[more]Vec4 _fv
[more]unsigned int _upperBBCorner
[more]unsigned int _lowerBBCorner


Documentation

A plane class. It can be used to represent an infinite plane.
oinline Plane()

oinline Plane(const Plane& pl)

oinline Plane(const float a, const float b, const float c, const float d)

oinline Plane(const Vec4& vec)

oinline Plane(const Vec3& norm, const float d)

oinline Plane(const Vec3& v1, const Vec3& v2, const Vec3& v3)

oinline Plane& operator = (const Plane& pl)

oinline void set(const Plane& pl)

oinline void set(const float a, const float b, const float c, const float d)

oinline void set(const Vec4& vec)

oinline void set(const Vec3& norm, const float d)

oinline void set(const Vec3& v1, const Vec3& v2, const Vec3& v3)

oinline void flip()
flip/reverse the orientation of the plane

oinline void makeUnitLength()

oinline void calculateUpperLowerBBCorners()
calculate the upper and lower bounding box corners to be used in the intersect(BoundingBox&) method for speeding calculations

oinline const bool valid() const

oinline Vec4& asVec4()

oinline const Vec4& asVec4() const

oinline float& operator [] (const int i)

oinline float operator [] (const int i) const

oinline osg::Vec3 getNormal()

oinline const float distance(const osg::Vec3& v) const
calculate the distance between a point and the plane

oinline const int intersect(const std::vector<Vec3>& vertices) const
intersection test between plane and vertex list return 1 if the bs is completely above plane, return 0 if the bs intersects the plane, return -1 if the bs is completely below the plane

oinline const int intersect(const BoundingSphere& bs) const
intersection test between plane and bounding sphere. return 1 if the bs is completely above plane, return 0 if the bs intersects the plane, return -1 if the bs is completely below the plane.

oinline const int intersect(const BoundingBox& bb) const
intersection test between plane and bounding sphere. return 1 if the bs is completely above plane, return 0 if the bs intersects the plane, return -1 if the bs is completely below the plane.

oinline void transform(const osg::Matrix& matrix)
Transform the plane 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 plane by provide a pre inverted matrix. see transform for details.

oVec4 _fv

ounsigned int _upperBBCorner

ounsigned int _lowerBBCorner


This class has no child classes.
Friends:
inline std::ostream& operator << (std::ostream& output, const Plane& pl)

Alphabetic index HTML hierarchy of classes or Java



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