A 3d line segment primitive represented by its end points in an unspecified frame, and a collection of line segment-related utility methods.
More...
|
| | LineSeg_ () |
| | Construct an uninitialized LineSeg object; the end points will be garbage (NaN in Debug builds).
|
| |
| | LineSeg_ (const Vec3P &e0, const Vec3P &e1) |
| | Construct a LineSeg with the given end points.
|
| |
| LineSeg_ & | setEndpoints (const Vec3P &e0, const Vec3P &e1) |
| | Change the end points of this line segment.
|
| |
| LineSeg_ & | setEndpoint (int which, const Vec3P &p) |
| | Change one end point of this line segment.
|
| |
| bool | isDegenerate (RealP tol=Geo::getDefaultTol< P >()) const |
| | Determine whether this line segment is degenerate to a given tolerance, meaning that its length is less than or equal to the tolerance.
|
| |
| const Vec3P & | getEndpoint (int which) const |
| | Get the location of an end point. Order is the same as construction.
|
| |
| Vec3P & | updEndpoint (int which) |
| | Get a writable reference to the location of an end point. Order is the same as construction.
|
| |
| const Vec3P & | operator[] (int which) const |
| | Access an end point by indexing the line segment.
|
| |
| Vec3P & | operator[] (int which) |
| | Get writable access to an end point by indexing the line segment.
|
| |
| RealP | calcLength () const |
| | Calculate the length of this line segment (expensive).
|
| |
| RealP | calcLengthSqr () const |
| | Calculate the square of the length of this line segment (cheap).
|
| |
| Vec3P | findPoint (RealP t) const |
| | Return a point along the line segment given by its coordinate t, where t==0 gives end point 0, t==1 gives end point 1 and other values interpolate or extrapolate linearly.
|
| |
| Vec3P | findMidpoint () const |
| | Return the center point of the line segment; this is the same as findPoint(1/2) but faster.
|
| |
| Sphere_< P > | calcBoundingSphere () const |
| | Calculate a minimal bounding sphere for this line segment.
|
| |
| RealP | findDistanceToPoint (const Vec3P &p2) const |
| | Find the distance between this line segment and a point expressed in the same frame.
|
| |
| RealP | findDistanceToPointSqr (const Vec3P &p2) const |
| | Find the square of the distance between this line segment and a point expressed in the same frame.
|
| |
template<class P>
class SimTK::Geo::LineSeg_< P >
A 3d line segment primitive represented by its end points in an unspecified frame, and a collection of line segment-related utility methods.
We support a one-parameter t representation of the line segment, where t=0 gives the first end point and t=1 gives the second end point.