24 #ifndef PXR_BASE_GF_PLANE_H
25 #define PXR_BASE_GF_PLANE_H
65 Set(normal, distanceToOrigin);
92 void Set(
const GfVec3d &normal,
double distanceToOrigin) {
94 _distance = distanceToOrigin;
135 return (_normal == p._normal &&
136 _distance == p._distance);
142 return ! (*
this == p);
149 return p * _normal - _distance;
166 _distance = -_distance;
216 #endif // PXR_BASE_GF_PLANE_H
GF_API GfPlane & Transform(const GfMatrix4d &matrix)
Transforms the plane by the given matrix.
GLdouble GLdouble GLint GLint const GLdouble * points
GfPlane(const GfVec3d &normal, const GfVec3d &point)
bool operator==(const GfPlane &p) const
bool IntersectsPositiveHalfSpace(const GfVec3d &pt) const
bool operator!=(const GfPlane &p) const
void Set(const GfVec3d &normal, double distanceToOrigin)
GfPlane(const GfVec3d &p0, const GfVec3d &p1, const GfVec3d &p2)
GF_API bool IntersectsPositiveHalfSpace(const GfRange3d &box) const
void Reorient(const GfVec3d &p)
const GfVec3d & GetNormal() const
Returns the unit-length normal vector of the plane.
GF_API bool GfFitPlaneToPoints(const std::vector< GfVec3d > &points, GfPlane *fitPlane)
double GetDistance(const GfVec3d &p) const
double GetDistanceFromOrigin() const
Returns the distance of the plane from the origin.
GfVec3d Project(const GfVec3d &p) const
Return the projection of p onto the plane.
PXR_NAMESPACE_CLOSE_SCOPE PXR_NAMESPACE_OPEN_SCOPE
GfPlane()
The default constructor leaves the plane parameters undefined.
#define PXR_NAMESPACE_CLOSE_SCOPE
GfPlane(const GfVec4d &eqn)
GF_API std::ostream & operator<<(std::ostream &, const GfPlane &)
GfPlane(const GfVec3d &normal, double distanceToOrigin)
GF_API GfVec4d GetEquation() const
GfVec3d GetNormalized(double eps=GF_MIN_VECTOR_LENGTH) const