MCPcopy Create free account
hub / github.com/axmolengine/axmol / initWithFile

Method initWithFile

core/3d/Animation3D.cpp:56–74  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

54}
55
56bool Animation3D::initWithFile(std::string_view filename, std::string_view animationName)
57{
58 std::string fullPath = FileUtils::getInstance()->fullPathForFilename(filename);
59
60 // load animation here
61 auto bundle = Bundle3D::createBundle();
62 Animation3DData animationdata;
63 if (bundle->load(fullPath) && bundle->loadAnimationData(animationName, &animationdata) && init(animationdata))
64 {
65 fullPath.append("#").append(animationName);
66 Animation3DCache::getInstance()->addAnimation(fullPath, this);
67 Bundle3D::destroyBundle(bundle);
68 return true;
69 }
70
71 Bundle3D::destroyBundle(bundle);
72
73 return false;
74}
75
76Animation3D::Curve* Animation3D::getBoneCurveByName(std::string_view name) const
77{

Callers 3

createWithFilenameMethod · 0.45
createMethod · 0.45
createMethod · 0.45

Calls 7

getInstanceFunction · 0.85
fullPathForFilenameMethod · 0.80
loadAnimationDataMethod · 0.80
initFunction · 0.50
loadMethod · 0.45
appendMethod · 0.45
addAnimationMethod · 0.45

Tested by

no test coverage detected