-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Co-authored-by: Marc Rousavy <[email protected]>
- Loading branch information
Showing
20 changed files
with
167 additions
and
67 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
diff --git a/libs/gltfio/include/gltfio/Animator.h b/libs/gltfio/include/gltfio/Animator.h | ||
index 199555a40..f426edf0e 100644 | ||
--- a/libs/gltfio/include/gltfio/Animator.h | ||
+++ b/libs/gltfio/include/gltfio/Animator.h | ||
@@ -97,6 +97,12 @@ public: | ||
// For internal use only. | ||
void addInstance(FFilamentInstance* instance); | ||
|
||
+ // Public constructor for creating an animator with the animations from an asset | ||
+ // and applying the animations to a different instance. | ||
+ Animator(FilamentAsset *asset, FilamentInstance *instance); | ||
+ | ||
+ ~Animator(); | ||
+ | ||
private: | ||
|
||
/*! \cond PRIVATE */ | ||
@@ -106,7 +112,6 @@ private: | ||
|
||
// If "instance" is null, then this is the primary animator. | ||
Animator(FFilamentAsset const* asset, FFilamentInstance* instance); | ||
- ~Animator(); | ||
|
||
Animator(const Animator& animator) = delete; | ||
Animator(Animator&& animator) = delete; | ||
diff --git a/libs/gltfio/src/Animator.cpp b/libs/gltfio/src/Animator.cpp | ||
index 99a4269d0..036adcb8d 100644 | ||
--- a/libs/gltfio/src/Animator.cpp | ||
+++ b/libs/gltfio/src/Animator.cpp | ||
@@ -238,6 +238,9 @@ Animator::Animator(FFilamentAsset const* asset, FFilamentInstance* instance) { | ||
} | ||
} | ||
|
||
+Animator::Animator(FilamentAsset *asset, FilamentInstance *instance) : Animator(downcast(asset), downcast(instance)) { | ||
+} | ||
+ | ||
void Animator::applyCrossFade(size_t previousAnimIndex, float previousAnimTime, float alpha) { | ||
mImpl->stashCrossFade(); | ||
applyAnimation(previousAnimIndex, previousAnimTime); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.