Definition at line 45 of file DAEAnimationLoader.h.
◆ ~DAEAnimationLoader()
DAEAnimationLoader::~DAEAnimationLoader |
( |
| ) |
|
Definition at line 21 of file DAEAnimationLoader.cpp.
21 {
22 SAFE_DELETE(m_root);
23 if(m_animationData == nullptr) return;
24 for (auto frame : m_animationData->keyFrames) {
25 for (auto joint : frame->jointTransforms) {
26 SAFE_DELETE(joint);
27 }
28 frame->jointTransforms.clear();
29 SAFE_DELETE(frame);
30 }
31 m_animationData->keyFrames.clear();
32 SAFE_DELETE(m_animationData);
33}
◆ GetAnimation()
◆ Load()
bool DAEAnimationLoader::Load |
( |
const char * |
path, |
|
|
std::string |
name |
|
) |
| |
Definition at line 35 of file DAEAnimationLoader.cpp.
35 {
36 m_name = std::move(name);
37
38 m_root =
XFILE(path).getRoot();
39 XNode collada = m_root->getChild(
"COLLADA");
40
41#ifdef __EMSCRIPTEN__
42 if(!collada.hasChild("library_animations")) return false;
43 if(!collada.hasChild("library_visual_scenes")) return false;
44#endif
45 m_animation = collada.getChild("library_animations");
46 m_joint = collada.getChild("library_visual_scenes");
47#ifdef __EMSCRIPTEN__
48 if(!m_animation.getChild("animation").hasChild("source")) return false;
49 if(!m_joint.getChild("visual_scene").hasChild("node")) return false;
50#endif
51 LoadAnimation();
52 return true;
53}
The documentation for this class was generated from the following files: