Visualization Library v1.0.3A lightweight C++ OpenGL middleware for 2D/3D graphics |
[Download] [Tutorials] [All Classes] [Grouped Classes] |
A Transform that aligns an Actor towards the camera. More...
#include <Billboard.hpp>
Public Member Functions | |
Billboard () | |
void | setPosition (const vec3 &pos) |
The billboard position and rotation center. | |
void | setPosition (real x, real y, real z) |
The billboard position and rotation center. | |
vec3 | position () |
The billboard position and rotation center. | |
void | setAxis (const vec3 &axis) |
The rotation axis in world coordinates. Used only for axis aligned billboards. | |
const vec3 & | axis () const |
The rotation axis in world coordinates. Used only for axis aligned billboards. | |
void | setNormal (const vec3 &normal) |
Used only for axis aligned billboards. | |
const vec3 & | normal () const |
Used only for axis aligned billboards. | |
virtual void | computeWorldMatrix (Camera *camera=NULL) |
Computes the world matrix by concatenating the parent's world matrix with its own local matrix. | |
EBillboardType | type () const |
The type of the billboard. | |
void | setType (EBillboardType type) |
The type of the billboard. | |
Protected Attributes | |
vec3 | mAxis |
vec3 | mNormal |
EBillboardType | mType |
A Transform that aligns an Actor towards the camera.
Definition at line 46 of file Billboard.hpp.
Billboard::Billboard | ( | ) |
Definition at line 38 of file Billboard.cpp.
References vl::BT_SphericalBillboard, mType, setAxis(), setNormal(), and VL_DEBUG_SET_OBJECT_NAME.
void Billboard::setPosition | ( | const vec3 & | pos ) |
The billboard position and rotation center.
Definition at line 51 of file Billboard.cpp.
References vl::Matrix4< float >::getTranslation(), and vl::Transform::setLocalMatrix().
The billboard position and rotation center.
Definition at line 55 of file Billboard.hpp.
References setPosition().
Referenced by setPosition().
vec3 Billboard::position | ( | ) |
The billboard position and rotation center.
Definition at line 46 of file Billboard.cpp.
References vl::Matrix4< T_Scalar >::getT(), and vl::Transform::localMatrix().
Referenced by computeWorldMatrix().
void vl::Billboard::setAxis | ( | const vec3 & | axis ) | [inline] |
The rotation axis in world coordinates. Used only for axis aligned billboards.
Definition at line 59 of file Billboard.hpp.
References vl::Vector3< T_Scalar >::normalize().
Referenced by Billboard().
const vec3& vl::Billboard::axis | ( | ) | const [inline] |
The rotation axis in world coordinates. Used only for axis aligned billboards.
Definition at line 61 of file Billboard.hpp.
Referenced by computeWorldMatrix().
void vl::Billboard::setNormal | ( | const vec3 & | normal ) | [inline] |
Used only for axis aligned billboards.
Definition at line 63 of file Billboard.hpp.
References vl::Vector3< T_Scalar >::normalize().
Referenced by Billboard().
const vec3& vl::Billboard::normal | ( | ) | const [inline] |
Used only for axis aligned billboards.
Definition at line 65 of file Billboard.hpp.
Referenced by computeWorldMatrix().
void Billboard::computeWorldMatrix | ( | Camera * | = NULL ) |
[virtual] |
Computes the world matrix by concatenating the parent's world matrix with its own local matrix.
Reimplemented from vl::Transform.
Definition at line 56 of file Billboard.cpp.
References vl::Transform::assumeIdentityWorldMatrix(), axis(), vl::BT_AxisAlignedBillboard, vl::BT_SphericalBillboard, vl::cross(), vl::dot(), vl::Matrix4< float >::getRotation(), vl::Matrix4< T_Scalar >::getT(), vl::Matrix4< float >::getTranslation(), vl::Matrix4< T_Scalar >::getY(), vl::Matrix4< T_Scalar >::getZ(), mNormal, vl::Camera::modelingMatrix(), normal(), vl::Vector3< T_Scalar >::normalize(), vl::normalize(), NULL, vl::Transform::parent(), position(), vl::Transform::setWorldMatrix(), vl::Matrix4< T_Scalar >::setX(), vl::Matrix4< T_Scalar >::setY(), vl::Matrix4< T_Scalar >::setZ(), type(), and vl::Transform::worldMatrix().
EBillboardType vl::Billboard::type | ( | ) | const [inline] |
The type of the billboard.
Definition at line 68 of file Billboard.hpp.
Referenced by computeWorldMatrix().
void vl::Billboard::setType | ( | EBillboardType | type ) | [inline] |
The type of the billboard.
Definition at line 70 of file Billboard.hpp.
vec3 vl::Billboard::mAxis [protected] |
Definition at line 73 of file Billboard.hpp.
vec3 vl::Billboard::mNormal [protected] |
Definition at line 74 of file Billboard.hpp.
Referenced by computeWorldMatrix().
EBillboardType vl::Billboard::mType [protected] |
Definition at line 75 of file Billboard.hpp.
Referenced by Billboard().