CrystalSpace

Public API Reference

iAnimatedMeshFactory Struct Reference
[Mesh plugins]

State of animated mesh object factory. More...

#include <imesh/animesh.h>

Inheritance diagram for iAnimatedMeshFactory:

List of all members.

Public Member Functions

SubMesh handling

virtual
iAnimatedMeshFactorySubMesh
CreateSubMesh (iRenderBuffer *indices, const char *name, bool visible)=0
 Create a new submesh.
virtual
iAnimatedMeshFactorySubMesh
CreateSubMesh (const csArray< iRenderBuffer * > &indices, const csArray< csArray< unsigned int > > &boneIndices, const char *name, bool visible)=0
 Create a new submesh.
virtual
iAnimatedMeshFactorySubMesh
GetSubMesh (size_t index) const =0
 Get a submesh by index.
virtual size_t FindSubMesh (const char *name) const =0
 Find a submesh index by name, returns (size_t)-1 if not found.
virtual size_t GetSubMeshCount () const =0
 Get the total number of submeshes.
virtual void DeleteSubMesh (iAnimatedMeshFactorySubMesh *mesh)=0
 Remove a submesh from factory.
Vertex data definition and handling

virtual uint GetVertexCount () const =0
 Get the number of vertices in the mesh.
virtual iRenderBufferGetVertices ()=0
 Get a pointer to the buffer specifying vertices.
virtual bool SetVertices (iRenderBuffer *renderBuffer)=0
 Set the render buffer to use for vertices.
virtual iRenderBufferGetTexCoords ()=0
 Get a pointer to the buffer specifying texture coordinates.
virtual bool SetTexCoords (iRenderBuffer *renderBuffer)=0
 Set the render buffer to use for texture coordinates.
virtual iRenderBufferGetNormals ()=0
 Get a pointer to the buffer specifying vertex normals.
virtual bool SetNormals (iRenderBuffer *renderBuffer)=0
 Set the render buffer to use for normals.
virtual iRenderBufferGetTangents ()=0
 Get a pointer to the buffer specifying vertex tangents.
virtual bool SetTangents (iRenderBuffer *renderBuffer)=0
 Set the render buffer to use for tangents.
virtual iRenderBufferGetBinormals ()=0
 Get a pointer to the buffer specifying vertex binormals.
virtual bool SetBinormals (iRenderBuffer *renderBuffer)=0
 Set the render buffer to use for binormals.
virtual iRenderBufferGetColors ()=0
 Get a pointer to the buffer specifying vertex color.
virtual bool SetColors (iRenderBuffer *renderBuffer)=0
 Set the render buffer to use for vertex color.
virtual void Invalidate ()=0
 Update the mesh after modifying its geometry.
Bone interface and influence

virtual void SetSkeletonFactory (iSkeletonFactory2 *skeletonFactory)=0
 Set the skeleton factory to associate with the mesh factory.
virtual iSkeletonFactory2GetSkeletonFactory () const =0
 Get the skeleton factory associated with the mesh factory.
virtual void SetBoneInfluencesPerVertex (uint num)=0
 Set the requested number of bone influences per vertex.
virtual uint GetBoneInfluencesPerVertex () const =0
 Get the number of bone influences per vertex.
virtual
csAnimatedMeshBoneInfluence
GetBoneInfluences ()=0
 Get the bone influences.
Morph targets

virtual iAnimatedMeshMorphTargetCreateMorphTarget (const char *name)=0
 Create a new morph target.
virtual iAnimatedMeshMorphTargetGetMorphTarget (uint target)=0
 Get a specific morph target.
virtual uint GetMorphTargetCount () const =0
 Get number of morph targets.
virtual void ClearMorphTargets ()=0
 Remove all morph targets.
virtual uint FindMorphTarget (const char *name) const =0
 Find the index of the morph target with the given name (or (uint)~0 if no target with that name exists).
Socket

virtual void CreateSocket (BoneID bone, const csReversibleTransform &transform, const char *name)=0
 Create a new socket.
virtual size_t GetSocketCount () const =0
 Get the number of sockets in factory.
