vcg::Segment3< SegmentScalarType > Class Template Reference
[Space]

#include <segment3.h>

List of all members.

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< ScalarTypeBBox () 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
PointTypeP0 ()
const PointTypeP0 () const
 Members to access either extrema.
PointTypeP1 ()
const PointTypeP1 () 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

Detailed Description

template<class SegmentScalarType>
class vcg::Segment3< SegmentScalarType >

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).

Parameters:
SegmentScalarType (template parameter) Specifies the type of scalar used to represent coords.

Definition at line 67 of file segment3.h.


Member Typedef Documentation

template<class SegmentScalarType>
typedef Point3<SegmentScalarType> vcg::Segment3< SegmentScalarType >::PointType

The point type.

Definition at line 75 of file segment3.h.

template<class SegmentScalarType>
typedef SegmentScalarType vcg::Segment3< SegmentScalarType >::ScalarType

The scalar type.

Definition at line 72 of file segment3.h.

template<class SegmentScalarType>
typedef Segment3<SegmentScalarType> vcg::Segment3< SegmentScalarType >::SegmentType

The point type.

Definition at line 78 of file segment3.h.


Constructor & Destructor Documentation

template<class SegmentScalarType>
vcg::Segment3< SegmentScalarType >::Segment3 (  )  [inline]

The empty constructor.

Definition at line 93 of file segment3.h.

template<class SegmentScalarType>
vcg::Segment3< SegmentScalarType >::Segment3 ( const PointType a,
const PointType b 
) [inline]

The (a,b) constructor.

Definition at line 95 of file segment3.h.


Member Function Documentation

template<class SegmentScalarType>
Box3<ScalarType> vcg::Segment3< SegmentScalarType >::BBox (  )  const [inline]

return the bounding box

Definition at line 113 of file segment3.h.

template<class SegmentScalarType>
template<class Q >
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.

template<class SegmentScalarType>
void vcg::Segment3< SegmentScalarType >::Flip (  )  [inline]

flips: a-b becomes b-a

Definition at line 126 of file segment3.h.

template<class SegmentScalarType>
template<class Q >
void vcg::Segment3< SegmentScalarType >::Import ( const Segment3< Q > &  b  )  [inline]

importer for different line types

Definition at line 130 of file segment3.h.

template<class SegmentScalarType>
ScalarType vcg::Segment3< SegmentScalarType >::Length (  )  [inline]

returns segment length

Definition at line 120 of file segment3.h.

template<class SegmentScalarType>
PointType vcg::Segment3< SegmentScalarType >::MidPoint (  )  const [inline]

return the middle point

Definition at line 110 of file segment3.h.

template<class SegmentScalarType>
bool vcg::Segment3< SegmentScalarType >::operator!= ( SegmentType const &  p  )  const [inline]

Operator to dispare segments.

Definition at line 100 of file segment3.h.

template<class SegmentScalarType>
SegmentType vcg::Segment3< SegmentScalarType >::operator* ( const ScalarType  s  )  const [inline]

Definition at line 144 of file segment3.h.

template<class SegmentScalarType>
SegmentType vcg::Segment3< SegmentScalarType >::operator+ ( SegmentType const &  p  )  const [inline]

Definition at line 140 of file segment3.h.

template<class SegmentScalarType>
SegmentType vcg::Segment3< SegmentScalarType >::operator- ( SegmentType const &  p  )  const [inline]

Definition at line 142 of file segment3.h.

template<class SegmentScalarType>
SegmentType vcg::Segment3< SegmentScalarType >::operator/ ( const ScalarType  s  )  const [inline]

Definition at line 146 of file segment3.h.

template<class SegmentScalarType>
bool vcg::Segment3< SegmentScalarType >::operator== ( SegmentType const &  p  )  const [inline]

Operator to compare segments.

Definition at line 97 of file segment3.h.

template<class SegmentScalarType>
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.

template<class SegmentScalarType>
PointType& vcg::Segment3< SegmentScalarType >::P0 (  )  [inline]

Definition at line 90 of file segment3.h.

template<class SegmentScalarType>
const PointType& vcg::Segment3< SegmentScalarType >::P0 (  )  const [inline]

Members to access either extrema.

Definition at line 88 of file segment3.h.

template<class SegmentScalarType>
PointType& vcg::Segment3< SegmentScalarType >::P1 (  )  [inline]

Definition at line 91 of file segment3.h.

template<class SegmentScalarType>
const PointType& vcg::Segment3< SegmentScalarType >::P1 (  )  const [inline]

Definition at line 89 of file segment3.h.

template<class SegmentScalarType>
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.

template<class SegmentScalarType>
ScalarType vcg::Segment3< SegmentScalarType >::SquaredLength (  )  [inline]

return segment squared lenght

Definition at line 123 of file segment3.h.


Member Data Documentation

template<class SegmentScalarType>
PointType vcg::Segment3< SegmentScalarType >::_p0 [private]

_extrema

Definition at line 83 of file segment3.h.

template<class SegmentScalarType>
PointType vcg::Segment3< SegmentScalarType >::_p1 [private]

Definition at line 83 of file segment3.h.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines


vcglib
Author(s): Christian Bersch
autogenerated on Fri Jan 11 09:23:04 2013