Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | Related Pages

AnimatedSubMesh Class Reference

#include <animatedsubmesh.h>

Inheritance diagram for AnimatedSubMesh:

Inheritance graph
[legend]
Collaboration diagram for AnimatedSubMesh:

Collaboration graph
[legend]
List of all members.

Detailed Description

A vertex animated submesh.

Author:
Mattias Jansson (mattias@realityrift.com


Public Types

enum  SUBMESHTYPE { SUBMESH = 0x0001, ANIMATEDSUBMESH = 0x0002, SKELETALSUBMESH = 0x0003, PATCHSURFACE = 0x0004 }
 Supported sub mesh types. More...


Public Member Functions

 AnimatedSubMesh ()
 AnimatedSubMesh (const AnimatedSubMesh &rkSubMesh)
virtual ~AnimatedSubMesh ()
virtual void Update (float fDeltaTime)
virtual SubMeshDuplicate () const
virtual unsigned int GetType () const
virtual VertexBufferPtrGetVertexBuffer ()
virtual PolygonBufferPtr & GetPolygonBuffer ()
virtual void SetVertexBuffer (VertexBufferPtr pkVertices)
virtual void SetPolygonBuffer (PolygonBufferPtr pkPolygons)
virtual void SetShadowVertexBuffer (VertexBufferPtr pkVertices)
virtual void SetShadowPolygonBuffer (PolygonBufferPtr pkPolygons)
virtual void Render (RenderPrimitive *pkPrimitive, Frustum *pkFrustum=0)
bool IsActive () const
virtual void Activate ()
virtual void Deactivate ()
bool Toggle ()
void InterpolateVertices (VertexBufferPtr pkBuffer)
virtual bool AddAnimation (SubMeshAnimation *pkAnimation)
virtual bool SetCurrentAnimation (unsigned int uiID)
virtual bool SetCurrentAnimation (const HashString &rstrName)
const std::vector< SubMeshAnimation * > & GetAnimations () const
SubMeshAnimationGetCurrentAnimation ()

Public Attributes

MaterialPtr m_pkMaterial
bool m_bChanged

Protected Member Functions

virtual void UpdateData ()

Protected Attributes

VertexBufferPtr m_pkVertices
PolygonBufferPtr m_pkPolygons
bool m_bNeedUpdate
VertexBufferPtr m_pkShadowVertices
PolygonBufferPtr m_pkShadowPolygons
bool m_bActive
std::vector< SubMeshAnimation * > m_vpkAnimations
unsigned int m_uiCurAnim
SubMeshAnimationm_pkCurAnim


Member Enumeration Documentation

enum SUBMESHTYPE [inherited]
 

Supported sub mesh types.

Enumeration values:
SUBMESH  Plain static submesh
ANIMATEDSUBMESH  Vertex-animated submesh
SKELETALSUBMESH  Skeletal-animated (skinned) submesh
PATCHSURFACE  Patch surface submesh (bezier, nurbs...)


Constructor & Destructor Documentation

AnimatedSubMesh  ) 
 

AnimatedSubMesh const AnimatedSubMesh rkSubMesh  ) 
 

Parameters:
rkSubMesh Reference submesh object to copy data from

virtual ~AnimatedSubMesh  )  [virtual]
 


Member Function Documentation

virtual void UpdateData  )  [protected, virtual]
 

Update data

Reimplemented from SubMesh.

virtual void Update float  fDeltaTime  )  [virtual]
 

Update this submesh

Parameters:
fDeltaTime Delta time passed

Reimplemented from SubMesh.

virtual SubMesh* Duplicate  )  const [virtual]
 

Returns:
new submesh that is duplicate of this

Reimplemented from SubMesh.

virtual unsigned int GetType  )  const [inline, virtual]
 

Returns:
Sub mesh type

Reimplemented from SubMesh.

virtual VertexBufferPtr& GetVertexBuffer  )  [inline, virtual, inherited]
 

