![]() |
|
Basic type: 3-dimensional plane. More...
Public Member Functions | |
GfPlane () | |
The default constructor leaves the plane parameters undefined. More... | |
GfPlane (const GfVec3d &normal, double distanceToOrigin) | |
This constructor sets this to the plane perpendicular to normal and at distance units from the origin. More... | |
GfPlane (const GfVec3d &normal, const GfVec3d &point) | |
This constructor sets this to the plane perpendicular to normal and that passes through point . More... | |
GfPlane (const GfVec3d &p0, const GfVec3d &p1, const GfVec3d &p2) | |
This constructor sets this to the plane that contains the three given points. More... | |
GfPlane (const GfVec4d &eqn) | |
This constructor creates a plane given by the equation eqn [0] * x + eqn [1] * y + eqn [2] * z + eqn [3] = 0. More... | |
void | Set (const GfVec3d &normal, double distanceToOrigin) |
Sets this to the plane perpendicular to normal and at distance units from the origin. More... | |
GF_API void | Set (const GfVec3d &normal, const GfVec3d &point) |
This constructor sets this to the plane perpendicular to normal and that passes through point . More... | |
GF_API void | Set (const GfVec3d &p0, const GfVec3d &p1, const GfVec3d &p2) |
This constructor sets this to the plane that contains the three given points. More... | |
GF_API void | Set (const GfVec4d &eqn) |
This method sets this to the plane given by the equation eqn [0] * x + eqn [1] * y + eqn [2] * z + eqn [3] = 0. More... | |
const GfVec3d & | GetNormal () const |
Returns the unit-length normal vector of the plane. More... | |
double | GetDistanceFromOrigin () const |
Returns the distance of the plane from the origin. More... | |
GF_API GfVec4d | GetEquation () const |
Give the coefficients of the equation of the plane. More... | |
bool | operator== (const GfPlane &p) const |
Component-wise equality test. More... | |
bool | operator != (const GfPlane &p) const |
Component-wise inequality test. More... | |
double | GetDistance (const GfVec3d &p) const |
Returns the distance of point from the plane. More... | |
GfVec3d | Project (const GfVec3d &p) const |
Return the projection of p onto the plane. More... | |
GF_API GfPlane & | Transform (const GfMatrix4d &matrix) |
Transforms the plane by the given matrix. More... | |
void | Reorient (const GfVec3d &p) |
Flip the plane normal (if necessary) so that p is in the positive halfspace. More... | |
GF_API bool | IntersectsPositiveHalfSpace (const GfRange3d &box) const |
Returns true if the given aligned bounding box is at least partially on the positive side (the one the normal points into) of the plane. More... | |
bool | IntersectsPositiveHalfSpace (const GfVec3d &pt) const |
Returns true if the given point is on the plane or within its positive half space. More... | |
Basic type: 3-dimensional plane.
This class represents a three-dimensional plane as a normal vector and the distance of the plane from the origin, measured along the normal. The plane can also be used to represent a half-space: the side of the plane in the direction of the normal.
|
inline |
|
inline |
|
inline |
GF_API GfVec4d GetEquation | ( | ) | const |
Give the coefficients of the equation of the plane.
Suitable to OpenGL calls to set the clipping plane.
|
inline |
GF_API bool IntersectsPositiveHalfSpace | ( | const GfRange3d & | box | ) | const |
Returns true
if the given aligned bounding box is at least partially on the positive side (the one the normal points into) of the plane.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
This constructor sets this to the plane perpendicular to normal
and that passes through point
.
The passed-in normal is normalized to unit length first.
This constructor sets this to the plane that contains the three given points.
The normal is constructed from the cross product of (p1
- p0
) (p2
- p0
). Results are undefined if the points are collinear.
GF_API void Set | ( | const GfVec4d & | eqn | ) |
This method sets this to the plane given by the equation eqn
[0] * x + eqn
[1] * y + eqn
[2] * z + eqn
[3] = 0.
GF_API GfPlane& Transform | ( | const GfMatrix4d & | matrix | ) |
Transforms the plane by the given matrix.