10namespace Vkm::Engine {
24 glm::vec3 originMax{0.0f};
36 glm::mat4* global =
nullptr;
37 glm::mat4* palette =
nullptr;
49 PoseBuffer() =
default;
50 ~PoseBuffer() =
default;
52 PoseBuffer(
const PoseBuffer& other) =
delete;
53 PoseBuffer& operator=(
const PoseBuffer& other) =
delete;
55 PoseBuffer(PoseBuffer && other) =
delete;
56 PoseBuffer& operator=(PoseBuffer && other) =
delete;
103 const std::vector<PoseSlice>& slices()
const {
return m_slices; }
104 const std::vector<glm::mat4>& global()
const {
return m_global; }
105 const std::vector<glm::mat4>& palette()
const {
return m_palette; }
117 std::vector<glm::mat4> m_global;
118 std::vector<glm::mat4> m_palette;
119 std::vector<PoseSlice> m_slices;
120 std::vector<Mapping> m_sliceOfEntity;
const PoseSlice * sliceOf(EntityId entity) const
The slice driving entity.
uint32_t addSlice(uint32_t boneCount)
Reserve boneCount consecutive bones for one rig.
PoseWrite writeTo(uint32_t slice)
Writable view of slice, for composing its pose.
void clear()
Drop last frame's slices and mapping, keeping the capacity.
void mapEntity(EntityId entity, uint32_t slice)
Record that entity is driven by slice.
Names one entity of one Scene, for as long as that slot holds it.
Definition entity.h:23
One rig's range in the frame's pose arrays, plus what the pose implies about its extent.
Definition pose_buffer.h:19
glm::vec3 originMin
AABB of the posed bone origins, rig model space.
Definition pose_buffer.h:23
float maxBoneScale
Largest scale any bone carries in this pose, never below 1.
Definition pose_buffer.h:26
Writable view of one slice, handed to whatever composes the pose.
Definition pose_buffer.h:34