virtual
iAnimatedMeshSocketFactory
GetSocket (size_t index) const =0
 Get a specific socket instance.
virtual uint FindSocket (const char *name) const =0
 Find the index of the socket with the given name (or (uint)~0 if no socket with that name exists).

Detailed Description

State of animated mesh object factory.

Definition at line 155 of file animesh.h.


Member Function Documentation

virtual void iAnimatedMeshFactory::ClearMorphTargets (  )  [pure virtual]

Remove all morph targets.

virtual iAnimatedMeshMorphTarget* iAnimatedMeshFactory::CreateMorphTarget ( const char *  name  )  [pure virtual]

Create a new morph target.

Parameters:
name Identifier of the morph target. Can be 0 or non-unique, but setting a unique name usually helps with finding a morph target later on.
virtual void iAnimatedMeshFactory::CreateSocket ( BoneID  bone,
const csReversibleTransform transform,
const char *  name 
) [pure virtual]

Create a new socket.

Parameters:
bone Bone id to connect socket for
transform Initial transform
name Name of the socket, optional
virtual iAnimatedMeshFactorySubMesh* iAnimatedMeshFactory::CreateSubMesh ( const csArray< iRenderBuffer * > &  indices,
const csArray< csArray< unsigned int > > &  boneIndices,
const char *  name,
bool  visible 
) [pure virtual]

Create a new submesh.

This creates a submesh which have several triangle sets<->bone mapping pairs. Such a submesh is useful when you want to limit the number of bones per batch rendered.

Parameters:
indices Array of index buffers to use per part
boneIndices Array of indices of bones to use for bone mappings
virtual iAnimatedMeshFactorySubMesh* iAnimatedMeshFactory::CreateSubMesh ( iRenderBuffer indices,
const char *  name,
bool  visible 
) [pure virtual]

Create a new submesh.

This creates a submesh that use the normal per-vertex bone influence mappings. The newly created submesh will use all bones.

Parameters:
indices Index buffer to use for the newly created submesh.
virtual void iAnimatedMeshFactory::DeleteSubMesh ( iAnimatedMeshFactorySubMesh mesh  )  [pure virtual]

Remove a submesh from factory.

virtual uint iAnimatedMeshFactory::FindMorphTarget ( const char *  name  )  const [pure virtual]

Find the index of the morph target with the given name (or (uint)~0 if no target with that name exists).

virtual uint iAnimatedMeshFactory::FindSocket ( const char *  name  )  const [pure virtual]

Find the index of the socket with the given name (or (uint)~0 if no socket with that name exists).

virtual size_t iAnimatedMeshFactory::FindSubMesh ( const char *  name  )  const [pure virtual]

Find a submesh index by name, returns (size_t)-1 if not found.

virtual iRenderBuffer* iAnimatedMeshFactory::GetBinormals (  )  [pure virtual]

Get a pointer to the buffer specifying vertex binormals.

The buffer is at least as many entries as specified by the vertex count. You must call Invalidate() after modifying it.

virtual csAnimatedMeshBoneInfluence* iAnimatedMeshFactory::GetBoneInfluences (  )  [pure virtual]

Get the bone influences.

You must call Invalidate() after modifying it.

virtual uint iAnimatedMeshFactory::GetBoneInfluencesPerVertex (  )  const [pure virtual]

Get the number of bone influences per vertex.

virtual iRenderBuffer* iAnimatedMeshFactory::GetColors (  )  [pure virtual]

Get a pointer to the buffer specifying vertex color.

The buffer is at least as many entries as specified by the vertex count. You must call Invalidate() after modifying it.

virtual iAnimatedMeshMorphTarget* iAnimatedMeshFactory::GetMorphTarget ( uint  target  )  [pure virtual]

Get a specific morph target.

virtual uint iAnimatedMeshFactory::GetMorphTargetCount (  )  const [pure virtual]

Get number of morph targets.

virtual iRenderBuffer* iAnimatedMeshFactory::GetNormals (  )  [pure virtual]

Get a pointer to the buffer specifying vertex normals.

The buffer is at least as many entries as specified by the vertex count. You must call Invalidate() after modifying it.

