Mitsuba Renderer  0.5.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
mitsuba::AnimatedTransform Class Reference

Animated transformation with an underlying keyframe representation. More...

#include <mitsuba/core/track.h>

+ Inheritance diagram for mitsuba::AnimatedTransform:

Public Member Functions

 AnimatedTransform (const Transform &trafo=Transform())
 Create a new animated transformation. More...
 
 AnimatedTransform (Stream *stream)
 Unserialized an animated transformation from a binary data stream. More...
 
 AnimatedTransform (const AnimatedTransform *trafo)
 Copy constructor. More...
 
size_t getTrackCount () const
 Return the number of associated animation tracks. More...
 
AbstractAnimationTrackfindTrack (AbstractAnimationTrack::EType type)
 Find a track of the given type. More...
 
const AbstractAnimationTrackfindTrack (AbstractAnimationTrack::EType type) const
 Find a track of the given type. More...
 
AbstractAnimationTrackgetTrack (size_t idx)
 Look up one of the tracks by index. More...
 
const AbstractAnimationTrackgetTrack (size_t idx) const
 Look up one of the tracks by index (const version) More...
 
void collectKeyframes (std::set< Float > &result) const
 Return the used keyframes as a set. More...
 
void addTrack (AbstractAnimationTrack *track)
 Append an animation track. More...
 
void appendTransform (Float time, const Transform &trafo)
 Convenience function, which appends a linear transformation to the track. More...
 
const Transformeval (Float t) const
 Compute the transformation for the specified time value. More...
 
bool isStatic () const
 Is the animation static? More...
 
void sortAndSimplify ()
 Sort all animation tracks and remove unnecessary data (for user-provided input) More...
 
Point transformAffine (Float t, const Point &p) const
 Transform a point by an affine / non-projective matrix. More...
 
void transformAffine (Float t, const Point &p, Point &dest) const
 Transform a point by an affine / non-projective matrix (no temporaries) More...
 
Ray transformAffine (Float t, const Ray &r) const
 Transform a ray by an affine / non-projective matrix. More...
 
void transformAffine (Float t, const Ray &r, Ray &dest) const
 Transform a ray by an affine / non-projective matrix (no temporaries) More...
 
Point operator() (Float t, const Point &p) const
 Matrix-vector multiplication for points in 3d space. More...
 
void operator() (Float t, const Point &p, Point &dest) const
 Matrix-vector multiplication for points in 3d space (no temporaries) More...
 
Vector operator() (Float t, const Vector &v) const
 Matrix-vector multiplication for vectors in 3d space. More...
 
void operator() (Float t, const Vector &v, Vector &dest) const
 Matrix-vector multiplication for vectors in 3d space (no temporaries) More...
 
Normal operator() (Float t, const Normal &n) const
 Matrix-vector multiplication for normals in 3d space. More...
 
void operator() (Float t, const Normal &n, Normal &dest) const
 Matrix-vector multiplication for normals in 3d space (no temporaries) More...
 
Ray operator() (Float t, const Ray &r) const
 Transform a ray. More...
 
void operator() (Float t, const Ray &r, Ray &dest) const
 Transform a ray (no temporaries) More...
 
void prependScale (const Vector &scale)
 Prepend a scale transformation to the transform (this is often useful) More...
 
void serialize (Stream *stream) const
 Serialize to a binary data stream. More...
 
AABB1 getTimeBounds () const
 Return the extents along the time axis. More...
 
AABB getTranslationBounds () const
 Return an axis-aligned box bounding the amount of translation. More...
 
AABB getSpatialBounds (const AABB &aabb) const
 Compute the spatial bounds of a transformed (static) AABB. More...
 
std::string toString () const
 Return a human-readable string description. More...
 
virtual const ClassgetClass () const
 Retrieve this object's class. More...
 
- Public Member Functions inherited from Object
 Object ()
 Construct a new object. More...
 
int getRefCount () const
 Return the current reference count. More...
 
void incRef () const
 Increase the reference count of the object by one. More...
 
void decRef (bool autoDeallocate=true) const
 Decrease the reference count of the object and possibly deallocate it. More...
 

Static Public Attributes

static Classm_theClass
 
- Static Public Attributes inherited from Object
static Classm_theClass
 Pointer to the object's class descriptor. More...
 

Protected Member Functions

virtual ~AnimatedTransform ()
 Virtual destructor. More...
 
- Protected Member Functions inherited from Object
virtual ~Object ()
 Virtual private deconstructor. (Will only be called by ref) More...
 

Additional Inherited Members

- Static Public Member Functions inherited from Object
static void staticInitialization ()
 Initializes the built-in reference count debugger (if enabled) More...
 
static void staticShutdown ()
 Free the memory taken by staticInitialization() More...
 

Detailed Description

Animated transformation with an underlying keyframe representation.

Constructor & Destructor Documentation

mitsuba::AnimatedTransform::AnimatedTransform ( const Transform trafo = Transform())
inline

Create a new animated transformation.

When the transformation is constant (i.e. there are no animation tracks), the supplied parameter specifies the target value.

