24 #ifndef PXR_BASE_GF_LINE_SEG_H
25 #define PXR_BASE_GF_LINE_SEG_H
57 _length = _line.
Set( p0, p1 - p0 );
79 return (_line == l._line && _length == l._length);
86 return ! (*
this ==
r);
115 double *t1 =
nullptr,
double *t2 =
nullptr );
127 double *t1 =
nullptr,
double *t2 =
nullptr );
135 #endif // PXR_BASE_GF_LINE_SEG_H
GfVec3d GetPoint(double t) const
GF_API GfVec3d FindClosestPoint(const GfVec3d &point, double *t=NULL) const
GfLineSeg()
The default constructor leaves line parameters undefined.
double Set(const GfVec3d &p0, const GfVec3d &dir)
GF_API bool GfFindClosestPoints(const GfLine &line, const GfLineSeg &seg, GfVec3d *p1=nullptr, GfVec3d *p2=nullptr, double *t1=nullptr, double *t2=nullptr)
GfLineSeg(const GfVec3d &p0, const GfVec3d &p1)
Construct a line segment that spans two points.
PXR_NAMESPACE_CLOSE_SCOPE PXR_NAMESPACE_OPEN_SCOPE
const GfVec3d & GetDirection() const
Return the normalized direction of the line.
bool operator==(const GfLineSeg &l) const
#define PXR_NAMESPACE_CLOSE_SCOPE
bool operator!=(const GfLineSeg &r) const
double GetLength() const
Return the length of the line.
GF_API friend bool GfFindClosestPoints(const GfLine &, const GfLineSeg &, GfVec3d *, GfVec3d *, double *, double *)
GfVec3d GetPoint(double t) const
const GfVec3d & GetDirection() const
Return the normalized direction of the line.
GF_API std::ostream & operator<<(std::ostream &, const GfLineSeg &)