Skip to content

Commit a1be171

Browse files
Move constructor implementation to source file and add documentation
1 parent 5de7976 commit a1be171

2 files changed

Lines changed: 11 additions & 5 deletions

File tree

libs/gltfio/include/gltfio/Animator.h

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,14 @@ class UTILS_PUBLIC Animator {
9797
// For internal use only.
9898
void addInstance(FFilamentInstance* instance);
9999

100+
/** Creates an Animator that will use the corresponding asset and instance,
101+
* can be used to animate an instance with animation from another asset.
102+
* When used, the caller is responsible for deleting it.
103+
* The normal way of getting an Animator is to call FilamentInstance::getAnimator().
104+
*/
105+
Animator(FilamentAsset *asset, FilamentInstance *instance);
106+
~Animator();
107+
100108
private:
101109

102110
/*! \cond PRIVATE */
@@ -112,11 +120,6 @@ class UTILS_PUBLIC Animator {
112120
Animator& operator=(const Animator&) = delete;
113121

114122
AnimatorImpl* mImpl;
115-
public:
116-
Animator(FilamentAsset *asset, FilamentInstance *instance) : Animator(reinterpret_cast<FFilamentAsset*>(asset), reinterpret_cast<FFilamentInstance*>(instance))
117-
{
118-
}
119-
~Animator();
120123
};
121124

122125
} // namespace filament::gltfio

libs/gltfio/src/Animator.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -254,6 +254,9 @@ void Animator::addInstance(FFilamentInstance* instance) {
254254
}
255255
}
256256

257+
Animator::Animator(FilamentAsset *asset, FilamentInstance *instance) : Animator(reinterpret_cast<FFilamentAsset*>(asset), reinterpret_cast<FFilamentInstance*>(instance)) {
258+
}
259+
257260
Animator::~Animator() {
258261
delete mImpl;
259262
}

0 commit comments

Comments
 (0)