|
template<int Dim_ = Dim, typename std::enable_if< Dim_==2, int >::type = 0> |
| LineSegment () |
| Construct a default segment from (0,0) to (1,0). More...
|
|
template<int Dim_ = Dim, typename std::enable_if< Dim_==3, int >::type = 0> |
| LineSegment () |
| Construct a default segment from (0,0,0) to (1,0,0). More...
|
|
| LineSegment (const Vector &p0, const Vector &p1) |
| Construct a segment spanning points p0 and p1. More...
|
|
bool | IsSingular (CoordType tol2=static_cast< CoordType >(1.0e-6f)) const |
| Return whether this line segment has an infinitesimal extent (i.e., whether the endpoints are coincident) More...
|
|
template<int Dim_ = Dim, typename std::enable_if< Dim_==3, int >::type = 0> |
Plane< CoordType > | PerpendicularBisector () const |
| Construct a plane bisecting this line segment (only when Dimension is 3). More...
|
|
template<int Dim_ = Dim, typename std::enable_if< Dim_==2, int >::type = 0> |
Ray< CoordType, Dim, true > | PerpendicularBisector () const |
| Construct a perpendicular bisector to this line segment (only when Dimension is 2). More...
|
|
Vector | Center () const |
| Return the midpoint of the line segment. More...
|
|
Vector | Direction () const |
| Return the vector pointing to endpoint 1 from endpoint 0. More...
|
|
Vector | Evaluate (CoordType param) const |
| Compute a point along the line. param values in [0,1] lie on the line segment. More...
|
|
CoordType | DistanceTo (const Vector &point) const |
| Return the minmum distance from point to this line segment. More...
|
|
CoordType | DistanceTo (const Vector &point, CoordType ¶m, Vector &projectedPoint) const |
| Return the minimum distance between the line segment and point. More...
|
|
template<int Dim_ = Dim, typename std::enable_if< Dim_==2, int >::type = 0> |
bool | IntersectInfinite (const LineSegment< CoordType, Dim > &other, Vector &point, CoordType tol=0.f) |
| Compute the non-degenerate point where two (infinite) 2-D line segments intersect, or return false. More...
|
|
template<typename CoordType = vtkm::FloatDefault, int Dim = 3>
struct vtkm::LineSegment< CoordType, Dim >
Represent a finite line segment with a pair of points.
template<typename CoordType = vtkm::FloatDefault, int Dim = 3>
template<int Dim_ = Dim, typename std::enable_if< Dim_==2, int >::type = 0>
Construct a default segment from (0,0) to (1,0).
template<typename CoordType = vtkm::FloatDefault, int Dim = 3>
template<int Dim_ = Dim, typename std::enable_if< Dim_==3, int >::type = 0>
Construct a default segment from (0,0,0) to (1,0,0).
template<typename CoordType = vtkm::FloatDefault, int Dim = 3>
Return the minmum distance from point to this line segment.
Note that when the endpoints are coincident, this simplifies the distance between point and either endpoint. Otherwise, the distance returned is either the perpendicular distance from point to the line segment or the distance to the nearest endpoint (whichever is smaller).
template<typename CoordType = vtkm::FloatDefault, int Dim = 3>
template<int Dim_ = Dim, typename std::enable_if< Dim_==2, int >::type = 0>
Compute the non-degenerate point where two (infinite) 2-D line segments intersect, or return false.
If true is returned, then the lines intersect in a unique point and point is set to that location.
If false is returned, then the lines are parallel and either they are coincident (intersect everywhere) or offset (intersect nowhere).
The tolerance tol is the minimum acceptable denominator used to compute the intersection point coordinates and thus dictates the maximum distance from the segments at which intersections will be reported as valid.