Home | Namespaces | Hierarchy | Alphabetical List | Class list | Files | Namespace Members | Class members | File members

irr::scene::SAnimatedMesh Struct Reference

Simple implementation of the IAnimatedMesh interface. More...

#include <SAnimatedMesh.h>

Inheritance diagram for irr::scene::SAnimatedMesh:

irr::scene::IAnimatedMesh irr::scene::IMesh irr::IReferenceCounted List of all members.

Public Member Functions

void addMesh (IMesh *mesh)
 adds a Mesh
virtual const core::aabbox3d<
f32 > & 
getBoundingBox () const
 Returns an axis aligned bounding box of the mesh.
virtual u32 getFrameCount () const
 Gets the frame count of the animated mesh.
virtual IMeshgetMesh (s32 frame, s32 detailLevel, s32 startFrameLoop=-1, s32 endFrameLoop=-1)
 Returns the IMesh interface for a frame.
virtual IMeshBuffergetMeshBuffer (const video::SMaterial &material) const
 Returns pointer to a mesh buffer which fits a material.
virtual IMeshBuffergetMeshBuffer (u32 nr) const
 returns pointer to a mesh buffer
virtual u32 getMeshBufferCount () const
 returns amount of mesh buffers.
virtual E_ANIMATED_MESH_TYPE getMeshType () const
 Returns the type of the animated mesh.
void recalculateBoundingBox ()
 Recalculates the bounding box.
 SAnimatedMesh (scene::IMesh *mesh, scene::E_ANIMATED_MESH_TYPE type)
 constructor
 SAnimatedMesh ()
 constructor
virtual void setBoundingBox (const core::aabbox3df &box)
 set user axis aligned bounding box
virtual void setMaterialFlag (video::E_MATERIAL_FLAG flag, bool newvalue)
 Set a material flag for all meshbuffers of this mesh.
virtual ~SAnimatedMesh ()
 destructor

Public Attributes

core::aabbox3d< f32Box
 The bounding box of this mesh.
core::array< IMesh * > Meshes
 All meshes defining the animated mesh.
E_ANIMATED_MESH_TYPE Type
 Tyhe type fo the mesh.

Detailed Description

Simple implementation of the IAnimatedMesh interface.

Definition at line 19 of file SAnimatedMesh.h.


Constructor & Destructor Documentation

irr::scene::SAnimatedMesh::SAnimatedMesh  )  [inline]
 

constructor

Definition at line 22 of file SAnimatedMesh.h.

References irr::IReferenceCounted::setDebugName().

irr::scene::SAnimatedMesh::SAnimatedMesh scene::IMesh mesh,
scene::E_ANIMATED_MESH_TYPE  type
[inline]
 

constructor

Definition at line 31 of file SAnimatedMesh.h.

References addMesh(), recalculateBoundingBox(), and irr::IReferenceCounted::setDebugName().

virtual irr::scene::SAnimatedMesh::~SAnimatedMesh  )  [inline, virtual]
 

destructor

Definition at line 42 of file SAnimatedMesh.h.

References Meshes, and irr::core::array< T, TAlloc >::size().


Member Function Documentation

void irr::scene::SAnimatedMesh::addMesh IMesh mesh  )  [inline]
 

adds a Mesh

Definition at line 76 of file SAnimatedMesh.h.

References irr::IReferenceCounted::grab(), Meshes, and irr::core::array< T, TAlloc >::push_back().

Referenced by SAnimatedMesh().

virtual const core::aabbox3d<f32>& irr::scene::SAnimatedMesh::getBoundingBox  )  const [inline, virtual]
 

Returns an axis aligned bounding box of the mesh.

Returns:
A bounding box of this mesh is returned.

Implements irr::scene::IMesh.

Definition at line 88 of file SAnimatedMesh.h.

References Box.

Referenced by recalculateBoundingBox().

virtual u32 irr::scene::SAnimatedMesh::getFrameCount  )  const [inline, virtual]
 

Gets the frame count of the animated mesh.

Returns:
Amount of frames. If the amount is 1, it is a static, non animated mesh.

Implements irr::scene::IAnimatedMesh.

Definition at line 52 of file SAnimatedMesh.h.

References Meshes, and irr::core::array< T, TAlloc >::size().

virtual IMesh* irr::scene::SAnimatedMesh::getMesh s32  frame,
s32  detailLevel,
s32  startFrameLoop = -1,
s32  endFrameLoop = -1
[inline, virtual]
 

