SO3Engine
include
SO3SceneLoader
ALSkeleton.h
Go to the documentation of this file.
1
#ifndef ALSKELETONANIM_H
2
#define ALSKELETONANIM_H
3
4
#include "
ALScene.h
"
5
#include "
SCOLBasic/SO3Prerequisites.h
"
6
7
#include <OgreHardwareBuffer.h>
8
#include <OgreMesh.h>
9
#include <OgreSubMesh.h>
10
11
#include <map>
12
13
namespace
SO3
14
{
15
class
ALBone
16
{
17
public
:
18
ALBone
(aiNode* node, aiBone* bone)
19
{
20
mNode
= node;
21
mBone
= bone;
22
}
23
24
~ALBone
(){};
25
26
aiMatrix4x4
mBindMatrix
;
27
aiNode*
mNode
;
28
aiBone*
mBone
;
29
};
30
31
class
ALSkeleton
32
{
33
public
:
34
ALSkeleton
();
35
ALSkeleton
(
ALScene
* alscene, Ogre::SkeletonPtr skeleton, aiNode* attach);
36
~ALSkeleton
();
37
38
aiNode*
findMeshNode
(aiNode* node,
const
aiMesh* mesh);
39
aiMatrix4x4
getLocalUniformMatrix
(
int
bid);
40
aiMatrix4x4
getNodeLocalTransformWithBindPose
(aiNode* node);
41
void
addBone
(aiNode* node, aiBone* bone, Ogre::SubMesh* submesh);
42
43
aiNode*
getRootNode
();
44
aiBone*
getBoneFromNode
(aiNode* node);
45
ALBone
getBoneNodeByName
(
const
std::string name);
46
int
getBoneIndexByName
(
const
std::string name);
47
std::vector<aiAnimation*>
findConcernedAnimation
();
48
void
generateAnimation
(aiAnimation* anim);
49
void
makeHierarchy
(aiMatrix4x4 meshInverseTrans);
50
51
void
processAnimation
();
52
53
private
:
54
ALScene
* mScene;
55
std::vector<Ogre::Animation*> mAnims;
56
std::vector<ALBone> mBones;
57
Ogre::SkeletonPtr mSkeleton;
58
aiNode* mNode;
59
60
template
<
typename
T> T getBiggerValue(T* data,
unsigned
int
size);
61
};
62
};
63
64
#endif
ALScene.h
SO3Prerequisites.h
librairies include
SO3::ALBone
Definition
ALSkeleton.h:16
SO3::ALBone::~ALBone
~ALBone()
Definition
ALSkeleton.h:24
SO3::ALBone::mNode
aiNode * mNode
Definition
ALSkeleton.h:27
SO3::ALBone::mBindMatrix
aiMatrix4x4 mBindMatrix
Definition
ALSkeleton.h:26
SO3::ALBone::ALBone
ALBone(aiNode *node, aiBone *bone)
Definition
ALSkeleton.h:18
SO3::ALBone::mBone
aiBone * mBone
Definition
ALSkeleton.h:28
SO3::ALScene
Definition
ALScene.h:31
SO3::ALSkeleton
Definition
ALSkeleton.h:32
SO3::ALSkeleton::addBone
void addBone(aiNode *node, aiBone *bone, Ogre::SubMesh *submesh)
Definition
ALSkeleton.cpp:171
SO3::ALSkeleton::makeHierarchy
void makeHierarchy(aiMatrix4x4 meshInverseTrans)
Definition
ALSkeleton.cpp:213
SO3::ALSkeleton::findMeshNode
aiNode * findMeshNode(aiNode *node, const aiMesh *mesh)
Definition
ALSkeleton.cpp:9
SO3::ALSkeleton::getBoneIndexByName
int getBoneIndexByName(const std::string name)
Definition
ALSkeleton.cpp:158
SO3::ALSkeleton::ALSkeleton
ALSkeleton()
Definition
ALSkeleton.cpp:98
SO3::ALSkeleton::~ALSkeleton
~ALSkeleton()
Definition
ALSkeleton.cpp:111
SO3::ALSkeleton::getRootNode
aiNode * getRootNode()
Definition
ALSkeleton.cpp:115
SO3::ALSkeleton::processAnimation
void processAnimation()
Definition
ALSkeleton.cpp:312
SO3::ALSkeleton::getNodeLocalTransformWithBindPose
aiMatrix4x4 getNodeLocalTransformWithBindPose(aiNode *node)
Definition
ALSkeleton.cpp:31
SO3::ALSkeleton::getBoneNodeByName
ALBone getBoneNodeByName(const std::string name)
Definition
ALSkeleton.cpp:145
SO3::ALSkeleton::generateAnimation
void generateAnimation(aiAnimation *anim)
Definition
ALSkeleton.cpp:321
SO3::ALSkeleton::getBoneFromNode
aiBone * getBoneFromNode(aiNode *node)
Definition
ALSkeleton.cpp:128
SO3::ALSkeleton::getLocalUniformMatrix
aiMatrix4x4 getLocalUniformMatrix(int bid)
Definition
ALSkeleton.cpp:69
SO3::ALSkeleton::findConcernedAnimation
std::vector< aiAnimation * > findConcernedAnimation()
Definition
ALSkeleton.cpp:279
SO3
Definition
SO3DataScol.h:38
Generated by
1.9.8