#include <segment2.h>
Public Types | |
typedef Point2< SegmentScalarType > | PointType |
The point type. | |
typedef SegmentScalarType | ScalarType |
The scalar type. | |
typedef Segment2 < SegmentScalarType > | SegmentType |
The point type. | |
Public Member Functions | |
Box2< ScalarType > | BBox () const |
return the bounding box | |
void | Flip () |
flips: a-b becomes b-a | |
template<class Q > | |
void | Import (const Segment2< Q > &b) |
importer for different line types | |
ScalarType | Length () |
returns segment length | |
ScalarType | Length () const |
returns segment length | |
PointType | Lerp (const ScalarType t) const |
PointType | MidPoint () const |
return the middle point | |
bool | operator!= (SegmentType const &p) const |
Operator to dispare segments. | |
bool | operator== (SegmentType const &p) const |
Operator to compare segments. | |
const PointType & | P0 () const |
Members to access either extrema. | |
PointType & | P0 () |
const PointType & | P1 () const |
PointType & | P1 () |
Segment2 () | |
The empty constructor. | |
Segment2 (const PointType &a, const PointType &b) | |
The (a,b) constructor. | |
void | Set (const PointType &a, const PointType &b) |
initializes the segment with its extrema | |
ScalarType | SquaredLength () |
return segment squared length | |
Linearity for 3d segments (operators +, -, *, /) | |
SegmentType | operator+ (SegmentType const &p) const |
SegmentType | operator- (SegmentType const &p) const |
SegmentType | operator* (const ScalarType s) const |
SegmentType | operator/ (const ScalarType s) const |
Static Public Member Functions | |
template<class Q > | |
static SegmentType | Construct (const Segment2< Q > &b) |
copy constructor (builds a new segment importing an existing one) | |
Private Attributes | |
PointType | _p0 |
_extrema | |
PointType | _p1 |
Templated class for 3D segment. This is the class for a segment in 3D space. A Segment is stored just as its two extrema (Point3).
SegmentScalarType | (template parameter) Specifies the type of scalar used to represent coords. |
Definition at line 48 of file segment2.h.