version 3.3

VRS::Billboard Class Reference

#include <vrs/billboard.h>

Inheritance diagram for VRS::Billboard:

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

List of all members.

Public Types

enum  AlignmentType { Spherical, Cylindrical, Off }

Public Member Functions

 VRS_SERIALIZABLE_CLASS_ENUM (AlignmentType)
 Billboard (AlignmentType type=Billboard::Spherical, const Vector &center=Vector(0, 0, 0))
 Constructs the transformation with the given parameters.
AlignmentType getType () const
 Returns the type of the billboarding.
void setType (AlignmentType type)
 Sets the type of the billboarding.
Vector getCenter () const
 Sets the center of the billboard transformation.
void setCenter (const Vector &center)
 Returns the center of the billboard transformation.
virtual const Matrixmatrix (Engine *engine=NULL) const
 Calculates the needed transformation matrix.
 VRS_TYPEINFO (Billboard, Transform)
 VRS_SERIALIZABLE (Billboard)


Detailed Description

Transformation for billboarding shapes The billboard transformation transforms the +z axis of the current model coordinate system so that it points away from the camera position. We distinguish two billboarding types: For a cylindrical billboarding, a rotation about the y axis is performed in order to adjust the +z axis. For a spherical billboarding, the local coordinate system is orientated in such a way that the +x axis is pointing rightwards and the +y axis upwards, respectively. In both modes, the local coordinate system is translated to the given 'center'. If the type is 'off' only the translation is performed.

Member Enumeration Documentation

Enumerator:
Spherical 
Cylindrical 
Off 


Constructor & Destructor Documentation

VRS::Billboard::Billboard ( AlignmentType  type = Billboard::Spherical,
const Vector center = Vector(0, 0, 0) 
)

Constructs the transformation with the given parameters.


Member Function Documentation

VRS::Billboard::VRS_SERIALIZABLE_CLASS_ENUM ( AlignmentType   ) 

AlignmentType VRS::Billboard::getType (  )  const

Returns the type of the billboarding.

void VRS::Billboard::setType ( AlignmentType  type  ) 

Sets the type of the billboarding.

Vector VRS::Billboard::getCenter (  )  const

Sets the center of the billboard transformation.

void VRS::Billboard::setCenter ( const Vector center  ) 

Returns the center of the billboard transformation.

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

Calculates the needed transformation matrix.

Requires a valid engine because this transformation depends on the current modelview matrix.

Implements VRS::Transform.

VRS::Billboard::VRS_TYPEINFO ( Billboard  ,
Transform   
)

VRS::Billboard::VRS_SERIALIZABLE ( Billboard   ) 


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

Generated on Fri May 18 06:00:17 2012 by Doxygen 1.5.6
© 2001-2010 Hasso-Plattner-Institut | Impressum | Contact