24 #ifndef PXR_BASE_GF_LINE_H 25 #define PXR_BASE_GF_LINE_H 36 PXR_NAMESPACE_OPEN_SCOPE
84 return _p0 == l._p0 && _dir == l._dir;
90 return ! (*
this == r);
115 double *t1 =
nullptr,
double *t2 =
nullptr);
121 PXR_NAMESPACE_CLOSE_SCOPE
123 #endif // PXR_BASE_GF_LINE_H 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 GfLine &)
Output a GfLine.
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.
bool operator==(const GfLine &l) const
Component-wise equality 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 &r) const
Component-wise inequality test.
GF_API friend bool GfFindClosestPoints(const GfLine &, const GfLine &, GfVec3d *, GfVec3d *, double *, double *)
Computes the closets points between two lines.
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.
Basic type for a vector of 3 double components.
GfLine(const GfVec3d &p0, const GfVec3d &dir)
Construct a line from a point and a direction.
GfLine()
The default constructor leaves line parameters undefined.