Describes a line segment. More...
#include <LineSeg.h>
Public Member Functions | |
LineSeg () | |
Constructs a line segment at the origin with a zero vector. | |
LineSeg (const Point< DATA_TYPE, 3 > &origin, const Vec< DATA_TYPE, 3 > &dir) | |
Constructs a line segment with the given origin and vector. | |
LineSeg (const LineSeg &ray) | |
Constructs an exact duplicate of the given line segment. | |
LineSeg (const Point< DATA_TYPE, 3 > &beg, const Point< DATA_TYPE, 3 > &end) | |
Constructs a line segment with the given beginning and ending points. | |
DATA_TYPE | getLength () const |
Gets the length of this line segment. |
Describes a line segment.
This is represented by a point origin O and a vector spanning the length of the line segement originating at O. Thus any point on the line segment can be described as
P(s) = O + Vs
where 0 <= s <= 1
DATA_TYPE | the internal type used for the point and vector |
Definition at line 28 of file LineSeg.h.
gmtl::LineSeg< DATA_TYPE >::LineSeg | ( | ) | [inline] |
gmtl::LineSeg< DATA_TYPE >::LineSeg | ( | const Point< DATA_TYPE, 3 > & | origin, | |
const Vec< DATA_TYPE, 3 > & | dir | |||
) | [inline] |
gmtl::LineSeg< DATA_TYPE >::LineSeg | ( | const LineSeg< DATA_TYPE > & | ray | ) | [inline] |
gmtl::LineSeg< DATA_TYPE >::LineSeg | ( | const Point< DATA_TYPE, 3 > & | beg, | |
const Point< DATA_TYPE, 3 > & | end | |||
) | [inline] |
DATA_TYPE gmtl::LineSeg< DATA_TYPE >::getLength | ( | ) | const [inline] |