#include <LineSeg.h>
Inheritance diagram for gmtl::LineSeg:


Public Methods | |
| LineSeg () | |
| Constructs a line segment at the origin with a zero vector. More... | |
| LineSeg (const Point< DATA_TYPE, 3 > &origin, const Vec< DATA_TYPE, 3 > &dir) | |
| Constructs a line segment with the given origin and vector. More... | |
| LineSeg (const LineSeg &ray) | |
| Constructs an exact duplicate of the given line segment. More... | |
| LineSeg (const Point< DATA_TYPE, 3 > &beg, const Point< DATA_TYPE, 3 > &end) | |
| Constructs a line segment with the given beginning and ending points. More... | |
| DATA_TYPE | getLength () const |
| Gets the length of this line segment. More... | |
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 57 of file LineSeg.h.
|
|||||||||
|
Constructs a line segment at the origin with a zero vector.
Definition at line 63 of file LineSeg.h. Referenced by LineSeg.
00064 {}
|
|
||||||||||||||||
|
Constructs a line segment with the given origin and vector.
Definition at line 73 of file LineSeg.h. References gmtl::Ray::Ray.
00074 : Ray<DATA_TYPE>( origin, dir )
00075 {}
|
|
||||||||||
|
Constructs an exact duplicate of the given line segment.
Definition at line 82 of file LineSeg.h. References LineSeg, and gmtl::Ray::Ray.
00082 : Ray<DATA_TYPE>( ray )
00083 {
00084 }
|
|
||||||||||||||||
|
Constructs a line segment with the given beginning and ending points.
Definition at line 92 of file LineSeg.h. References gmtl::Ray::mDir, gmtl::Ray::mOrigin, and gmtl::Ray::Ray.
|
|
|||||||||
|
Gets the length of this line segment.
Definition at line 103 of file LineSeg.h. References gmtl::length.
00104 {
00105 return length(this->mDir);
00106 }
|
1.2.14 written by Dimitri van Heesch,
© 1997-2002