vcg::Ray3< RayScalarType, NORM > Class Template Reference
[Space]

#include <ray3.h>

List of all members.

Public Types

typedef Point3< RayScalarType > PointType
 The point type.
typedef Ray3< RayScalarType, NORM > RayType
 The ray type.
typedef RayScalarType ScalarType
 The scalar type.

Public Member Functions

PointType ClosestPoint (const PointType &p) const
void Flip ()
 flips the ray
template<class Q , bool K>
void Import (const Ray3< Q, K > &b)
 importer for different ray types (with any scalar type or normalization beaviour)
Ray3< ScalarType, true > & Normalize ()
 normalizes direction field (returns a Normalized Ray)
bool operator!= (RayType const &p) const
 Operator to dispare two rays.
bool operator== (RayType const &p) const
 Operator to compare two rays.
PointType P (const ScalarType t) const
 calculates the point of parameter t on the ray.
ScalarType Projection (const PointType &p) const
 Projects a point on the ray.
Members to access the origin or direction

Direction() cannot be assigned directly. Use SetDirection() or Set() instead.

const PointTypeDirection () const
PointTypeOrigin ()
const PointTypeOrigin () const
void Set (const PointType &ori, const PointType &dir)
 sets origin and direction.
void SetDirection (const PointType &dir)
 sets the direction
void SetOrigin (const PointType &ori)
 sets the origin
Linearity for 3d rays

Ray3< ScalarType, false > operator* (const ScalarType s) const
Ray3< ScalarType, false > operator+ (RayType const &p) const
Ray3< ScalarType, false > operator- (RayType const &p) const
Ray3< ScalarType, false > operator/ (const ScalarType s) const
Automatic normalized to non-normalized

"Ray3dN r0 = r1" is equivalent to "Ray3dN r0 = r1.Normalize()" if r1 is a Ray3d

RayTypeoperator= (Ray3< ScalarType,!NORM > const &r)
 assignment
 Ray3 (const Ray3< ScalarType,!NORM > &r)
 copy constructor that takes opposite beaviour
Constructors

 Ray3 (const PointType &ori, const PointType &dir)
 The (origin, direction) constructor.
 Ray3 ()
 The empty constructor.

Static Public Member Functions

template<class Q , bool K>
static RayType Construct (const Ray3< Q, K > &b)
 constructs a new ray importing it from an existing one
static bool IsNormalized ()
 returns wheter this type is normalized or not
static Ray3< ScalarType, true > & Normalize (RayType &p)
 normalizes direction field (returns a Normalized Ray) - static version

Private Attributes

PointType _dir
 Direction (not necessarily normalized, unless so specified by NORM).
PointType _ori
 Origin.

Detailed Description

template<class RayScalarType, bool NORM = false>
class vcg::Ray3< RayScalarType, NORM >

Templated class for 3D rays. This is the class for infinite rays in 3D space. A Ray is stored just as two Point3: an origin and a direction (not necessarily normalized).

Parameters:
RayScalarType (template parameter) Specifies the type of scalar used to represent coords.
NORM,: if on, the direction is always Normalized

Definition at line 55 of file ray3.h.


Member Typedef Documentation

template<class RayScalarType, bool NORM = false>
typedef Point3<RayScalarType> vcg::Ray3< RayScalarType, NORM >::PointType

The point type.

Definition at line 63 of file ray3.h.

template<class RayScalarType, bool NORM = false>
typedef Ray3<RayScalarType,NORM> vcg::Ray3< RayScalarType, NORM >::RayType

The ray type.

Definition at line 66 of file ray3.h.

template<class RayScalarType, bool NORM = false>
typedef RayScalarType vcg::Ray3< RayScalarType, NORM >::ScalarType

The scalar type.

Definition at line 60 of file ray3.h.


Constructor & Destructor Documentation

template<class RayScalarType, bool NORM = false>
vcg::Ray3< RayScalarType, NORM >::Ray3 (  )  [inline]

The empty constructor.

Definition at line 102 of file ray3.h.

template<class RayScalarType, bool NORM = false>
vcg::Ray3< RayScalarType, NORM >::Ray3 ( const PointType ori,
const PointType dir 
) [inline]

The (origin, direction) constructor.

Definition at line 104 of file ray3.h.

template<class RayScalarType, bool NORM = false>
vcg::Ray3< RayScalarType, NORM >::Ray3 ( const Ray3< ScalarType,!NORM > &  r  )  [inline]

copy constructor that takes opposite beaviour

Definition at line 174 of file ray3.h.


Member Function Documentation

template<class RayScalarType, bool NORM = false>
PointType vcg::Ray3< RayScalarType, NORM >::ClosestPoint ( const PointType p  )  const [inline]

Definition at line 141 of file ray3.h.

template<class RayScalarType, bool NORM = false>
template<class Q , bool K>
static RayType vcg::Ray3< RayScalarType, NORM >::Construct ( const Ray3< Q, K > &  b  )  [inline, static]

constructs a new ray importing it from an existing one

Definition at line 138 of file ray3.h.