Returns:
Vertex buffer

Reimplemented in SkeletalSubMesh.

virtual PolygonBufferPtr& GetPolygonBuffer  )  [inline, virtual, inherited]
 

Returns:
Polygon buffer

virtual void SetVertexBuffer VertexBufferPtr  pkVertices  )  [virtual, inherited]
 

Parameters:
pkVertices New vertex buffer

Reimplemented in PatchSurfaceSubMesh.

virtual void SetPolygonBuffer PolygonBufferPtr  pkPolygons  )  [virtual, inherited]
 

Parameters:
pkPolygons New polygon buffer

Reimplemented in PatchSurfaceSubMesh.

virtual void SetShadowVertexBuffer VertexBufferPtr  pkVertices  )  [virtual, inherited]
 

Parameters:
pkVertices New shadow vertex buffer

virtual void SetShadowPolygonBuffer PolygonBufferPtr  pkPolygons  )  [virtual, inherited]
 

Parameters:
pkPolygons New shadow polygon buffer

virtual void Render RenderPrimitive pkPrimitive,
Frustum pkFrustum = 0
[virtual, inherited]
 

Render submesh geometry

Parameters:
pkPrimitive Presetup render primitive object (needed for inverse mesh transform matrix)
pkFrustum Current view frustum

bool IsActive  )  const [inline, inherited]
 

Query state of object

Returns:
true if active, false if not

void Activate  )  [inline, virtual, inherited]
 

Activate object

void Deactivate  )  [inline, virtual, inherited]
 

Deactivate object

bool Toggle  )  [inline, inherited]
 

Toggle active state. This method does not need to be overloaded, it is only a wrapper to Activate and Deactivate

Returns:
true if activated, false if deactivated

void InterpolateVertices VertexBufferPtr  pkBuffer  )  [inherited]
 

Interpolate vertices

Parameters:
pkBuffer Vertex buffer receiving data

virtual bool AddAnimation SubMeshAnimation pkAnimation  )  [inline, virtual, inherited]
 

Add new animation

Parameters:
pkAnimation New animation
Returns:
true if added, false if id or name conflicts with already registered animation

virtual bool SetCurrentAnimation unsigned int  uiID  )  [inline, virtual, inherited]
 

Set current animation by ID

Parameters:
uiID Animation ID
Returns:
true if successful, false if animation not found

virtual bool SetCurrentAnimation const HashString rstrName  )  [inline, virtual, inherited]
 

Set current animation by name

Parameters:
rstrName Animation name
Returns:
true if successful, false if animation not found

const std::vector< SubMeshAnimation * >& GetAnimations  )  const [inline, inherited]
 

Returns:
All animations

SubMeshAnimation * GetCurrentAnimation  )  [inline, inherited]
 

Returns:
Current animations


Member Data Documentation

VertexBufferPtr m_pkVertices [protected, inherited]
 

Vertex buffer

PolygonBufferPtr m_pkPolygons [protected, inherited]
 

Polygon buffer

bool m_bNeedUpdate [protected, inherited]
 

Flag indicating update needed

VertexBufferPtr m_pkShadowVertices [protected, inherited]
 

Shadow vertex buffer

PolygonBufferPtr m_pkShadowPolygons [protected, inherited]
 

Shadow polygon buffer

MaterialPtr m_pkMaterial [inherited]
 

Material

bool m_bChanged [inherited]
 

Flag indicating geometry has changed

bool m_bActive [protected, inherited]
 

Active flag

std::vector< SubMeshAnimation * > m_vpkAnimations [protected, inherited]
 

Animations

unsigned int m_uiCurAnim [protected, inherited]
 

Current animation

SubMeshAnimation * m_pkCurAnim [protected, inherited]
 

Current animation object ptr


The documentation for this class was generated from the following file:
Generated on Wed Jan 21 14:21:10 2004 for NeoEngine by doxygen 1.3.5