7#ifndef PXR_BASE_GF_LINE_H
8#define PXR_BASE_GF_LINE_H
19PXR_NAMESPACE_OPEN_SCOPE
67 return _p0 == l._p0 && _dir == l._dir;
73 return ! (*
this == r);
98 double *t1 =
nullptr,
double *t2 =
nullptr);
104PXR_NAMESPACE_CLOSE_SCOPE
GfLine(const GfVec3d &p0, const GfVec3d &dir)
Construct a line from a point and a direction.
GfVec3d GetPoint(double t) const
Return the point on the line at ( p0 + t * dir ).
const GfVec3d & GetDirection() const
Return the normalized direction of the line.
GfLine()
The default constructor leaves line parameters undefined.
GF_API friend bool GfFindClosestPoints(const GfLine &, const GfLine &, GfVec3d *, GfVec3d *, double *, double *)
Computes the closets points between two lines.
bool operator!=(const GfLine &r) const
Component-wise inequality test.
GF_API GfVec3d FindClosestPoint(const GfVec3d &point, double *t=NULL) const
Returns the point on the line that is closest to point.
bool operator==(const GfLine &l) const
Component-wise equality test.
Basic type for a vector of 3 double components.
double Normalize(double eps=GF_MIN_VECTOR_LENGTH)
Normalizes the vector in place to unit length, returning the length before normalization.
GF_API std::ostream & operator<<(std::ostream &, const GfBBox3d &)
Output a GfBBox3d using the format [(range) matrix zeroArea].
GF_API bool GfFindClosestPoints(const GfLine &l1, const GfLine &l2, GfVec3d *p1=nullptr, GfVec3d *p2=nullptr, double *t1=nullptr, double *t2=nullptr)
Computes the closets points between two lines.