CrystalSpace

Public API Reference

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:

Inheritance graph
[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 csColor4UpdateColors (csTicks current, const csColor4 *colors, int num_colors, uint32 version_id)=0
 Given the factory color data, return the animated data.
virtual const csVector3UpdateNormals (csTicks current, const csVector3 *normals, int num_normals, uint32 version_id)=0
 Given the factory normal data, return the animated data.
virtual const csVector2UpdateTexels (csTicks current, const csVector2 *texels, int num_texels, uint32 version_id)=0
 Given the factory texel data, return the animated data.
virtual const csVector3UpdateVertices (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:

Main ways to get pointers to this interface:

Main users of this interface:

Definition at line 479 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.

Remarks:
colors may be 0. In this case all color values should be assumed to be (0, 0, 0, 1).

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:
Generated for Crystal Space 1.2.1 by doxygen 1.5.3