class SG_EXPORT osg::Plane

A plane class.

Inheritance:


Public Methods

[more]inline Plane()
[more]inline Plane(const Plane& pl)
[more]inline Plane(float a, float b, float c, float d)
[more]inline Plane(const Vec4& vec)
[more]inline Plane(const Vec3& norm, 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(float a, float b, float c, float d)
[more]inline void set(const Vec4& vec)
[more]inline void set(const Vec3& norm, float d)
[more]inline void set(const Vec3& v1, const Vec3& v2, const Vec3& v3)
[more]inline void set(const Vec3& norm, const Vec3& point)
[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 bool valid() const
[more]inline bool operator == (const Plane& plane) const
[more]inline bool operator != (const Plane& plane) const
[more]inline bool operator < (const Plane& plane) const
[more]inline float* ptr()
[more]inline const float* ptr() const
[more]inline Vec4& asVec4()
[more]inline const Vec4& asVec4() const
[more]inline float& operator [] (unsigned int i)
[more]inline float operator [] (unsigned int i) const
[more]inline osg::Vec3 getNormal() const
[more]inline float distance(const osg::Vec3& v) const
calculate the distance between a point and the plane
[more]inline 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 int intersect(const BoundingSphere& bs) const
intersection test between plane and bounding sphere.
[more]inline 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(float a, float b, float c, float d)

oinline Plane(const Vec4& vec)

oinline Plane(const Vec3& norm, 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(float a, float b, float c, float d)

oinline void set(const Vec4& vec)

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

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

oinline void set(const Vec3& norm, const Vec3& point)

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 bool valid() const

oinline bool operator == (const Plane& plane) const

oinline bool operator != (const Plane& plane) const

oinline bool operator < (const Plane& plane) const

oinline float* ptr()

oinline const float* ptr() const

oinline Vec4& asVec4()

oinline const Vec4& asVec4() const

oinline float& operator [] (unsigned int i)

oinline float operator [] (unsigned int i) const

oinline osg::Vec3 getNormal() const

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

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


Direct child classes:
InfinitePlane
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++.