#include <segment3.h>
Public Types | |
typedef Point3< SegmentScalarType > | PointType |
The point type. | |
typedef SegmentScalarType | ScalarType |
The scalar type. | |
typedef Segment3 < SegmentScalarType > | SegmentType |
The point type. | |
Public Member Functions | |
Box3< ScalarType > | BBox () const |
return the bounding box | |
void | Flip () |
flips: a-b becomes b-a | |
template<class Q > | |
void | Import (const Segment3< Q > &b) |
importer for different line types | |
ScalarType | Length () |
returns segment length | |
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. | |
PointType | P (const ScalarType t) const |
PointType & | P0 () |
const PointType & | P0 () const |
Members to access either extrema. | |
PointType & | P1 () |
const PointType & | P1 () const |
Segment3 (const PointType &a, const PointType &b) | |
The (a,b) constructor. | |
Segment3 () | |
The empty constructor. | |
void | Set (const PointType &a, const PointType &b) |
initializes the segment with its extrema | |
ScalarType | SquaredLength () |
return segment squared lenght | |
Linearity for 3d segments (operators +, -, *, /) | |
SegmentType | operator* (const ScalarType s) const |
SegmentType | operator+ (SegmentType const &p) const |
SegmentType | operator- (SegmentType const &p) const |
SegmentType | operator/ (const ScalarType s) const |
Static Public Member Functions | |
template<class Q > | |
static SegmentType | Construct (const Segment3< 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 67 of file segment3.h.
typedef Point3<SegmentScalarType> vcg::Segment3< SegmentScalarType >::PointType |
The point type.
Definition at line 75 of file segment3.h.
typedef SegmentScalarType vcg::Segment3< SegmentScalarType >::ScalarType |
The scalar type.
Definition at line 72 of file segment3.h.
typedef Segment3<SegmentScalarType> vcg::Segment3< SegmentScalarType >::SegmentType |
The point type.
Definition at line 78 of file segment3.h.
vcg::Segment3< SegmentScalarType >::Segment3 | ( | ) | [inline] |
The empty constructor.
Definition at line 93 of file segment3.h.
vcg::Segment3< SegmentScalarType >::Segment3 | ( | const PointType & | a, | |
const PointType & | b | |||
) | [inline] |
The (a,b) constructor.
Definition at line 95 of file segment3.h.
Box3<ScalarType> vcg::Segment3< SegmentScalarType >::BBox | ( | ) | const [inline] |
return the bounding box
Definition at line 113 of file segment3.h.
static SegmentType vcg::Segment3< SegmentScalarType >::Construct | ( | const Segment3< Q > & | b | ) | [inline, static] |
copy constructor (builds a new segment importing an existing one)
Definition at line 135 of file segment3.h.
void vcg::Segment3< SegmentScalarType >::Flip | ( | ) | [inline] |
flips: a-b becomes b-a
Definition at line 126 of file segment3.h.
void vcg::Segment3< SegmentScalarType >::Import | ( | const Segment3< Q > & | b | ) | [inline] |
importer for different line types
Definition at line 130 of file segment3.h.
ScalarType vcg::Segment3< SegmentScalarType >::Length | ( | ) | [inline] |
returns segment length
Definition at line 120 of file segment3.h.
PointType vcg::Segment3< SegmentScalarType >::MidPoint | ( | ) | const [inline] |
return the middle point
Definition at line 110 of file segment3.h.
bool vcg::Segment3< SegmentScalarType >::operator!= | ( | SegmentType const & | p | ) | const [inline] |
Operator to dispare segments.
Definition at line 100 of file segment3.h.
SegmentType vcg::Segment3< SegmentScalarType >::operator* | ( | const ScalarType | s | ) | const [inline] |
Definition at line 144 of file segment3.h.
SegmentType vcg::Segment3< SegmentScalarType >::operator+ | ( | SegmentType const & | p | ) | const [inline] |
Definition at line 140 of file segment3.h.
SegmentType vcg::Segment3< SegmentScalarType >::operator- | ( | SegmentType const & | p | ) | const [inline] |
Definition at line 142 of file segment3.h.
SegmentType vcg::Segment3< SegmentScalarType >::operator/ | ( | const ScalarType | s | ) | const [inline] |
Definition at line 146 of file segment3.h.
bool vcg::Segment3< SegmentScalarType >::operator== | ( | SegmentType const & | p | ) | const [inline] |
Operator to compare segments.
Definition at line 97 of file segment3.h.
PointType vcg::Segment3< SegmentScalarType >::P | ( | const ScalarType | t | ) | const [inline] |
calculates the point of parameter t on the segment. if t is in [0..1] returned point is inside the segment
Definition at line 107 of file segment3.h.
PointType& vcg::Segment3< SegmentScalarType >::P0 | ( | ) | [inline] |
Definition at line 90 of file segment3.h.
const PointType& vcg::Segment3< SegmentScalarType >::P0 | ( | ) | const [inline] |
Members to access either extrema.
Definition at line 88 of file segment3.h.
PointType& vcg::Segment3< SegmentScalarType >::P1 | ( | ) | [inline] |
Definition at line 91 of file segment3.h.
const PointType& vcg::Segment3< SegmentScalarType >::P1 | ( | ) | const [inline] |
Definition at line 89 of file segment3.h.
void vcg::Segment3< SegmentScalarType >::Set | ( | const PointType & | a, | |
const PointType & | b | |||
) | [inline] |
initializes the segment with its extrema
Definition at line 103 of file segment3.h.
ScalarType vcg::Segment3< SegmentScalarType >::SquaredLength | ( | ) | [inline] |
return segment squared lenght
Definition at line 123 of file segment3.h.
PointType vcg::Segment3< SegmentScalarType >::_p0 [private] |
_extrema
Definition at line 83 of file segment3.h.
PointType vcg::Segment3< SegmentScalarType >::_p1 [private] |
Definition at line 83 of file segment3.h.