Core/Animation: Move Sequence and SequenceJoint to Animation

This commit is contained in:
SirLynix
2024-02-19 22:45:55 +01:00
parent 4d77a25a04
commit f121f32873
6 changed files with 34 additions and 53 deletions

View File

@@ -58,6 +58,8 @@ namespace Nz
{
public:
using Params = AnimationParams;
struct Sequence;
struct SequenceJoint;
Animation();
Animation(const Animation&) = delete;
@@ -97,6 +99,21 @@ namespace Nz
static std::shared_ptr<Animation> LoadFromMemory(const void* data, std::size_t size, const AnimationParams& params = AnimationParams());
static std::shared_ptr<Animation> LoadFromStream(Stream& stream, const AnimationParams& params = AnimationParams());
struct Sequence
{
std::string name;
UInt32 firstFrame;
UInt32 frameCount;
UInt32 frameRate;
};
struct SequenceJoint
{
Quaternionf rotation = Quaternionf::Identity();
Vector3f position = Vector3f::Zero();
Vector3f scale = Vector3f::Unit();
};
private:
std::unique_ptr<AnimationImpl> m_impl;
};

View File

@@ -1,32 +0,0 @@
// Copyright (C) 2024 Jérôme "SirLynix" Leclercq (lynix680@gmail.com)
// This file is part of the "Nazara Engine - Core module"
// For conditions of distribution and use, see copyright notice in Export.hpp
#pragma once
#ifndef NAZARA_CORE_SEQUENCE_HPP
#define NAZARA_CORE_SEQUENCE_HPP
#include <Nazara/Math/Quaternion.hpp>
#include <Nazara/Math/Vector3.hpp>
#include <string>
namespace Nz
{
struct Sequence
{
std::string name;
UInt32 firstFrame;
UInt32 frameCount;
UInt32 frameRate;
};
struct SequenceJoint
{
Quaternionf rotation = Quaternionf::Identity();
Vector3f position = Vector3f::Zero();
Vector3f scale = Vector3f::Unit();
};
}
#endif // NAZARA_CORE_SEQUENCE_HPP