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

#include <ray2.h>

List of all members.

Public Types

typedef Point2< RayScalarType > PointType
 The point type.
typedef Ray2< 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 Ray2< Q, K > &b)
 importer for different ray types (with any scalar type or normalization beaviour)
Ray2< 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

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

"Ray2dN r0 = r1" is equivalent to "Ray2dN r0 = r1.Normalize()" if r1 is a Ray2d

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

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

Static Public Member Functions

template<class Q , bool K>
static RayType Construct (const Ray2< 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 Ray2< 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::Ray2< 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 49 of file ray2.h.


Member Typedef Documentation

template<class RayScalarType, bool NORM = false>
typedef Point2<RayScalarType> vcg::Ray2< RayScalarType, NORM >::PointType

The point type.

Definition at line 57 of file ray2.h.

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

The ray type.

Definition at line 60 of file ray2.h.

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

The scalar type.

Definition at line 54 of file ray2.h.


Constructor & Destructor Documentation

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

The empty constructor.

Definition at line 96 of file ray2.h.

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

The (origin, direction) constructor.

Definition at line 98 of file ray2.h.

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

copy constructor that takes opposite beaviour

Definition at line 168 of file ray2.h.


Member Function Documentation

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

Definition at line 135 of file ray2.h.

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

constructs a new ray importing it from an existing one

Definition at line 132 of file ray2.h.

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

Definition at line 80 of file ray2.h.

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

flips the ray

Definition at line 139 of file ray2.h.

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

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

Definition at line 125 of file ray2.h.

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

returns wheter this type is normalized or not

Definition at line 113 of file ray2.h.

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

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

Definition at line 121 of file ray2.h.

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

normalizes direction field (returns a Normalized Ray)

Definition at line 118 of file ray2.h.

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

Operator to dispare two rays.

Definition at line 105 of file ray2.h.

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

Definition at line 155 of file ray2.h.

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

Definition at line 151 of file ray2.h.

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

Definition at line 153 of file ray2.h.

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

Definition at line 157 of file ray2.h.

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

assignment

Definition at line 171 of file ray2.h.

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

Operator to compare two rays.

Definition at line 102 of file ray2.h.

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

Definition at line 79 of file ray2.h.

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

Definition at line 78 of file ray2.h.

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

calculates the point of parameter t on the ray.

Definition at line 115 of file ray2.h.

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

Projects a point on the ray.

Definition at line 108 of file ray2.h.

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

sets origin and direction.

Definition at line 88 of file ray2.h.

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

sets the direction

Definition at line 85 of file ray2.h.

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

sets the origin

Definition at line 82 of file ray2.h.


Member Data Documentation

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

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

Definition at line 68 of file ray2.h.

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

Origin.

Definition at line 65 of file ray2.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