mitsuba::AnimatedTransform::AnimatedTransform ( Stream stream)

Unserialized an animated transformation from a binary data stream.

mitsuba::AnimatedTransform::AnimatedTransform ( const AnimatedTransform trafo)

Copy constructor.

virtual mitsuba::AnimatedTransform::~AnimatedTransform ( )
protectedvirtual

Virtual destructor.

Member Function Documentation

void mitsuba::AnimatedTransform::addTrack ( AbstractAnimationTrack track)

Append an animation track.

void mitsuba::AnimatedTransform::appendTransform ( Float  time,
const Transform trafo 
)

Convenience function, which appends a linear transformation to the track.

Internally, a polar decomposition is used to split the transformation into scale, translation, and rotation, which are all separately interpolated.

Remarks
Remember to run sortAndSimplify() after adding all transformations.
void mitsuba::AnimatedTransform::collectKeyframes ( std::set< Float > &  result) const

Return the used keyframes as a set.

const Transform& mitsuba::AnimatedTransform::eval ( Float  t) const
inline

Compute the transformation for the specified time value.

Note that the returned reference leads to a thread-local cache. This means that it will become invalidated at the next call to this function.

AbstractAnimationTrack* mitsuba::AnimatedTransform::findTrack ( AbstractAnimationTrack::EType  type)

Find a track of the given type.

const AbstractAnimationTrack* mitsuba::AnimatedTransform::findTrack ( AbstractAnimationTrack::EType  type) const

Find a track of the given type.

virtual const Class* mitsuba::AnimatedTransform::getClass ( ) const
virtual

Retrieve this object's class.

Reimplemented from Object.

AABB mitsuba::AnimatedTransform::getSpatialBounds ( const AABB aabb) const

Compute the spatial bounds of a transformed (static) AABB.

AABB1 mitsuba::AnimatedTransform::getTimeBounds ( ) const

Return the extents along the time axis.

AbstractAnimationTrack* mitsuba::AnimatedTransform::getTrack ( size_t  idx)
inline

Look up one of the tracks by index.

const AbstractAnimationTrack* mitsuba::AnimatedTransform::getTrack ( size_t  idx) const
inline

Look up one of the tracks by index (const version)

size_t mitsuba::AnimatedTransform::getTrackCount ( ) const
inline

Return the number of associated animation tracks.

AABB mitsuba::AnimatedTransform::getTranslationBounds ( ) const

Return an axis-aligned box bounding the amount of translation.

bool mitsuba::AnimatedTransform::isStatic ( ) const
inline

Is the animation static?

Point mitsuba::AnimatedTransform::operator() ( Float  t,
const Point p 
) const
inline

Matrix-vector multiplication for points in 3d space.

void mitsuba::AnimatedTransform::operator() ( Float  t,
const Point p,
Point dest 
) const
inline

Matrix-vector multiplication for points in 3d space (no temporaries)

Vector mitsuba::AnimatedTransform::operator() ( Float  t,
const Vector v 
) const
inline

Matrix-vector multiplication for vectors in 3d space.

void mitsuba::AnimatedTransform::operator() ( Float  t,
const Vector v,
Vector dest 
) const
inline

Matrix-vector multiplication for vectors in 3d space (no temporaries)

Normal mitsuba::AnimatedTransform::operator() ( Float  t,
const Normal n 
) const
inline

Matrix-vector multiplication for normals in 3d space.

void mitsuba::AnimatedTransform::operator() ( Float  t,
const Normal n,
Normal dest 
) const
inline

Matrix-vector multiplication for normals in 3d space (no temporaries)

Ray mitsuba::AnimatedTransform::operator() ( Float  t,
const Ray r 
) const
inline

Transform a ray.

void mitsuba::AnimatedTransform::operator() ( Float  t,
const Ray r,
Ray dest 
) const
inline

Transform a ray (no temporaries)

void mitsuba::AnimatedTransform::prependScale ( const Vector scale)

Prepend a scale transformation to the transform (this is often useful)

void mitsuba::AnimatedTransform::serialize ( Stream stream) const

Serialize to a binary data stream.

void mitsuba::AnimatedTransform::sortAndSimplify ( )

Sort all animation tracks and remove unnecessary data (for user-provided input)

std::string mitsuba::AnimatedTransform::toString ( ) const
virtual

Return a human-readable string description.

Reimplemented from Object.

Point mitsuba::AnimatedTransform::transformAffine ( Float  t,
const Point p 
) const
inline

Transform a point by an affine / non-projective matrix.

void mitsuba::AnimatedTransform::transformAffine ( Float  t,
const Point p,
Point dest 
) const
inline

Transform a point by an affine / non-projective matrix (no temporaries)

Ray mitsuba::AnimatedTransform::transformAffine ( Float  t,
const Ray r 
) const
inline

Transform a ray by an affine / non-projective matrix.

void mitsuba::AnimatedTransform::transformAffine ( Float  t,
const Ray r,
Ray dest 
) const
inline

Transform a ray by an affine / non-projective matrix (no temporaries)

Member Data Documentation

Class* mitsuba::AnimatedTransform::m_theClass
static

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