Loading...
Searching...
No Matches
irr::scene::SAnimatedMesh Struct Reference

Simple implementation of the IAnimatedMesh interface. More...

`#include <SAnimatedMesh.h>`

Inheritance diagram for irr::scene::SAnimatedMesh:

## Public Member Functions

| SAnimatedMesh (scene::IMesh *mesh=0, scene::E_ANIMATED_MESH_TYPE type=scene::EAMT_UNKNOWN)
| constructor
virtual | ~SAnimatedMesh ()
| destructor
void | addMesh (IMesh *mesh)
| adds a Mesh
virtual f32 | getAnimationSpeed () const
| Gets the default animation speed of the animated 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 IMesh * | getMesh (s32 frame, s32 detailLevel=255, s32 startFrameLoop=-1, s32 endFrameLoop=-1)
| Returns the IMesh interface for a frame.
virtual IMeshBuffer * | getMeshBuffer (const video::SMaterial &material) const
| Returns pointer to a mesh buffer which fits a material.
virtual IMeshBuffer * | getMeshBuffer (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.
virtual void | setAnimationSpeed (f32 fps)
| Gets the frame count of the animated mesh.
virtual void | setBoundingBox (const core::aabbox3df &box)
| set user axis aligned bounding box
virtual void | setDirty (E_BUFFER_TYPE buffer=EBT_VERTEX_AND_INDEX)
| flags the meshbuffer as changed, reloads hardware buffers
virtual void | setHardwareMappingHint (E_HARDWARE_MAPPING newMappingHint, E_BUFFER_TYPE buffer=EBT_VERTEX_AND_INDEX)
| set the hardware mapping hint, for driver
virtual void | setMaterialFlag (video::E_MATERIAL_FLAG flag, bool newvalue)
| Set a material flag for all meshbuffers of this mesh.
Public Member Functions inherited from irr::IReferenceCounted
| IReferenceCounted ()
| Constructor.
virtual | ~IReferenceCounted ()
| Destructor.
bool | drop () const
| Drops the object. Decrements the reference counter by one.
const c8 * | getDebugName () const
| Returns the debug name of the object.
s32 | getReferenceCount () const
| Get the reference count.
void | grab () const
| Grabs the object. Increments the reference counter by one.

## Public Attributes

core::aabbox3d< f32 > | Box
| The bounding box of this mesh.
f32 | FramesPerSecond
| Default animation speed of this mesh.
core::array< IMesh * > | Meshes
| All meshes defining the animated mesh.
E_ANIMATED_MESH_TYPE | Type
| The type of the mesh.

## Additional Inherited Members

Protected Member Functions inherited from irr::IReferenceCounted
void | setDebugName (const c8 *newName)
| Sets the debug name of the object.

## Detailed Description

Simple implementation of the IAnimatedMesh interface.

Definition at line 19 of file SAnimatedMesh.h.

## Constructor & Destructor Documentation

## SAnimatedMesh()

irr::scene::SAnimatedMesh::SAnimatedMesh | ( | scene::IMesh * | mesh = 0,
|  | scene::E_ANIMATED_MESH_TYPE | type = scene::EAMT_UNKNOWN )

inline

constructor

Definition at line 22 of file SAnimatedMesh.h.

References addMesh(), irr::scene::EAMT_UNKNOWN, FramesPerSecond, recalculateBoundingBox(), irr::IReferenceCounted::setDebugName(), and Type.

## ~SAnimatedMesh()

virtual irr::scene::SAnimatedMesh::~SAnimatedMesh | ( |  | ) |

inline virtual

destructor

Definition at line 32 of file SAnimatedMesh.h.

References irr::IReferenceCounted::drop(), and Meshes.

## Member Function Documentation

## addMesh()

void irr::scene::SAnimatedMesh::addMesh | ( | IMesh * | mesh | ) |

inline

adds a Mesh

Definition at line 78 of file SAnimatedMesh.h.

References irr::IReferenceCounted::grab(), and Meshes.

Referenced by SAnimatedMesh().

## getAnimationSpeed()

virtual f32 irr::scene::SAnimatedMesh::getAnimationSpeed | ( |  | ) | const

inline virtual

Gets the default animation speed of the animated mesh.

Returns
  Amount of frames per second. If the amount is 0, it is a static, non animated mesh.

Implements irr::scene::IAnimatedMesh.

Definition at line 48 of file SAnimatedMesh.h.

References FramesPerSecond.

## getBoundingBox()

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 89 of file SAnimatedMesh.h.

References Box.

## getFrameCount()

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 41 of file SAnimatedMesh.h.

References Meshes.

## getMesh()

virtual IMesh * irr::scene::SAnimatedMesh::getMesh | ( | s32 | frame,
|  | s32 | detailLevel = 255,
|  | 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 69 of file SAnimatedMesh.h.

References Meshes.

## getMeshBuffer() [1/2]

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 142 of file SAnimatedMesh.h.

References Meshes.

## getMeshBuffer() [2/2]

virtual IMeshBuffer * irr::scene::SAnimatedMesh::getMeshBuffer | ( | u32 | nr | ) | const

inline virtual

returns pointer to a mesh buffer

Implements irr::scene::IMesh.

Definition at line 130 of file SAnimatedMesh.h.

References Meshes.

## getMeshBufferCount()

virtual u32 irr::scene::SAnimatedMesh::getMeshBufferCount | ( |  | ) | const

inline virtual

returns amount of mesh buffers.

Implements irr::scene::IMesh.

Definition at line 121 of file SAnimatedMesh.h.

References Meshes.

## getMeshType()

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 115 of file SAnimatedMesh.h.

References Type.

## recalculateBoundingBox()

void irr::scene::SAnimatedMesh::recalculateBoundingBox | ( |  | ) |

inline

Recalculates the bounding box.

Definition at line 101 of file SAnimatedMesh.h.

References Box, and Meshes.

Referenced by SAnimatedMesh().

## setAnimationSpeed()

virtual void irr::scene::SAnimatedMesh::setAnimationSpeed | ( | f32 | fps | ) |

inline virtual

Gets the frame count of the animated mesh.

Parameters

  fps | Frames per second to play the animation with. If the amount is 0, it is not animated. The actual speed is set in the scene node the mesh is instantiated in.

Implements irr::scene::IAnimatedMesh.

Definition at line 56 of file SAnimatedMesh.h.

References FramesPerSecond.

## setBoundingBox()

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.

## setDirty()

virtual void irr::scene::SAnimatedMesh::setDirty | ( | E_BUFFER_TYPE | buffer = EBT_VERTEX_AND_INDEX | ) |

inline virtual

flags the meshbuffer as changed, reloads hardware buffers

Implements irr::scene::IMesh.

Definition at line 165 of file SAnimatedMesh.h.

References irr::scene::EBT_VERTEX_AND_INDEX, Meshes, and setDirty().

Referenced by setDirty().

## setHardwareMappingHint()

virtual void irr::scene::SAnimatedMesh::setHardwareMappingHint | ( | E_HARDWARE_MAPPING | newMappingHint,
|  | E_BUFFER_TYPE | buffer = EBT_VERTEX_AND_INDEX )

inline virtual

set the hardware mapping hint, for driver

Implements irr::scene::IMesh.

Definition at line 158 of file SAnimatedMesh.h.

References irr::scene::EBT_VERTEX_AND_INDEX, Meshes, and setHardwareMappingHint().

Referenced by setHardwareMappingHint().

## setMaterialFlag()

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 151 of file SAnimatedMesh.h.

References Meshes, and setMaterialFlag().

Referenced by setMaterialFlag().

## Member Data Documentation

## Box

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

The bounding box of this mesh.

Definition at line 175 of file SAnimatedMesh.h.

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

## FramesPerSecond

f32 irr::scene::SAnimatedMesh::FramesPerSecond

Default animation speed of this mesh.

Definition at line 178 of file SAnimatedMesh.h.

Referenced by SAnimatedMesh(), getAnimationSpeed(), and setAnimationSpeed().

## Meshes

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

All meshes defining the animated mesh.

Definition at line 172 of file SAnimatedMesh.h.

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

## Type

E_ANIMATED_MESH_TYPE irr::scene::SAnimatedMesh::Type

The type of the mesh.

Definition at line 181 of file SAnimatedMesh.h.

Referenced by SAnimatedMesh(), and getMeshType().

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

- SAnimatedMesh.h

- Irrlicht Engine Documentation © 2003-2012 by Nikolaus Gebhardt. Generated on for Irrlicht 3D Engine by Doxygen 1.15.0