新增动画序列和动画采样器

reconstruct-gltfLoader
InkSoul 2025-04-06 16:43:23 +08:00
parent d94a1748cc
commit d7a2f8d738
6 changed files with 86 additions and 2 deletions

View File

@ -27,7 +27,7 @@ set(GLTF_MODEL_LOADER
"render/glTFSkin.cpp"
"render/glTFNode.h"
"render/glTFNode.cpp"
"render/glTFAnimationChannel.h" "glTFAnimationChannel.cpp")
"render/glTFAnimationChannel.h" "render/glTFAnimationChannel.cpp" "render/glTFAnimationSampler.h" "render/glTFAnimationSampler.cpp")
set(VULKAN_BASE
"${PLUMAGE_RENDER}/VulkanBase_Marco.h"

View File

@ -1 +0,0 @@


View File

@ -0,0 +1,15 @@
#include "glTFAnimationChannel.h"
GLTFLOADER_NAMESPACE_BEGIN
glTFAnimationChannel::glTFAnimationChannel()
{
}
glTFAnimationChannel::~glTFAnimationChannel()
{
}
GLTFLOADER_NAMESPACE_END

View File

@ -0,0 +1,27 @@
#ifndef GLTFANIMATIONCHANNEL_H
#define GLTFANIMATIONCHANNEL_H
#include "glTFModel_Marco.h"
#include "glTFModel_common.h"
#include "glTFNode.h"
GLTFLOADER_NAMESPACE_BEGIN
class glTFAnimationChannel
{
public:
glTFAnimationChannel();
~glTFAnimationChannel();
private:
AnimationPathType path;
glTFNode* node;
uint32_t samplerIndex;
};
GLTFLOADER_NAMESPACE_END
#endif // !GLTFANIMATIONCHANNEL_H

View File

@ -0,0 +1,15 @@
#include "glTFAnimationSampler.h"
GLTFLOADER_NAMESPACE_BEGIN
glTFAnimationSampler::glTFAnimationSampler()
{
}
glTFAnimationSampler::~glTFAnimationSampler()
{
}
GLTFLOADER_NAMESPACE_END

View File

@ -0,0 +1,28 @@
#ifndef GLTFANIMATIONSAMPLER_H
#define GLTFANIMATIONSAMPLER_H
#include "glTFModel_Marco.h"
#include "glTFModel_common.h"
#include <vector>
GLTFLOADER_NAMESPACE_BEGIN
class glTFAnimationSampler
{
public:
glTFAnimationSampler();
~glTFAnimationSampler();
private:
AnimationInterpolationType interpolation;
std::vector<float> inputs;
std::vector<glm::vec4> outputsVec4;
};
GLTFLOADER_NAMESPACE_END
#endif // !GLTFANIMATIONSAMPLER_H