diff options
Diffstat (limited to 'libraries/irrlicht-1.8/include/IAnimatedMesh.h')
-rw-r--r-- | libraries/irrlicht-1.8/include/IAnimatedMesh.h | 230 |
1 files changed, 115 insertions, 115 deletions
diff --git a/libraries/irrlicht-1.8/include/IAnimatedMesh.h b/libraries/irrlicht-1.8/include/IAnimatedMesh.h index 3e08528..ec6eee0 100644 --- a/libraries/irrlicht-1.8/include/IAnimatedMesh.h +++ b/libraries/irrlicht-1.8/include/IAnimatedMesh.h | |||
@@ -1,115 +1,115 @@ | |||
1 | // Copyright (C) 2002-2012 Nikolaus Gebhardt | 1 | // Copyright (C) 2002-2012 Nikolaus Gebhardt |
2 | // This file is part of the "Irrlicht Engine". | 2 | // This file is part of the "Irrlicht Engine". |
3 | // For conditions of distribution and use, see copyright notice in irrlicht.h | 3 | // For conditions of distribution and use, see copyright notice in irrlicht.h |
4 | 4 | ||
5 | #ifndef __I_ANIMATED_MESH_H_INCLUDED__ | 5 | #ifndef __I_ANIMATED_MESH_H_INCLUDED__ |
6 | #define __I_ANIMATED_MESH_H_INCLUDED__ | 6 | #define __I_ANIMATED_MESH_H_INCLUDED__ |
7 | 7 | ||
8 | #include "aabbox3d.h" | 8 | #include "aabbox3d.h" |
9 | #include "IMesh.h" | 9 | #include "IMesh.h" |
10 | 10 | ||
11 | namespace irr | 11 | namespace irr |
12 | { | 12 | { |
13 | namespace scene | 13 | namespace scene |
14 | { | 14 | { |
15 | //! Possible types of (animated) meshes. | 15 | //! Possible types of (animated) meshes. |
16 | enum E_ANIMATED_MESH_TYPE | 16 | enum E_ANIMATED_MESH_TYPE |
17 | { | 17 | { |
18 | //! Unknown animated mesh type. | 18 | //! Unknown animated mesh type. |
19 | EAMT_UNKNOWN = 0, | 19 | EAMT_UNKNOWN = 0, |
20 | 20 | ||
21 | //! Quake 2 MD2 model file | 21 | //! Quake 2 MD2 model file |
22 | EAMT_MD2, | 22 | EAMT_MD2, |
23 | 23 | ||
24 | //! Quake 3 MD3 model file | 24 | //! Quake 3 MD3 model file |
25 | EAMT_MD3, | 25 | EAMT_MD3, |
26 | 26 | ||
27 | //! Maya .obj static model | 27 | //! Maya .obj static model |
28 | EAMT_OBJ, | 28 | EAMT_OBJ, |
29 | 29 | ||
30 | //! Quake 3 .bsp static Map | 30 | //! Quake 3 .bsp static Map |
31 | EAMT_BSP, | 31 | EAMT_BSP, |
32 | 32 | ||
33 | //! 3D Studio .3ds file | 33 | //! 3D Studio .3ds file |
34 | EAMT_3DS, | 34 | EAMT_3DS, |
35 | 35 | ||
36 | //! My3D Mesh, the file format by Zhuck Dimitry | 36 | //! My3D Mesh, the file format by Zhuck Dimitry |
37 | EAMT_MY3D, | 37 | EAMT_MY3D, |
38 | 38 | ||
39 | //! Pulsar LMTools .lmts file. This Irrlicht loader was written by Jonas Petersen | 39 | //! Pulsar LMTools .lmts file. This Irrlicht loader was written by Jonas Petersen |
40 | EAMT_LMTS, | 40 | EAMT_LMTS, |
41 | 41 | ||
42 | //! Cartography Shop .csm file. This loader was created by Saurav Mohapatra. | 42 | //! Cartography Shop .csm file. This loader was created by Saurav Mohapatra. |
43 | EAMT_CSM, | 43 | EAMT_CSM, |
44 | 44 | ||
45 | //! .oct file for Paul Nette's FSRad or from Murphy McCauley's Blender .oct exporter. | 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 | 46 | /** The oct file format contains 3D geometry and lightmaps and |
47 | can be loaded directly by Irrlicht */ | 47 | can be loaded directly by Irrlicht */ |
48 | EAMT_OCT, | 48 | EAMT_OCT, |
49 | 49 | ||
50 | //! Halflife MDL model file | 50 | //! Halflife MDL model file |
51 | EAMT_MDL_HALFLIFE, | 51 | EAMT_MDL_HALFLIFE, |
52 | 52 | ||
53 | //! generic skinned mesh | 53 | //! generic skinned mesh |
54 | EAMT_SKINNED | 54 | EAMT_SKINNED |
55 | }; | 55 | }; |
56 | 56 | ||
57 | //! Interface for an animated mesh. | 57 | //! Interface for an animated mesh. |
58 | /** There are already simple implementations of this interface available so | 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: | 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, | 60 | You might want to use irr::scene::SAnimatedMesh, irr::scene::SMesh, |
61 | irr::scene::SMeshBuffer etc. */ | 61 | irr::scene::SMeshBuffer etc. */ |
62 | class IAnimatedMesh : public IMesh | 62 | class IAnimatedMesh : public IMesh |
63 | { | 63 | { |
64 | public: | 64 | public: |
65 | 65 | ||
66 | //! Gets the frame count of the animated mesh. | 66 | //! Gets the frame count of the animated mesh. |
67 | /** \return The amount of frames. If the amount is 1, | 67 | /** \return The amount of frames. If the amount is 1, |
68 | it is a static, non animated mesh. */ | 68 | it is a static, non animated mesh. */ |
69 | virtual u32 getFrameCount() const = 0; | 69 | virtual u32 getFrameCount() const = 0; |
70 | 70 | ||
71 | //! Gets the animation speed of the animated mesh. | 71 | //! Gets the animation speed of the animated mesh. |
72 | /** \return The number of frames per second to play the | 72 | /** \return The number of frames per second to play the |
73 | animation with by default. If the amount is 0, | 73 | animation with by default. If the amount is 0, |
74 | it is a static, non animated mesh. */ | 74 | it is a static, non animated mesh. */ |
75 | virtual f32 getAnimationSpeed() const = 0; | 75 | virtual f32 getAnimationSpeed() const = 0; |
76 | 76 | ||
77 | //! Sets the animation speed of the animated mesh. | 77 | //! Sets the animation speed of the animated mesh. |
78 | /** \param fps Number of frames per second to play the | 78 | /** \param fps Number of frames per second to play the |
79 | animation with by default. If the amount is 0, | 79 | animation with by default. If the amount is 0, |
80 | it is not animated. The actual speed is set in the | 80 | it is not animated. The actual speed is set in the |
81 | scene node the mesh is instantiated in.*/ | 81 | scene node the mesh is instantiated in.*/ |
82 | virtual void setAnimationSpeed(f32 fps) =0; | 82 | virtual void setAnimationSpeed(f32 fps) =0; |
83 | 83 | ||
84 | //! Returns the IMesh interface for a frame. | 84 | //! Returns the IMesh interface for a frame. |
85 | /** \param frame: Frame number as zero based index. The maximum | 85 | /** \param frame: Frame number as zero based index. The maximum |
86 | frame number is getFrameCount() - 1; | 86 | frame number is getFrameCount() - 1; |
87 | \param detailLevel: Level of detail. 0 is the lowest, 255 the | 87 | \param detailLevel: Level of detail. 0 is the lowest, 255 the |
88 | highest level of detail. Most meshes will ignore the detail level. | 88 | highest level of detail. Most meshes will ignore the detail level. |
89 | \param startFrameLoop: Because some animated meshes (.MD2) are | 89 | \param startFrameLoop: Because some animated meshes (.MD2) are |
90 | blended between 2 static frames, and maybe animated in a loop, | 90 | blended between 2 static frames, and maybe animated in a loop, |
91 | the startFrameLoop and the endFrameLoop have to be defined, to | 91 | the startFrameLoop and the endFrameLoop have to be defined, to |
92 | prevent the animation to be blended between frames which are | 92 | prevent the animation to be blended between frames which are |
93 | outside of this loop. | 93 | outside of this loop. |
94 | If startFrameLoop and endFrameLoop are both -1, they are ignored. | 94 | If startFrameLoop and endFrameLoop are both -1, they are ignored. |
95 | \param endFrameLoop: see startFrameLoop. | 95 | \param endFrameLoop: see startFrameLoop. |
96 | \return Returns the animated mesh based on a detail level. */ | 96 | \return Returns the animated mesh based on a detail level. */ |
97 | virtual IMesh* getMesh(s32 frame, s32 detailLevel=255, s32 startFrameLoop=-1, s32 endFrameLoop=-1) = 0; | 97 | virtual IMesh* getMesh(s32 frame, s32 detailLevel=255, s32 startFrameLoop=-1, s32 endFrameLoop=-1) = 0; |
98 | 98 | ||
99 | //! Returns the type of the animated mesh. | 99 | //! Returns the type of the animated mesh. |
100 | /** In most cases it is not neccessary to use this method. | 100 | /** In most cases it is not neccessary to use this method. |
101 | This is useful for making a safe downcast. For example, | 101 | This is useful for making a safe downcast. For example, |
102 | if getMeshType() returns EAMT_MD2 it's safe to cast the | 102 | if getMeshType() returns EAMT_MD2 it's safe to cast the |
103 | IAnimatedMesh to IAnimatedMeshMD2. | 103 | IAnimatedMesh to IAnimatedMeshMD2. |
104 | \returns Type of the mesh. */ | 104 | \returns Type of the mesh. */ |
105 | virtual E_ANIMATED_MESH_TYPE getMeshType() const | 105 | virtual E_ANIMATED_MESH_TYPE getMeshType() const |
106 | { | 106 | { |
107 | return EAMT_UNKNOWN; | 107 | return EAMT_UNKNOWN; |
108 | } | 108 | } |
109 | }; | 109 | }; |
110 | 110 | ||
111 | } // end namespace scene | 111 | } // end namespace scene |
112 | } // end namespace irr | 112 | } // end namespace irr |
113 | 113 | ||
114 | #endif | 114 | #endif |
115 | 115 | ||