Mitsuba Renderer  0.5.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
mitsuba::TRay< _PointType, _VectorType > Struct Template Reference

Simple n-dimensional ray data structure with minimum / maximum extent information. More...

#include <mitsuba/core/ray.h>

Public Types

typedef _PointType PointType
 
typedef _VectorType VectorType
 
typedef PointType::Scalar Scalar
 

Public Member Functions

 TRay ()
 Construct a new ray. More...
 
 TRay (const TRay &ray)
 Copy constructor (1) More...
 
 TRay (const TRay &ray, Scalar mint, Scalar maxt)
 Copy constructor (2) More...
 
 TRay (const PointType &o, Scalar time)
 Construct a new ray, while not specifying a direction yet. More...
 
 TRay (const PointType &o, const VectorType &d, Scalar time)
 Construct a new ray. More...
 
 TRay (const PointType &o, const VectorType &d, Scalar mint, Scalar maxt, Scalar time)
 Construct a new ray. More...
 
void setOrigin (const PointType &pos)
 Set the origin. More...
 
void setTime (Scalar tval)
 Set the time. More...
 
void setDirection (const VectorType &dir)
 Set the direction and update the reciprocal. More...
 
PointType operator() (Scalar t) const
 Return the position of a point along the ray. More...
 
std::string toString () const
 Return a string representation of this ray. More...
 

Public Attributes

PointType o
 Ray origin. More...
 
Scalar mint
 Minimum range for intersection tests. More...
 
VectorType d
 Ray direction. More...
 
Scalar maxt
 Maximum range for intersection tests. More...
 
VectorType dRcp
 Componentwise reciprocals of the ray direction. More...
 
Float time
 Time value associated with this ray. More...
 

Detailed Description

template<typename _PointType, typename _VectorType>
struct mitsuba::TRay< _PointType, _VectorType >

Simple n-dimensional ray data structure with minimum / maximum extent information.

The somewhat peculiar ordering of the attributes is due to alignment purposes and should not be changed.

Member Typedef Documentation

template<typename _PointType , typename _VectorType >
typedef _PointType mitsuba::TRay< _PointType, _VectorType >::PointType
template<typename _PointType , typename _VectorType >
typedef PointType::Scalar mitsuba::TRay< _PointType, _VectorType >::Scalar
template<typename _PointType , typename _VectorType >
typedef _VectorType mitsuba::TRay< _PointType, _VectorType >::VectorType

Constructor & Destructor Documentation

template<typename _PointType , typename _VectorType >
mitsuba::TRay< _PointType, _VectorType >::TRay ( )
inline

Construct a new ray.

template<typename _PointType , typename _VectorType >
mitsuba::TRay< _PointType, _VectorType >::TRay ( const TRay< _PointType, _VectorType > &  ray)
inline

Copy constructor (1)

template<typename _PointType , typename _VectorType >
mitsuba::TRay< _PointType, _VectorType >::TRay ( const TRay< _PointType, _VectorType > &  ray,
Scalar  mint,
Scalar  maxt 
)
inline

Copy constructor (2)

template<typename _PointType , typename _VectorType >
mitsuba::TRay< _PointType, _VectorType >::TRay ( const PointType o,
Scalar  time 
)
inline

Construct a new ray, while not specifying a direction yet.

template<typename _PointType , typename _VectorType >
mitsuba::TRay< _PointType, _VectorType >::TRay ( const PointType o,
const VectorType d,
Scalar  time 
)
inline

Construct a new ray.

template<typename _PointType , typename _VectorType >
mitsuba::TRay< _PointType, _VectorType >::TRay ( const PointType o,
const VectorType d,
Scalar  mint,
Scalar  maxt,
Scalar  time 
)
inline

Construct a new ray.

Member Function Documentation

template<typename _PointType , typename _VectorType >
PointType mitsuba::TRay< _PointType, _VectorType >::operator() ( Scalar  t) const
inline

Return the position of a point along the ray.

Remarks
In the Python bindings, this operator is exposed as a function named eval – i.e. position lookups should be written as ray.eval(t)
template<typename _PointType , typename _VectorType >
void mitsuba::TRay< _PointType, _VectorType >::setDirection ( const VectorType dir)
inline

Set the direction and update the reciprocal.

template<typename _PointType , typename _VectorType >
void mitsuba::TRay< _PointType, _VectorType >::setOrigin ( const PointType pos)
inline

Set the origin.

template<typename _PointType , typename _VectorType >
void mitsuba::TRay< _PointType, _VectorType >::setTime ( Scalar  tval)
inline

Set the time.

template<typename _PointType , typename _VectorType >
std::string mitsuba::TRay< _PointType, _VectorType >::toString ( ) const
inline

Return a string representation of this ray.

Member Data Documentation

template<typename _PointType , typename _VectorType >
VectorType mitsuba::TRay< _PointType, _VectorType >::d

Ray direction.

template<typename _PointType , typename _VectorType >
VectorType mitsuba::TRay< _PointType, _VectorType >::dRcp

Componentwise reciprocals of the ray direction.

template<typename _PointType , typename _VectorType >
Scalar mitsuba::TRay< _PointType, _VectorType >::maxt

Maximum range for intersection tests.

template<typename _PointType , typename _VectorType >
Scalar mitsuba::TRay< _PointType, _VectorType >::mint

Minimum range for intersection tests.

template<typename _PointType , typename _VectorType >
PointType mitsuba::TRay< _PointType, _VectorType >::o

Ray origin.

template<typename _PointType , typename _VectorType >
Float mitsuba::TRay< _PointType, _VectorType >::time

Time value associated with this ray.


The documentation for this struct was generated from the following file: