A plane class.
Public Methods
-
inline Plane()
-
inline Plane(const Plane& pl)
-
inline Plane(const float a, const float b, const float c, const float d)
-
inline Plane(const Vec4& vec)
-
inline Plane(const Vec3& norm, const float d)
-
inline Plane(const Vec3& v1, const Vec3& v2, const Vec3& v3)
-
inline Plane& operator = (const Plane& pl)
-
inline void set(const Plane& pl)
-
inline void set(const float a, const float b, const float c, const float d)
-
inline void set(const Vec4& vec)
-
inline void set(const Vec3& norm, const float d)
-
inline void set(const Vec3& v1, const Vec3& v2, const Vec3& v3)
-
inline void makeUnitLength()
-
inline void calculateUpperLowerBBCorners()
- calculate the upper and lower bounding box corners to be used in the intersect(BoundingBox&) method for speeding calculations
-
inline const bool valid() const
-
inline Vec4& asVec4()
-
inline const Vec4& asVec4() const
-
inline float& operator [] (const int i)
-
inline float operator [] (const int i) const
-
inline const float distance(const osg::Vec3& v) const
- calculate the distance between a point and the plane
-
inline const int intersect(const BoundingSphere& bs) const
- interesection test between plane and bounding sphere.
-
inline const int intersect(const BoundingBox& bb) const
- interesection test between plane and bounding sphere.
-
inline void transform(const osg::Matrix& matrix)
- Transform the plane by matrix.
-
inline void transformProvidingInverse(const osg::Matrix& matrix)
- Transform the plane by provide a pre inverted matrix.
Protected Fields
-
Vec4 _fv
-
unsigned int _upperBBCorner
-
unsigned int _lowerBBCorner
Documentation
A plane class. It can be used to represent an infinite plane.
- inline Plane()
- inline Plane(const Plane& pl)
- inline Plane(const float a, const float b, const float c, const float d)
- inline Plane(const Vec4& vec)
- inline Plane(const Vec3& norm, const float d)
- inline Plane(const Vec3& v1, const Vec3& v2, const Vec3& v3)
- inline Plane& operator = (const Plane& pl)
- inline void set(const Plane& pl)
- inline void set(const float a, const float b, const float c, const float d)
- inline void set(const Vec4& vec)
- inline void set(const Vec3& norm, const float d)
- inline void set(const Vec3& v1, const Vec3& v2, const Vec3& v3)
- inline void makeUnitLength()
- inline void calculateUpperLowerBBCorners()
- calculate the upper and lower bounding box corners to be used
in the intersect(BoundingBox&) method for speeding calculations
- inline const bool valid() const
- inline Vec4& asVec4()
- inline const Vec4& asVec4() const
- inline float& operator [] (const int i)
- inline float operator [] (const int i) const
- inline const float distance(const osg::Vec3& v) const
- calculate the distance between a point and the plane
- inline const int intersect(const BoundingSphere& bs) const
- interesection 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.
- inline const int intersect(const BoundingBox& bb) const
- interesection 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.
- inline 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
- inline void transformProvidingInverse(const osg::Matrix& matrix)
- Transform the plane by provide a pre inverted matrix.
see transform for details.
- Vec4 _fv
- unsigned int _upperBBCorner
- unsigned int _lowerBBCorner
- This class has no child classes.
- Friends:
- inline ostream& operator << (ostream& output, const Plane& pl)
Alphabetic index HTML hierarchy of classes or Java
This page was generated with the help of DOC++.