Public Types | Public Member Functions | Static Public Member Functions | Private Attributes
vcg::Segment3< SegmentScalarType > Class Template Reference

#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
PointType Direction () const
void Flip ()
 flips: a-b becomes b-a
template<class Q >
void Import (const Segment3< Q > &b)
 importer for different line types
ScalarType Length () const
 returns segment length
PointType Lerp (const ScalarType t) const
PointType MidPoint () const
 return the middle point
PointType NormalizedDirection () const
bool operator!= (SegmentType const &p) const
 Operator to dispare segments.
bool operator== (SegmentType const &p) const
 Operator to compare segments.
PointTypeoperator[] (const int i)
const PointTypeoperator[] (const int i) const
const PointTypeP0 () const
 Members to access either extrema.
PointTypeP0 ()
const PointTypeP1 () const
PointTypeP1 ()
 Segment3 ()
 The empty constructor.
 Segment3 (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 () const
 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 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 97 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 99 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 121 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 143 of file segment3.h.

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

Definition at line 116 of file segment3.h.

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

flips: a-b becomes b-a

Definition at line 134 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 138 of file segment3.h.

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

returns segment length

Definition at line 128 of file segment3.h.

template<class SegmentScalarType>
PointType vcg::Segment3< SegmentScalarType >::Lerp ( 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 111 of file segment3.h.

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

return the middle point

Definition at line 114 of file segment3.h.

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

Definition at line 118 of file segment3.h.

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

Operator to dispare segments.

Definition at line 104 of file segment3.h.

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

Definition at line 152 of file segment3.h.

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

Definition at line 148 of file segment3.h.

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

Definition at line 150 of file segment3.h.

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

Definition at line 154 of file segment3.h.

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

Operator to compare segments.

Definition at line 101 of file segment3.h.

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

Definition at line 93 of file segment3.h.

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

Definition at line 94 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 >::P0 ( ) [inline]

Definition at line 90 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>
PointType& vcg::Segment3< SegmentScalarType >::P1 ( ) [inline]

Definition at line 91 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 107 of file segment3.h.

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

return segment squared length

Definition at line 131 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:


shape_reconstruction
Author(s): Roberto Martín-Martín
autogenerated on Sat Jun 8 2019 18:41:20