![]() |
Public API Reference |
![]() |
Implementing this class allows to control the animation of the vertex, texel, normal, color and bounding box data of the genmesh. More...
#include <imesh/genmesh.h>
Public Member Functions | |
virtual bool | AnimatesBBoxRadius () const =0 |
Returns true if this control animates the bounding box and the radius of the genmesh. | |
virtual bool | AnimatesColors () const =0 |
Returns true if this control animates the colors of the genmesh. | |
virtual bool | AnimatesNormals () const =0 |
Returns true if this control animates the normals of the genmesh. | |
virtual bool | AnimatesTexels () const =0 |
Returns true if this control animates the texels of the genmesh. | |
virtual bool | AnimatesVertices () const =0 |
Returns true if this control animates the vertices of the genmesh. | |
virtual void | Update (csTicks current, int num_verts, uint32 version_id)=0 |
General update method. | |
virtual const csBox3 & | UpdateBoundingBox (csTicks current, uint32 version_id, const csBox3 &bbox)=0 |
Given the bounding box of the factory, return the bounding box of the whole genmesh. | |
virtual const csBox3 * | UpdateBoundingBoxes (csTicks current, uint32 version_id)=0 |
Return the animated bounding boxes of the given submesh. | |
virtual const csColor4 * | UpdateColors (csTicks current, const csColor4 *colors, int num_colors, uint32 version_id)=0 |
Given the factory color data, return the animated color data. | |
virtual const csVector3 * | UpdateNormals (csTicks current, const csVector3 *normals, int num_normals, uint32 version_id)=0 |
Given the factory normal data, return the animated normal data. | |
virtual const float | UpdateRadius (csTicks current, uint32 version_id, const float radius)=0 |
Given the radius of the factory, return the radius of the whole genmesh. | |
virtual const csVector2 * | UpdateTexels (csTicks current, const csVector2 *texels, int num_texels, uint32 version_id)=0 |
Given the factory texel data, return the animated texel data. | |
virtual const csVector3 * | UpdateVertices (csTicks current, const csVector3 *verts, int num_verts, uint32 version_id)=0 |
Given the factory vertex data, return the animated vertex data. |
Implementing this class allows to control the animation of the vertex, texel, normal, color and bounding box data of the genmesh.
Note that, when animating the vertex data, it is prefered that the bounding box of the object doesn't change too dramatically because this animation is called AFTER the visibility culling.
Main creators of instances implementing this interface:
Main ways to get pointers to this interface:
Main users of this interface:
virtual bool iGenMeshAnimationControl::AnimatesBBoxRadius | ( | ) | const [pure virtual] |
Returns true if this control animates the bounding box and the radius of the genmesh.
virtual bool iGenMeshAnimationControl::AnimatesColors | ( | ) | const [pure virtual] |
Returns true if this control animates the colors of the genmesh.
virtual bool iGenMeshAnimationControl::AnimatesNormals | ( | ) | const [pure virtual] |
Returns true if this control animates the normals of the genmesh.
virtual bool iGenMeshAnimationControl::AnimatesTexels | ( | ) | const [pure virtual] |
Returns true if this control animates the texels of the genmesh.
virtual bool iGenMeshAnimationControl::AnimatesVertices | ( | ) | const [pure virtual] |
Returns true if this control animates the vertices of the genmesh.
virtual void iGenMeshAnimationControl::Update | ( | csTicks | current, |
int | num_verts, | ||
uint32 | version_id | ||
) | [pure virtual] |
General update method.
It is called before all other update methods.
current | The current time given by the virtual clock |
num_verts | The count of vertices of the genmesh |
version_id | The version number of the shape of the genmesh, as returned by iObjectModel::GetShapeNumber(). The animation control can use this to optimize the animation calculation by caching the animated version of the array and returning that one. |
virtual const csBox3& iGenMeshAnimationControl::UpdateBoundingBox | ( | csTicks | current, |
uint32 | version_id, | ||
const csBox3 & | bbox | ||
) | [pure virtual] |
Given the bounding box of the factory, return the bounding box of the whole genmesh.
current | The current time given by the virtual clock |
version_id | The version number of the shape of the genmesh, as returned by iObjectModel::GetShapeNumber(). The animation control can use this to optimize the animation calculation by caching the animated version of the array and returning that one. |
bbox | The bounding box of the factory of the genmesh |
virtual const csBox3* iGenMeshAnimationControl::UpdateBoundingBoxes | ( | csTicks | current, |
uint32 | version_id | ||
) | [pure virtual] |
Return the animated bounding boxes of the given submesh.
If this control doesn't animate the bounding boxes and radius, then it will simply do nothing and return nullptr.
current | The current time given by the virtual clock |
version_id | The version number of the shape of the genmesh, as returned by iObjectModel::GetShapeNumber(). The animation control can use this to optimize the animation calculation by caching the animated version of the array and returning that one. |
virtual const csColor4* iGenMeshAnimationControl::UpdateColors | ( | csTicks | current, |
const csColor4 * | colors, | ||
int | num_colors, | ||
uint32 | version_id | ||
) | [pure virtual] |
Given the factory color data, return the animated color data.
If this control doesn't animate colors then it will return the source array unchanged, otherwise it has to allocate the data array.
current | The current time given by the virtual clock |
colors | The original colors of the genmesh |
num_verts | The count of colors of the genmesh |
version_id | The version number of the shape of the genmesh, as returned by iObjectModel::GetShapeNumber(). The animation control can use this to optimize the animation calculation by caching the animated version of the array and returning that one. |
virtual const csVector3* iGenMeshAnimationControl::UpdateNormals | ( | csTicks | current, |
const csVector3 * | normals, | ||
int | num_normals, | ||
uint32 | version_id | ||
) | [pure virtual] |
Given the factory normal data, return the animated normal data.
If this control doesn't animate normals then it will return the source array unchanged, otherwise it has to allocate the data array.
current | The current time given by the virtual clock |
normals | The normals of the factory of the genmesh |
num_verts | The count of normals of the genmesh |
version_id | The version number of the shape of the genmesh, as returned by iObjectModel::GetShapeNumber(). The animation control can use this to optimize the animation calculation by caching the animated version of the array and returning that one. |
virtual const float iGenMeshAnimationControl::UpdateRadius | ( | csTicks | current, |
uint32 | version_id, | ||
const float | radius | ||
) | [pure virtual] |
Given the radius of the factory, return the radius of the whole genmesh.
current | The current time given by the virtual clock |
version_id | The version number of the shape of the genmesh, as returned by iObjectModel::GetShapeNumber(). The animation control can use this to optimize the animation calculation by caching the animated version of the array and returning that one. |
radius | The radius of the factory of the genmesh |
virtual const csVector2* iGenMeshAnimationControl::UpdateTexels | ( | csTicks | current, |
const csVector2 * | texels, | ||
int | num_texels, | ||
uint32 | version_id | ||
) | [pure virtual] |
Given the factory texel data, return the animated texel data.
If this control doesn't animate texels then it will return the source array unchanged, otherwise it has to allocate the data array.
current | The current time given by the virtual clock |
texels | The texels of the factory of the genmesh |
num_texels | The count of texels of the genmesh |
version_id | The version number of the shape of the genmesh, as returned by iObjectModel::GetShapeNumber(). The animation control can use this to optimize the animation calculation by caching the animated version of the array and returning that one. |
virtual const csVector3* iGenMeshAnimationControl::UpdateVertices | ( | csTicks | current, |
const csVector3 * | verts, | ||
int | num_verts, | ||
uint32 | version_id | ||
) | [pure virtual] |
Given the factory vertex data, return the animated vertex data.
If this control doesn't animate vertices then it will return the source array unchanged, otherwise it has to allocate the data array.
current | The current time given by the virtual clock |
verts | The vertices of the factory of the genmesh |
num_verts | The count of vertices of the genmesh |
version_id | The version number of the shape of the genmesh, as returned by iObjectModel::GetShapeNumber(). The animation control can use this to optimize the animation calculation by caching the animated version of the array and returning that one. |