Crystal Space: iGenMeshAnimationControl Struct Reference (Crystal Space Public API Reference)

| ## Public API Reference

- Main Page
- Modules
- Namespaces
- Classes
- Files
- Related Pages

- Alphabetical List
- Class List
- Class Hierarchy
- Class Members

# iGenMeshAnimationControl Struct Reference
[Mesh plugins]

Implementing this class allows the creation of classes that control animation of vertex, texel, normal, and color data right before it is being used. More...

`#include <imesh/genmesh.h>`

Inheritance diagram for iGenMeshAnimationControl:

[legend]
List of all members.

## Public Member Functions
virtual bool | AnimatesColors () const =0
| Returns true if this control animates colors.
virtual bool | AnimatesNormals () const =0
| Returns true if this control animates normals.
virtual bool | AnimatesTexels () const =0
| Returns true if this control animates texels.
virtual bool | AnimatesVertices () const =0
| Returns true if this control animates vertices.
virtual void | Update (csTicks current)=0
| General update method.
virtual const csColor4 * | UpdateColors (csTicks current, const csColor4 *colors, int num_colors, uint32 version_id)=0
| Given the factory color data, return the animated 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 data.
virtual const csVector2 * | UpdateTexels (csTicks current, const csVector2 *texels, int num_texels, uint32 version_id)=0
| Given the factory texel data, return the animated 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 data.

## Detailed Description

Implementing this class allows the creation of classes that control animation of vertex, texel, normal, and color data right before it is being used.

This can be used for various special effects. Note then when animating vertex that it is prefered that the bounding box of the object doesn't change too dramatically because this animation is called AFTER visibility culling!

Main creators of instances implementing this interface:

- iGenMeshAnimationControlFactory::CreateAnimationControl()

Main ways to get pointers to this interface:

- iGeneralMeshState::GetAnimationControl()

Main users of this interface:

- Genmesh plugin (crystalspace.mesh.object.genmesh)

Definition at line 471 of file genmesh.h.

## Member Function Documentation

virtual bool iGenMeshAnimationControl::AnimatesColors | ( |  | ) | const`[pure virtual]`

Returns true if this control animates colors.

virtual bool iGenMeshAnimationControl::AnimatesNormals | ( |  | ) | const`[pure virtual]`

Returns true if this control animates normals.

virtual bool iGenMeshAnimationControl::AnimatesTexels | ( |  | ) | const`[pure virtual]`

Returns true if this control animates texels.

virtual bool iGenMeshAnimationControl::AnimatesVertices | ( |  | ) | const`[pure virtual]`

Returns true if this control animates vertices.

virtual void iGenMeshAnimationControl::Update | ( | csTicks | current | ) | `[pure virtual]`

General update method.

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 data.

If this control doesn't animate colors then it will return the source array unchanged. The 'version_id' is a number that changes whenever the input array changes. 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 data.

If this control doesn't animate normals then it will return the source array unchanged. The 'version_id' is a number that changes whenever the input array changes. 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 csVector2* iGenMeshAnimationControl::UpdateTexels | ( | csTicks | current,
|  | const csVector2 * | texels,
|  | int | num_texels,
|  | uint32 | version_id |
| ) |  |  | `[pure virtual]`

Given the factory texel data, return the animated data.

If this control doesn't animate texels then it will return the source array unchanged. The 'version_id' is a number that changes whenever the input array changes. 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 data.

If this control doesn't animate vertices then it will return the source array unchanged. The 'version_id' is a number that changes whenever the input array changes. The animation control can use this to optimize the animation calculation by caching the animated version of the array and returning that one.

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

- imesh/genmesh.h