vkmEngine 1.0.0
A C++ game engine · vkmengine.com
Loading...
Searching...
No Matches
ragdoll_pose.h
1#pragma once
2
3#include <vector>
4
5#include <glm/glm.hpp>
6
7#include "resource/asset/skeleton_asset.h"
8#include "system/animation/pose_buffer.h"
9
10namespace Vkm::Engine {
11
12class Scene;
13struct Ragdoll;
14
22 glm::mat4 world = glm::mat4(1.0f);
23 bool simulated = false;
24};
25
36void gatherRagdollBodies(const Scene& scene, const Ragdoll& ragdoll, std::vector<RagdollBodyPose>& out);
37
51void composeRagdollPose(
52 const Ragdoll& ragdoll,
53 const RagdollBodyPose* bodies,
54 const SkeletonAsset& skeleton,
55 const glm::mat4& rigWorld,
56 const PoseWrite& out
57);
58
59} // namespace Vkm::Engine
Central registry managing entities and an open set of component types.
Definition scene.h:29
Writable view of one slice, handed to whatever composes the pose.
Definition pose_buffer.h:34
One bone body's world pose, read out of the scene ahead of composing.
Definition ragdoll_pose.h:21
glm::mat4 world
The body's world matrix.
Definition ragdoll_pose.h:22
bool simulated
False: the bone follows its parent.
Definition ragdoll_pose.h:23
Turns a rig over to physics, and back.
Definition ragdoll.h:49
A rig: a flat, parent-before-child bone array plus its bind pose.
Definition skeleton_asset.h:33