openscenegraph
|
A plane class. It can be used to represent an infinite plane. More...
#include <Plane>
Public Types | |
enum | { num_components = 3 } |
typedef double | value_type |
typedef Vec3d | Vec3_type |
typedef Vec4d | Vec4_type |
Protected Attributes | |
value_type | _fv [4] |
unsigned int | _upperBBCorner |
unsigned int | _lowerBBCorner |
A plane class. It can be used to represent an infinite plane.
The infinite plane is described by an implicit plane equation a*x+b*y+c*z+d = 0. Though it is not mandatory that a^2+b^2+c^2 = 1 is fulfilled in general some methods require it (
Type of Plane class.
|
inline |
Default constructor.
The default constructor initializes all values to zero.
|
inline |
Constructor.
The plane is described as a*x+b*y+c*z+d = 0.
Constructor.
The plane can also be described as vec*[x,y,z,1].
Constructor.
The plane can also be described as vec*[x,y,z,1].
|
inline |
Constructor.
This constructor initializes the internal values directly without any checking or manipulation.
norm | The normal of the plane. |
d | The negative distance from the point of origin to the plane. |
Constructor.
This constructor calculates from the three points describing an infinite plane the internal values.
Constructor.
This constructor initializes the internal values directly without any checking or manipulation.
norm | The normal of the plane. |
point | A point of the plane. |
|
inline |
|
inline |
calculate the upper and lower bounding box corners to be used in the intersect(BoundingBox&) method for speeding calculations.
|
inline |
Calculate the distance between a point and the plane.
References osg::Vec3d::x(), osg::Vec3d::y(), and osg::Vec3d::z().
|
inline |
Calculate the distance between a point and the plane.
References osg::Vec3f::x(), osg::Vec3f::y(), and osg::Vec3f::z().
|
inline |
calculate the dot product of the plane normal and a point.
References osg::Vec3d::x(), osg::Vec3d::y(), and osg::Vec3d::z().
|
inline |
calculate the dot product of the plane normal and a point.
References osg::Vec3f::x(), osg::Vec3f::y(), and osg::Vec3f::z().
|
inline |
flip/reverse the orientation of the plane.
|
inline |
|
inline |
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.
References osg::BoundingBoxImpl< VT >::corner().
|
inline |
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.
References osg::BoundingSphereImpl< VT >::center(), and osg::BoundingSphereImpl< VT >::radius().
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.
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.
|
inline |
References osg::isNaN().
|
inline |
This method multiplies the coefficients of the plane equation with a constant factor so that the equation a^2+b^2+c^2 = 1 holds.
|
inline |
A plane is said to be smaller than another plane if the first non-identical element of the internal array is smaller than the corresponding element of the other plane.
References _fv.
|
inline |
|
inline |
References _fv.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
References osg::Vec3d::length(), and osg::Vec3d::set().
|
inline |
|
inline |
Transform the plane by matrix. Note, this operation carries out the calculation of the inverse of the matrix since a plane must be multiplied by the inverse transposed to transform it. 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
References osg::Matrixd::invert().
|
inline |
Transform the plane by providing a pre inverted matrix. see transform for details.
|
inline |
Checks if all internal values describing the plane have valid numbers.
References osg::isNaN().
|
protected |
Vec member variable.
Referenced by operator!=(), operator<(), operator==(), and set().