#pragma once #include "ZLMath.h" #include "Renderer.h" #include namespace ZL { constexpr int MAX_BONE_COUNT = 6; struct Bone { Vector3f boneStartWorld; float boneLength; Matrix4f boneMatrixWorld; // boneVector = boneLength * (0, 1, 0) � ���� �������� // Then multiply by boneMatrixWorld � �� �������� �������� ����� int parent; std::vector children; }; struct BoneWeight { int boneIndex = -1; float weight = 0; }; struct AnimationKeyFrame { int frame; std::vector bones; }; struct Animation { std::vector keyFrames; }; struct BoneSystem { VertexDataStruct mesh; VertexDataStruct startMesh; std::vector> verticesBoneWeight; Matrix4f armatureMatrix; std::vector startBones; std::vector currentBones; std::vector animations; void LoadFromFile(const std::string& fileName, const std::string& ZIPFileName = ""); void Interpolate(int frame); }; };