A very simple line segment primitive template. More...
#include <primitives.h>
Public Member Functions | |
LineSegment (double x1=0.0, double y1=0.0, double x2=0.0, double y2=0.0) | |
LineSegment (const PointType &point0, const PointType &point1) | |
LineSegment (const LineSegment &l) | |
void | invalidate () |
operator bool () | |
PointType & | operator[] (int i) |
const PointType & | operator[] (int i) const |
Public Attributes | |
PointType | p0 |
PointType | p1 |
A very simple line segment primitive template.
This is templatized to allow the point primitive to vary.
The point type must support an invalidate()
method as well as operator
bool()
. Anything derived from Point will work.
Papyrus::LineSegment< PointType >::LineSegment | ( | double | x1 = 0.0 , |
|
double | y1 = 0.0 , |
|||
double | x2 = 0.0 , |
|||
double | y2 = 0.0 | |||
) | [inline] |
Papyrus::LineSegment< PointType >::LineSegment | ( | const PointType & | point0, | |
const PointType & | point1 | |||
) | [inline] |
Papyrus::LineSegment< PointType >::LineSegment | ( | const LineSegment< PointType > & | l | ) | [inline] |
void Papyrus::LineSegment< PointType >::invalidate | ( | ) | [inline] |
Reimplemented in Papyrus::LinearGradient::Vector.
Papyrus::LineSegment< PointType >::operator bool | ( | ) | [inline] |
Reimplemented in Papyrus::LinearGradient::Vector.
const PointType& Papyrus::LineSegment< PointType >::operator[] | ( | int | i | ) | const [inline] |
Reimplemented in Papyrus::LinearGradient::Vector.
PointType& Papyrus::LineSegment< PointType >::operator[] | ( | int | i | ) | [inline] |
Reimplemented in Papyrus::LinearGradient::Vector.
PointType Papyrus::LineSegment< PointType >::p0 |
Reimplemented in Papyrus::LinearGradient::Vector.
Referenced by Papyrus::LineSegment< Point >::invalidate(), Papyrus::LineSegment< Point >::operator bool(), and Papyrus::LineSegment< Point >::operator[]().
PointType Papyrus::LineSegment< PointType >::p1 |
Reimplemented in Papyrus::LinearGradient::Vector.
Referenced by Papyrus::LineSegment< Point >::invalidate(), Papyrus::LineSegment< Point >::operator bool(), and Papyrus::LineSegment< Point >::operator[]().