~baltix/+junk/irrlicht-test

« back to all changes in this revision

Viewing changes to include/IAnimatedMesh.h

  • Committer: Mantas Kriaučiūnas
  • Date: 2011-07-18 13:06:25 UTC
  • Revision ID: mantas@akl.lt-20110718130625-c5pvifp61e7kj1ol
Included whole irrlicht SVN libraries to work around launchpad recipe issue with quilt, see https://answers.launchpad.net/launchpad/+question/165193

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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
 
4
 
 
5
#ifndef __I_ANIMATED_MESH_H_INCLUDED__
 
6
#define __I_ANIMATED_MESH_H_INCLUDED__
 
7
 
 
8
#include "aabbox3d.h"
 
9
#include "IMesh.h"
 
10
 
 
11
namespace irr
 
12
{
 
13
namespace scene
 
14
{
 
15
        //! Possible types of (animated) meshes.
 
16
        enum E_ANIMATED_MESH_TYPE
 
17
        {
 
18
                //! Unknown animated mesh type.
 
19
                EAMT_UNKNOWN = 0,
 
20
 
 
21
                //! Quake 2 MD2 model file
 
22
                EAMT_MD2,
 
23
 
 
24
                //! Quake 3 MD3 model file
 
25
                EAMT_MD3,
 
26
 
 
27
                //! Maya .obj static model
 
28
                EAMT_OBJ,
 
29
 
 
30
                //! Quake 3 .bsp static Map
 
31
                EAMT_BSP,
 
32
 
 
33
                //! 3D Studio .3ds file
 
34
                EAMT_3DS,
 
35
 
 
36
                //! My3D Mesh, the file format by Zhuck Dimitry
 
37
                EAMT_MY3D,
 
38
 
 
39
                //! Pulsar LMTools .lmts file. This Irrlicht loader was written by Jonas Petersen
 
40
                EAMT_LMTS,
 
41
 
 
42
                //! Cartography Shop .csm file. This loader was created by Saurav Mohapatra.
 
43
                EAMT_CSM,
 
44
 
 
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 */
 
48
                EAMT_OCT,
 
49
 
 
50
                //! Halflife MDL model file
 
51
                EAMT_MDL_HALFLIFE,
 
52
 
 
53
                //! generic skinned mesh
 
54
                EAMT_SKINNED
 
55
        };
 
56
 
 
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
 
63
        {
 
64
        public:
 
65
 
 
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;
 
70
 
 
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
 
80
                outside of this loop.
 
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;
 
85
 
 
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
 
93
                {
 
94
                        return EAMT_UNKNOWN;
 
95
                }
 
96
        };
 
97
 
 
98
} // end namespace scene
 
99
} // end namespace irr
 
100
 
 
101
#endif
 
102