virtual iSkeletonFactory2* iAnimatedMeshFactory::GetSkeletonFactory (  )  const [pure virtual]

Get the skeleton factory associated with the mesh factory.

virtual iAnimatedMeshSocketFactory* iAnimatedMeshFactory::GetSocket ( size_t  index  )  const [pure virtual]

Get a specific socket instance.

virtual size_t iAnimatedMeshFactory::GetSocketCount (  )  const [pure virtual]

Get the number of sockets in factory.

virtual iAnimatedMeshFactorySubMesh* iAnimatedMeshFactory::GetSubMesh ( size_t  index  )  const [pure virtual]

Get a submesh by index.

virtual size_t iAnimatedMeshFactory::GetSubMeshCount (  )  const [pure virtual]

Get the total number of submeshes.

virtual iRenderBuffer* iAnimatedMeshFactory::GetTangents (  )  [pure virtual]

Get a pointer to the buffer specifying vertex tangents.

The buffer is at least as many entries as specified by the vertex count. You must call Invalidate() after modifying it.

virtual iRenderBuffer* iAnimatedMeshFactory::GetTexCoords (  )  [pure virtual]

Get a pointer to the buffer specifying texture coordinates.

The buffer is at least as many entries as specified by the vertex count. You must call Invalidate() after modifying it.

virtual uint iAnimatedMeshFactory::GetVertexCount (  )  const [pure virtual]

Get the number of vertices in the mesh.

virtual iRenderBuffer* iAnimatedMeshFactory::GetVertices (  )  [pure virtual]

Get a pointer to the buffer specifying vertices.

The buffer is at least as many entries as specified by the vertex count. You must call Invalidate() after modifying it.

virtual void iAnimatedMeshFactory::Invalidate (  )  [pure virtual]

Update the mesh after modifying its geometry.

virtual bool iAnimatedMeshFactory::SetBinormals ( iRenderBuffer renderBuffer  )  [pure virtual]

Set the render buffer to use for binormals.

Must hold at least as many elements as the vertex buffer.

Returns:
false if the buffer doesn't follow required specifications
virtual void iAnimatedMeshFactory::SetBoneInfluencesPerVertex ( uint  num  )  [pure virtual]

Set the requested number of bone influences per vertex.

The mesh might not support as many and/or round it, so check the real amount with GetBoneInfluencesPerVertex ().

virtual bool iAnimatedMeshFactory::SetColors ( iRenderBuffer renderBuffer  )  [pure virtual]

Set the render buffer to use for vertex color.

Must hold at least as many elements as the vertex buffer.

Returns:
false if the buffer doesn't follow required specifications
virtual bool iAnimatedMeshFactory::SetNormals ( iRenderBuffer renderBuffer  )  [pure virtual]

Set the render buffer to use for normals.

Must hold at least as many elements as the vertex buffer.

Returns:
false if the buffer doesn't follow required specifications
virtual void iAnimatedMeshFactory::SetSkeletonFactory ( iSkeletonFactory2 skeletonFactory  )  [pure virtual]

Set the skeleton factory to associate with the mesh factory.

When a mesh is instanced it will by default get a skeleton from this skeleton factory.

virtual bool iAnimatedMeshFactory::SetTangents ( iRenderBuffer renderBuffer  )  [pure virtual]

Set the render buffer to use for tangents.

Must hold at least as many elements as the vertex buffer.

Returns:
false if the buffer doesn't follow required specifications
virtual bool iAnimatedMeshFactory::SetTexCoords ( iRenderBuffer renderBuffer  )  [pure virtual]

Set the render buffer to use for texture coordinates.

Must hold at least as many elements as the vertex buffer.

Returns:
false if the buffer doesn't follow required specifications
virtual bool iAnimatedMeshFactory::SetVertices ( iRenderBuffer renderBuffer  )  [pure virtual]

Set the render buffer to use for vertices.

The buffer must contain at least three components per elements and its length will specify the number of vertices within the mesh.

Returns:
false if the buffer doesn't follow required specifications

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

Generated for Crystal Space 1.4.1 by doxygen 1.7.1