Returns the IMesh interface for a frame.

Parameters:
frame,: Frame number as zero based index. The maximum frame number is getFrameCount() - 1;
detailLevel,: Level of detail. 0 is the lowest, 255 the highest level of detail. Most meshes will ignore the detail level.
startFrameLoop,: start frame
endFrameLoop,: end frame
Returns:
The animated mesh based on a detail level.

Implements irr::scene::IAnimatedMesh.

Definition at line 66 of file SAnimatedMesh.h.

References irr::core::array< T, TAlloc >::empty(), and Meshes.

virtual IMeshBuffer* irr::scene::SAnimatedMesh::getMeshBuffer const video::SMaterial material  )  const [inline, virtual]
 

Returns pointer to a mesh buffer which fits a material.

Parameters:
material,: material to search for
Returns:
Returns the pointer to the mesh buffer or NULL if there is no such mesh buffer.

Implements irr::scene::IMesh.

Definition at line 146 of file SAnimatedMesh.h.

References irr::core::array< T, TAlloc >::empty(), and Meshes.

virtual IMeshBuffer* irr::scene::SAnimatedMesh::getMeshBuffer u32  nr  )  const [inline, virtual]
 

returns pointer to a mesh buffer

Implements irr::scene::IMesh.

Definition at line 133 of file SAnimatedMesh.h.

References irr::core::array< T, TAlloc >::empty(), and Meshes.

virtual u32 irr::scene::SAnimatedMesh::getMeshBufferCount  )  const [inline, virtual]
 

returns amount of mesh buffers.

Implements irr::scene::IMesh.

Definition at line 123 of file SAnimatedMesh.h.

References irr::core::array< T, TAlloc >::empty(), and Meshes.

virtual E_ANIMATED_MESH_TYPE irr::scene::SAnimatedMesh::getMeshType  )  const [inline, virtual]
 

Returns the type of the animated mesh.

Reimplemented from irr::scene::IAnimatedMesh.

Definition at line 116 of file SAnimatedMesh.h.

References Type.

void irr::scene::SAnimatedMesh::recalculateBoundingBox  )  [inline]
 

Recalculates the bounding box.

Definition at line 101 of file SAnimatedMesh.h.

References irr::core::aabbox3d< T >::addInternalBox(), Box, irr::core::array< T, TAlloc >::empty(), getBoundingBox(), Meshes, irr::core::aabbox3d< T >::reset(), and irr::core::array< T, TAlloc >::size().

Referenced by SAnimatedMesh().

virtual void irr::scene::SAnimatedMesh::setBoundingBox const core::aabbox3df box  )  [inline, virtual]
 

set user axis aligned bounding box

Implements irr::scene::IMesh.

Definition at line 95 of file SAnimatedMesh.h.

References Box.

virtual void irr::scene::SAnimatedMesh::setMaterialFlag video::E_MATERIAL_FLAG  flag,
bool  newvalue
[inline, virtual]
 

Set a material flag for all meshbuffers of this mesh.

Implements irr::scene::IMesh.

Definition at line 156 of file SAnimatedMesh.h.

References Meshes, and irr::core::array< T, TAlloc >::size().


Member Data Documentation

core::aabbox3d<f32> irr::scene::SAnimatedMesh::Box
 

The bounding box of this mesh.

Definition at line 163 of file SAnimatedMesh.h.

Referenced by getBoundingBox(), recalculateBoundingBox(), and setBoundingBox().

core::array<IMesh*> irr::scene::SAnimatedMesh::Meshes
 

All meshes defining the animated mesh.

Definition at line 165 of file SAnimatedMesh.h.

Referenced by addMesh(), getFrameCount(), getMesh(), getMeshBuffer(), getMeshBufferCount(), recalculateBoundingBox(), setMaterialFlag(), and ~SAnimatedMesh().

E_ANIMATED_MESH_TYPE irr::scene::SAnimatedMesh::Type
 

Tyhe type fo the mesh.

Definition at line 167 of file SAnimatedMesh.h.

Referenced by getMeshType().


The documentation for this struct was generated from the following file:
The Irrlicht Engine
The Irrlicht Engine Documentation © 2003-2008 by Nikolaus Gebhardt. Generated on Sun Jun 1 07:59:21 2008 by Doxygen (1.4.2)