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

#include <segment2.h>

List of all members.

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< ScalarTypeBBox () 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 () const
 returns segment length
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
 Segment2 (const PointType &a, const PointType &b)
 The (a,b) constructor.
 Segment2 ()
 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 Segment2< 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::Segment2< 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 48 of file segment2.h.


Member Typedef Documentation

template<class SegmentScalarType>
typedef Point2<SegmentScalarType> vcg::Segment2< SegmentScalarType >::PointType

The point type.

Definition at line 56 of file segment2.h.

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

The scalar type.

Definition at line 53 of file segment2.h.

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

The point type.

Definition at line 59 of file segment2.h.


Constructor & Destructor Documentation

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

The empty constructor.

Definition at line 74 of file segment2.h.

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

The (a,b) constructor.

Definition at line 76 of file segment2.h.


Member Function Documentation

template<class SegmentScalarType>
Box2<ScalarType> vcg::Segment2< SegmentScalarType >::BBox (  )  const [inline]

return the bounding box

Definition at line 94 of file segment2.h.

template<class SegmentScalarType>
template<class Q >
static SegmentType vcg::Segment2< SegmentScalarType >::Construct ( const Segment2< Q > &  b  )  [inline, static]

copy constructor (builds a new segment importing an existing one)

Definition at line 122 of file segment2.h.

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

flips: a-b becomes b-a

Definition at line 113 of file segment2.h.

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

importer for different line types

Definition at line 117 of file segment2.h.

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

returns segment length

Definition at line 106 of file segment2.h.

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

returns segment length

Definition at line 102 of file segment2.h.

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

return the middle point

Definition at line 91 of file segment2.h.

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

Operator to dispare segments.

Definition at line 81 of file segment2.h.

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

Definition at line 131 of file segment2.h.

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

Definition at line 127 of file segment2.h.

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

Definition at line 129 of file segment2.h.

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

Definition at line 133 of file segment2.h.

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

Operator to compare segments.

Definition at line 78 of file segment2.h.

template<class SegmentScalarType>
PointType vcg::Segment2< 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 88 of file segment2.h.

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

Definition at line 71 of file segment2.h.

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

Members to access either extrema.

Definition at line 69 of file segment2.h.

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

Definition at line 72 of file segment2.h.

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

Definition at line 70 of file segment2.h.

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

initializes the segment with its extrema

Definition at line 84 of file segment2.h.

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

return segment squared lenght

Definition at line 110 of file segment2.h.


Member Data Documentation

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

_extrema

Definition at line 64 of file segment2.h.

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

Definition at line 64 of file segment2.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