1
// Copyright (C) 2002-2011 Nikolaus Gebhardt
2
// This file is part of the "Irrlicht Engine".
3
// For conditions of distribution and use, see copyright notice in irrlicht.h
5
#ifndef __I_ANIMATED_MESH_H_INCLUDED__
6
#define __I_ANIMATED_MESH_H_INCLUDED__
15
//! Possible types of (animated) meshes.
16
enum E_ANIMATED_MESH_TYPE
18
//! Unknown animated mesh type.
21
//! Quake 2 MD2 model file
24
//! Quake 3 MD3 model file
27
//! Maya .obj static model
30
//! Quake 3 .bsp static Map
33
//! 3D Studio .3ds file
36
//! My3D Mesh, the file format by Zhuck Dimitry
39
//! Pulsar LMTools .lmts file. This Irrlicht loader was written by Jonas Petersen
42
//! Cartography Shop .csm file. This loader was created by Saurav Mohapatra.
45
//! .oct file for Paul Nette's FSRad or from Murphy McCauley's Blender .oct exporter.
46
/** The oct file format contains 3D geometry and lightmaps and
47
can be loaded directly by Irrlicht */
50
//! Halflife MDL model file
53
//! generic skinned mesh
57
//! Interface for an animated mesh.
58
/** There are already simple implementations of this interface available so
59
you don't have to implement this interface on your own if you need to:
60
You might want to use irr::scene::SAnimatedMesh, irr::scene::SMesh,
61
irr::scene::SMeshBuffer etc. */
62
class IAnimatedMesh : public IMesh
66
//! Gets the frame count of the animated mesh.
67
/** \return Returns the amount of frames. If the amount is 1,
68
it is a static, non animated mesh. */
69
virtual u32 getFrameCount() const = 0;
71
//! Returns the IMesh interface for a frame.
72
/** \param frame: Frame number as zero based index. The maximum
73
frame number is getFrameCount() - 1;
74
\param detailLevel: Level of detail. 0 is the lowest, 255 the
75
highest level of detail. Most meshes will ignore the detail level.
76
\param startFrameLoop: Because some animated meshes (.MD2) are
77
blended between 2 static frames, and maybe animated in a loop,
78
the startFrameLoop and the endFrameLoop have to be defined, to
79
prevent the animation to be blended between frames which are
81
If startFrameLoop and endFrameLoop are both -1, they are ignored.
82
\param endFrameLoop: see startFrameLoop.
83
\return Returns the animated mesh based on a detail level. */
84
virtual IMesh* getMesh(s32 frame, s32 detailLevel=255, s32 startFrameLoop=-1, s32 endFrameLoop=-1) = 0;
86
//! Returns the type of the animated mesh.
87
/** In most cases it is not neccessary to use this method.
88
This is useful for making a safe downcast. For example,
89
if getMeshType() returns EAMT_MD2 it's safe to cast the
90
IAnimatedMesh to IAnimatedMeshMD2.
91
\returns Type of the mesh. */
92
virtual E_ANIMATED_MESH_TYPE getMeshType() const
98
} // end namespace scene
99
} // end namespace irr