Push current work

This commit is contained in:
SirLynix
2022-05-04 12:50:05 +02:00
committed by Jérôme Leclercq
parent 85cd064171
commit e5e3026005
9 changed files with 653 additions and 580 deletions

View File

@@ -21,12 +21,16 @@
namespace Nz
{
class Skeleton;
struct NAZARA_UTILITY_API AnimationParams : ResourceParameters
{
// La frame de fin à charger
std::size_t endFrame = 0xFFFFFFFF;
// La frame de début à charger
std::size_t startFrame = 0;
// Reference skeleton
const Skeleton* skeleton = nullptr;
bool IsValid() const;
};
@@ -34,7 +38,6 @@ namespace Nz
class Animation;
struct Sequence;
struct SequenceJoint;
class Skeleton;
using AnimationLibrary = ObjectLibrary<Animation>;
using AnimationLoader = ResourceLoader<Animation, AnimationParams>;

View File

@@ -23,9 +23,9 @@ namespace Nz
struct SequenceJoint
{
Quaternionf rotation;
Vector3f position;
Vector3f scale;
Quaternionf rotation = Quaternionf::Identity();
Vector3f position = Vector3f::Zero();
Vector3f scale = Vector3f::Unit();
};
}

View File

@@ -57,6 +57,8 @@ namespace Nz
// Signals:
NazaraSignal(OnSkeletonJointsInvalidated, const Skeleton* /*skeleton*/);
static constexpr std::size_t InvalidJointIndex = std::numeric_limits<std::size_t>::max();
private:
void InvalidateJoints();
void InvalidateJointMap();