Weak path→clip registry for animation hot reload. 更多...
#include <AnimClipRegistry.h>
静态 Public 成员函数 | |
| static void | registerPath (const std::string &path, AnimClip *clip) |
| Track a clip under a source path (keys are normalized). | |
| static void | unregister (AnimClip *clip) |
| Forget a clip everywhere (called from ~AnimClip). | |
| static std::vector< AnimClip * > | findByPath (const std::string &path) |
| Clips registered under a path; may be empty. | |
| static bool | hasPath (const std::string &path) |
| Whether any clip is registered under this path. | |
| static int | reloadPath (const std::string &path) |
| Re-import the source and adopt into every registered clip. | |
| static int | count () |
| Total registered clips (tests). | |
| static void | clear () |
| Drop all entries (tests). | |
| static std::string | normalizePath (const std::string &path) |
| Normalize a path to the registry key form. | |
详细描述
Weak path→clip registry for animation hot reload.
Animation::newClipFromEvaFile registers every clip it creates under its source path. When that .eva file changes, the "animclip" IAssetReloader re-imports the source and adopts the fresh content into the registered instances (AnimClip::adopt), so existing holders — state machines, scripts — keep valid pointers and see updated content without re-binding.
Entries hold raw pointers and are removed automatically by ~AnimClip; registrations must not outlive the clip (the engine's script bindings keep clips alive for the process lifetime, and tests use owning pointers).
在文件 AnimClipRegistry.h 第 23 行定义.
成员函数说明
◆ clear()
|
static |
Drop all entries (tests).
在文件 AnimClipRegistry.cpp 第 114 行定义.
◆ count()
|
static |
◆ findByPath()
|
static |
Clips registered under a path; may be empty.
在文件 AnimClipRegistry.cpp 第 77 行定义.
引用了 normalizePath().
◆ hasPath()
|
static |
Whether any clip is registered under this path.
在文件 AnimClipRegistry.cpp 第 82 行定义.
引用了 normalizePath().
◆ normalizePath()
|
static |
Normalize a path to the registry key form.
在文件 AnimClipRegistry.cpp 第 52 行定义.
引用了 c.
被这些函数引用 findByPath(), hasPath(), registerPath() , 以及 reloadPath().
◆ registerPath()
|
static |
Track a clip under a source path (keys are normalized).
在文件 AnimClipRegistry.cpp 第 59 行定义.
引用了 normalizePath().
◆ reloadPath()
|
static |
Re-import the source and adopt into every registered clip.
- 返回
- number of clips refreshed (0 when the path is unknown or the source cannot be re-imported).
在文件 AnimClipRegistry.cpp 第 84 行定义.
引用了 eve::animation::AnimImporter::importEvaFile() , 以及 normalizePath().
◆ unregister()
|
static |
Forget a clip everywhere (called from ~AnimClip).
在文件 AnimClipRegistry.cpp 第 65 行定义.
该类的文档由以下文件生成:
- src/modules/animation/AnimClipRegistry.h
- src/modules/animation/AnimClipRegistry.cpp