version 3.3

VRS::LookAt Class Reference

Look At Transformation. More...

#include <vrs/lookat.h>

Inheritance diagram for VRS::LookAt:

VRS::Transform VRS::RenderObj VRS::SharedObj VRS::Visitable

List of all members.

Public Member Functions

 LookAt (const Vector &from=Vector(0.0, 0.0, 1.0), const Vector &to=Vector::origin, const Vector &up=Vector(0.0, 1.0, 0.0))
void setFromToUp (const Vector &from, const Vector &to, const Vector &up)
 Sets from-, to-, and up-vectors.
void setFrom (const Vector &from)
Vector getFrom () const
 Get/set the from-vector.
void setTo (const Vector &to)
Vector getTo () const
 Get/set the to-vector.
void setUp (const Vector &up)
Vector getUp () const
 Get/set the up-vector.
bool isValid () const
virtual const Matrixmatrix (Engine *engine=NULL) const
 The matrix that represents the transformation.
 VRS_TYPEINFO (LookAt, Transform)
 VRS_SERIALIZABLE (LookAt)

Static Public Member Functions

static bool isValid (const Vector &from, const Vector &to, const Vector &up)


Detailed Description

Look At Transformation.

Constructor & Destructor Documentation

VRS::LookAt::LookAt ( const Vector from = Vector(0.0, 0.0, 1.0),
const Vector to = Vector::origin,
const Vector up = Vector(0.0, 1.0, 0.0) 
)

Look-at transformation. The `up' Vector is used to speficy the up-direction. However, eventually up will always be perpendicular to the view-direction. If the specified up vector leads to a degenerated view (i.e. if it is collinear with the view direction), another (valid) up-vector will be chosen instead.


Member Function Documentation

void VRS::LookAt::setFromToUp ( const Vector from,
const Vector to,
const Vector up 
)

Sets from-, to-, and up-vectors.

void VRS::LookAt::setFrom ( const Vector from  ) 

Vector VRS::LookAt::getFrom (  )  const [inline]

Get/set the from-vector.

void VRS::LookAt::setTo ( const Vector to  ) 

Vector VRS::LookAt::getTo (  )  const [inline]

Get/set the to-vector.

void VRS::LookAt::setUp ( const Vector up  ) 

Vector VRS::LookAt::getUp (  )  const [inline]

Get/set the up-vector.

bool VRS::LookAt::isValid (  )  const

static bool VRS::LookAt::isValid ( const Vector from,
const Vector to,
const Vector up 
) [static]

valid() checks if from, to, and up are currently degenerate. A LookAt object is valid, if (`to'-`from') and `up' are not approximately zero and not approximately collinear.

A LookAt object must be valid to define a valid orientation matrix. Consequently, calling matrix() method of an invalid LookAt object causes an assertion. When specifying a camera using a LookAt object, note that matrix() is called during rendering.

virtual const Matrix& VRS::LookAt::matrix ( Engine engine = NULL  )  const [virtual]

The matrix that represents the transformation.

Implements VRS::Transform.

VRS::LookAt::VRS_TYPEINFO ( LookAt  ,
Transform   
)

VRS::LookAt::VRS_SERIALIZABLE ( LookAt   ) 


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

Generated on Thu May 23 06:00:26 2013 by Doxygen 1.5.6
© 2001-2010 Hasso-Plattner-Institut | Impressum | Contact