|
| TLineSegment ()=default |
| A line which state is unspecified.
|
|
| TLineSegment (const TVector3< T > &origin, const TVector3< T > &direction) |
| A line extending form origin to the furthest point possible along direction .
|
|
| TLineSegment (const TVector3< T > &origin, const TVector3< T > &dir, T minT, T maxT) |
| A line that covers the parametric range [minT, maxT).
|
|
TLineSegment & | flip () |
| Point the line in opposite direction.
|
|
void | setMinT (T t) |
| Set the parametric distance where the segment starts.
|
|
void | setMaxT (T t) |
| Set the parametric distance where the segment ends.
|
|
void | setRange (T minT, T maxT) |
| Set the parametric range where the segment extends. The range is [minT, maxT). This is equivalent to calling setMinT(T) and setMaxT(T) together.
|
|
void | setRange (const std::pair< T, T > &minMaxT) |
| Same as setRange(T,T).
|
|
void | setOrigin (const TVector3< T > &pos) |
| Set the origin of the line.
|
|
void | setDir (const TVector3< T > &dir) |
| Set the direction vector of the line.
|
|
|
Basic getters for line attributes. See corresponding setters (if present) for more info.
|
const TVector3< T > & | getOrigin () const |
|
const TVector3< T > & | getDir () const |
|
T | getMinT () const |
|
T | getMaxT () const |
|
std::pair< T, T > | getRange () const |
|
TVector3< T > | getTail () const |
| Get the coordinates on minimum parametric distance.
|
|
TVector3< T > | getHead () const |
| Get the coordinates on maximum parametric distance.
|
|
TVector3< T > | getPoint (T t) const |
| Get the coordinates referred to by the parametric distance t .
|
|
T | getProjectedT (const TVector3< T > &point) const |
| Get the parametric distance of a point when it is projected on the line.
|
|
T | getFoldedT (const TVector3< T > &point) const |
| Get the parametric distance of a point when it is rotated to the line.
|
|
T | getDeltaT () const |
| Get the length of line in terms of parametric distance.
|
|
template<typename T>
class ph::math::TLineSegment< T >
Represents a line segment in space.
Points \( \overrightarrow{P} \) on a line are modeled using the equation
\[
\overrightarrow{P} = \overrightarrow{O} + t\overrightarrow{D}
\]
where \( \overrightarrow{O} \) is the line origin and \( \overrightarrow{D} \) is the line direction, and \( t \) is a parameter in \( [t_{min}, t_{max}) \). Note the direction vector of the line does not need to be normalized.