template<class RayScalarType, bool NORM = false>
const PointType& vcg::Ray3< RayScalarType, NORM >::Direction (  )  const [inline]

Definition at line 86 of file ray3.h.

template<class RayScalarType, bool NORM = false>
void vcg::Ray3< RayScalarType, NORM >::Flip (  )  [inline]

flips the ray

Definition at line 145 of file ray3.h.

template<class RayScalarType, bool NORM = false>
template<class Q , bool K>
void vcg::Ray3< RayScalarType, NORM >::Import ( const Ray3< Q, K > &  b  )  [inline]

importer for different ray types (with any scalar type or normalization beaviour)

Definition at line 131 of file ray3.h.

template<class RayScalarType, bool NORM = false>
static bool vcg::Ray3< RayScalarType, NORM >::IsNormalized (  )  [inline, static]

returns wheter this type is normalized or not

Definition at line 119 of file ray3.h.

template<class RayScalarType, bool NORM = false>
static Ray3<ScalarType,true>& vcg::Ray3< RayScalarType, NORM >::Normalize ( RayType p  )  [inline, static]

normalizes direction field (returns a Normalized Ray) - static version

Definition at line 127 of file ray3.h.

template<class RayScalarType, bool NORM = false>
Ray3<ScalarType,true>& vcg::Ray3< RayScalarType, NORM >::Normalize ( void   )  [inline]

normalizes direction field (returns a Normalized Ray)

Definition at line 124 of file ray3.h.

template<class RayScalarType, bool NORM = false>
bool vcg::Ray3< RayScalarType, NORM >::operator!= ( RayType const &  p  )  const [inline]

Operator to dispare two rays.

Definition at line 111 of file ray3.h.

template<class RayScalarType, bool NORM = false>
Ray3<ScalarType,false> vcg::Ray3< RayScalarType, NORM >::operator* ( const ScalarType  s  )  const [inline]

Definition at line 161 of file ray3.h.

template<class RayScalarType, bool NORM = false>
Ray3<ScalarType,false> vcg::Ray3< RayScalarType, NORM >::operator+ ( RayType const &  p  )  const [inline]

Definition at line 157 of file ray3.h.

template<class RayScalarType, bool NORM = false>
Ray3<ScalarType,false> vcg::Ray3< RayScalarType, NORM >::operator- ( RayType const &  p  )  const [inline]

Definition at line 159 of file ray3.h.

template<class RayScalarType, bool NORM = false>
Ray3<ScalarType,false> vcg::Ray3< RayScalarType, NORM >::operator/ ( const ScalarType  s  )  const [inline]

Definition at line 163 of file ray3.h.

template<class RayScalarType, bool NORM = false>
RayType& vcg::Ray3< RayScalarType, NORM >::operator= ( Ray3< ScalarType,!NORM > const &  r  )  [inline]

assignment

Definition at line 177 of file ray3.h.

template<class RayScalarType, bool NORM = false>
bool vcg::Ray3< RayScalarType, NORM >::operator== ( RayType const &  p  )  const [inline]

Operator to compare two rays.

Definition at line 108 of file ray3.h.

template<class RayScalarType, bool NORM = false>
PointType& vcg::Ray3< RayScalarType, NORM >::Origin (  )  [inline]

Definition at line 85 of file ray3.h.

template<class RayScalarType, bool NORM = false>
const PointType& vcg::Ray3< RayScalarType, NORM >::Origin (  )  const [inline]

Definition at line 84 of file ray3.h.

template<class RayScalarType, bool NORM = false>
PointType vcg::Ray3< RayScalarType, NORM >::P ( const ScalarType  t  )  const [inline]

calculates the point of parameter t on the ray.

Definition at line 121 of file ray3.h.

template<class RayScalarType, bool NORM = false>
ScalarType vcg::Ray3< RayScalarType, NORM >::Projection ( const PointType p  )  const [inline]

Projects a point on the ray.

Definition at line 114 of file ray3.h.

template<class RayScalarType, bool NORM = false>
void vcg::Ray3< RayScalarType, NORM >::Set ( const PointType ori,
const PointType dir 
) [inline]

sets origin and direction.

Definition at line 94 of file ray3.h.

template<class RayScalarType, bool NORM = false>
void vcg::Ray3< RayScalarType, NORM >::SetDirection ( const PointType dir  )  [inline]

sets the direction

Definition at line 91 of file ray3.h.

template<class RayScalarType, bool NORM = false>
void vcg::Ray3< RayScalarType, NORM >::SetOrigin ( const PointType ori  )  [inline]

sets the origin

Definition at line 88 of file ray3.h.


Member Data Documentation

template<class RayScalarType, bool NORM = false>
PointType vcg::Ray3< RayScalarType, NORM >::_dir [private]

Direction (not necessarily normalized, unless so specified by NORM).

Definition at line 74 of file ray3.h.

template<class RayScalarType, bool NORM = false>
PointType vcg::Ray3< RayScalarType, NORM >::_ori [private]

Origin.

Definition at line 71 of file ray3.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