vkmEngine 1.0.0
A C++ game engine · vkmengine.com
Loading...
Searching...
No Matches
body_pose.h
1#pragma once
2
3#include <glm/glm.hpp>
4#include <glm/gtc/quaternion.hpp>
5
6#include "ecs/entity.h"
7
8namespace Vkm::Engine {
9
10class Scene;
11struct Transform;
12
20struct BodyPose {
21 glm::vec3 position = {0.0f, 0.0f, 0.0f};
22 glm::quat rotation = {1.0f, 0.0f, 0.0f, 0.0f};
23 bool parented = false;
24 glm::mat4 parentWorld = glm::mat4(1.0f);
25 glm::quat parentRot = {1.0f, 0.0f, 0.0f, 0.0f};
26};
27
39BodyPose worldPoseOf(Scene& scene, EntityId id, const Transform& local);
40
41} // namespace Vkm::Engine
Central registry managing entities and an open set of component types.
Definition scene.h:29
Where a body sits in the world, and the frame that maps back to local.
Definition body_pose.h:20
glm::quat rotation
World orientation.
Definition body_pose.h:22
bool parented
Came from a parent.
Definition body_pose.h:23
glm::vec3 position
World position.
Definition body_pose.h:21
glm::mat4 parentWorld
Parent model matrix.
Definition body_pose.h:24
glm::quat parentRot
Parent world rotation.
Definition body_pose.h:25
Local position, rotation and scale of an entity.
Definition transform.h:17