From 909f9eb57aad41bab8d7a43b1303bb63778f30f7 Mon Sep 17 00:00:00 2001 From: InkSoul Date: Sun, 6 Apr 2025 17:03:18 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0gltfAnimation?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/CMakeLists.txt | 7 ++++++- src/render/glTFAnimation.cpp | 14 ++++++++++++++ src/render/glTFAnimation.h | 33 +++++++++++++++++++++++++++++++++ 3 files changed, 53 insertions(+), 1 deletion(-) create mode 100644 src/render/glTFAnimation.cpp create mode 100644 src/render/glTFAnimation.h diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index d61c68b..fa93b74 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -27,7 +27,12 @@ set(GLTF_MODEL_LOADER "render/glTFSkin.cpp" "render/glTFNode.h" "render/glTFNode.cpp" - "render/glTFAnimationChannel.h" "render/glTFAnimationChannel.cpp" "render/glTFAnimationSampler.h" "render/glTFAnimationSampler.cpp") + "render/glTFAnimationChannel.h" + "render/glTFAnimationChannel.cpp" + "render/glTFAnimationSampler.h" + "render/glTFAnimationSampler.cpp" + + "render/glTFAnimation.h" "render/glTFAnimation.cpp") set(VULKAN_BASE "${PLUMAGE_RENDER}/VulkanBase_Marco.h" diff --git a/src/render/glTFAnimation.cpp b/src/render/glTFAnimation.cpp new file mode 100644 index 0000000..4fd780f --- /dev/null +++ b/src/render/glTFAnimation.cpp @@ -0,0 +1,14 @@ +#include "glTFAnimation.h" + + +GLTFLOADER_NAMESPACE_BEGIN + +glTFAnimation::glTFAnimation() +{ +} + +glTFAnimation::~glTFAnimation() +{ +} + +GLTFLOADER_NAMESPACE_END \ No newline at end of file diff --git a/src/render/glTFAnimation.h b/src/render/glTFAnimation.h new file mode 100644 index 0000000..95419ca --- /dev/null +++ b/src/render/glTFAnimation.h @@ -0,0 +1,33 @@ +#ifndef GLTFANIMATION_H +#define GLTFANIMATION_H + +#include "glTFModel_Marco.h" + + +#include "glTFAnimationChannel.h" +#include "glTFAnimationSampler.h" + +#include +#include +#include + +GLTFLOADER_NAMESPACE_BEGIN + +class glTFAnimation +{ +public: + glTFAnimation(); + ~glTFAnimation(); + +private: + std::string name; + std::vector samplers; + std::vector channels; + float start = std::numeric_limits::max(); + float end = std::numeric_limits::min(); +}; + + +GLTFLOADER_NAMESPACE_END + +#endif // !GLTFANIMATION