24 #ifndef PXR_BASE_GF_LINE_SEG2D_H
25 #define PXR_BASE_GF_LINE_SEG2D_H
56 _length = _line.
Set( p0, p1 - p0 );
78 return (_line == l._line && _length == l._length);
85 return ! (*
this ==
r);
92 double *t1,
double *t2 );
114 double *t1 =
nullptr,
double *t2 =
nullptr );
127 double *t1 =
nullptr,
double *t2 =
nullptr );
131 #endif // PXR_BASE_GF_LINE_SEG2D_H
GfVec2d GetPoint(double t) const
const GfVec2d & GetDirection() const
Return the normalized direction of the line.
GF_API GfVec2d FindClosestPoint(const GfVec2d &point, double *t=NULL) const
GF_API friend bool GfFindClosestPoints(const GfLine2d &, const GfLineSeg2d &, GfVec2d *, GfVec2d *, double *t1, double *t2)
double Set(const GfVec2d &p0, const GfVec2d &dir)
GfVec2d GetPoint(double t) const
const GfVec2d & GetDirection() const
Return the normalized direction of the line.
PXR_NAMESPACE_CLOSE_SCOPE PXR_NAMESPACE_OPEN_SCOPE
GF_API bool GfFindClosestPoints(const GfLine2d &line, const GfLineSeg2d &seg, GfVec2d *p1=nullptr, GfVec2d *p2=nullptr, double *t1=nullptr, double *t2=nullptr)
bool operator!=(const GfLineSeg2d &r) const
#define PXR_NAMESPACE_CLOSE_SCOPE
double GetLength() const
Return the length of the line.
GfLineSeg2d(const GfVec2d &p0, const GfVec2d &p1)
Construct a line segment that spans two points.
GfLineSeg2d()
The default constructor leaves line parameters undefined.
bool operator==(const GfLineSeg2d &l) const