HDK
|
#include <line.h>
Public Member Functions | |
GfLine () | |
The default constructor leaves line parameters undefined. More... | |
GfLine (const GfVec3d &p0, const GfVec3d &dir) | |
Construct a line from a point and a direction. More... | |
double | Set (const GfVec3d &p0, const GfVec3d &dir) |
GfVec3d | GetPoint (double t) const |
const GfVec3d & | GetDirection () const |
Return the normalized direction of the line. More... | |
GF_API GfVec3d | FindClosestPoint (const GfVec3d &point, double *t=NULL) const |
bool | operator== (const GfLine &l) const |
bool | operator!= (const GfLine &r) const |
Friends | |
GF_API friend bool | GfFindClosestPoints (const GfLine &, const GfLine &, GfVec3d *, GfVec3d *, double *, double *) |
Basic type: 3D line
This class represents a three-dimensional line in space. Lines are constructed from a point, p0
, and a direction, dir. The direction is normalized in the constructor.
The line is kept in a parametric represention, p = p0 + t * dir.
|
inline |
Returns the point on the line that is closest to point
. If t
is not NULL
, it will be set to the parametric distance along the line of the returned point.
|
inline |
|
inline |
|
inline |
|
inline |
|
friend |
Computes the closets points between two lines.
The two points are returned in p1
and p2
. The parametric distance of each point on the lines is returned in t1
and t2
.
This returns false
if the lines were close enough to parallel that no points could be computed; in this case, the other return values are undefined.