| 33 | { |
| 34 | |
| 35 | Animation3D* Animation3D::create(std::string_view fileName, std::string_view animationName) |
| 36 | { |
| 37 | std::string fullPath = FileUtils::getInstance()->fullPathForFilename(fileName); |
| 38 | fullPath.append("#").append(animationName); |
| 39 | auto animation = Animation3DCache::getInstance()->getAnimation(fullPath); |
| 40 | if (animation != nullptr) |
| 41 | return animation; |
| 42 | |
| 43 | animation = new Animation3D(); |
| 44 | if (animation->initWithFile(fileName, animationName)) |
| 45 | { |
| 46 | animation->autorelease(); |
| 47 | } |
| 48 | else |
| 49 | { |
| 50 | AX_SAFE_DELETE(animation); |
| 51 | } |
| 52 | |
| 53 | return animation; |
| 54 | } |
| 55 | |
| 56 | bool Animation3D::initWithFile(std::string_view filename, std::string_view animationName) |
| 57 | { |
nothing calls this directly
no test coverage detected