OSG
3.4.0
|
A plane class. It can be used to represent an infinite plane. More...
#include <Plane.h>
Public Types | |
enum | { num_components = 3 } |
typedef double | value_type |
typedef Vec3d | Vec3_type |
typedef Vec4d | Vec4_type |
Public Member Functions | |
Plane () | |
Default constructor. More... | |
Plane (const Plane &pl) | |
Plane (value_type a, value_type b, value_type c, value_type d) | |
Constructor. More... | |
Plane (const Vec4f &vec) | |
Constructor. More... | |
Plane (const Vec4d &vec) | |
Constructor. More... | |
Plane (const Vec3_type &norm, value_type d) | |
Constructor. More... | |
Plane (const Vec3_type &v1, const Vec3_type &v2, const Vec3_type &v3) | |
Constructor. More... | |
Plane (const Vec3_type &norm, const Vec3_type &point) | |
Constructor. More... | |
Plane & | operator= (const Plane &pl) |
void | set (const Plane &pl) |
void | set (value_type a, value_type b, value_type c, value_type d) |
void | set (const Vec4f &vec) |
void | set (const Vec4d &vec) |
void | set (const Vec3_type &norm, double d) |
void | set (const Vec3_type &v1, const Vec3_type &v2, const Vec3_type &v3) |
void | set (const Vec3_type &norm, const Vec3_type &point) |
void | flip () |
void | makeUnitLength () |
void | calculateUpperLowerBBCorners () |
bool | valid () const |
Checks if all internal values describing the plane have valid numbers. More... | |
bool | isNaN () const |
bool | operator== (const Plane &plane) const |
bool | operator!= (const Plane &plane) const |
bool | operator< (const Plane &plane) const |
value_type * | ptr () |
const value_type * | ptr () const |
Vec4_type | asVec4 () const |
value_type & | operator[] (unsigned int i) |
value_type | operator[] (unsigned int i) const |
Vec3_type | getNormal () const |
float | distance (const osg::Vec3f &v) const |
double | distance (const osg::Vec3d &v) const |
float | dotProductNormal (const osg::Vec3f &v) const |
double | dotProductNormal (const osg::Vec3d &v) const |
int | intersect (const std::vector< Vec3f > &vertices) const |
int | intersect (const std::vector< Vec3d > &vertices) const |
int | intersect (const BoundingSphere &bs) const |
int | intersect (const BoundingBox &bb) const |
void | transform (const osg::Matrix &matrix) |
void | transformProvidingInverse (const osg::Matrix &matrix) |
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 (
typedef double osg::Plane::value_type |
typedef Vec3d osg::Plane::Vec3_type |
typedef Vec4d osg::Plane::Vec4_type |
anonymous enum |
|
inline |
Default constructor.
The default constructor initializes all values to zero.
|
inline |
|
inline |
|
inline |
|
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 distance between a point and the plane.
Definition at line 200 of file Plane.h.
|
inline |
Calculate the distance between a point and the plane.
Definition at line 210 of file Plane.h.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
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
Definition at line 330 of file Plane.h.
|
inline |
|
inline |
Checks if all internal values describing the plane have valid numbers.
Definition at line 165 of file Plane.h.
|
protected |