mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-04 18:41:51 +00:00
add entity models rigging draft
This commit is contained in:
parent
c9fc4a85b8
commit
5a01eca780
4 changed files with 38 additions and 2 deletions
34
src/objects/rigging.hpp
Normal file
34
src/objects/rigging.hpp
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
#ifndef OBJECTS_SKELETON_HPP_
|
||||
#define OBJECTS_SKELETON_HPP_
|
||||
|
||||
#include "../typedefs.hpp"
|
||||
|
||||
#include <vector>
|
||||
#include <memory>
|
||||
#include <glm/glm.hpp>
|
||||
|
||||
namespace rigging {
|
||||
struct Rig;
|
||||
|
||||
struct Pose {
|
||||
std::vector<glm::mat4> matrices;
|
||||
};
|
||||
|
||||
class RigNode {
|
||||
uint index;
|
||||
std::vector<std::unique_ptr<RigNode>> subnodes;
|
||||
public:
|
||||
RigNode(uint index);
|
||||
};
|
||||
|
||||
class RigConfig {
|
||||
std::unique_ptr<RigNode> root;
|
||||
};
|
||||
|
||||
struct Rig {
|
||||
RigConfig* config;
|
||||
Pose pose;
|
||||
};
|
||||
};
|
||||
|
||||
#endif // OBJECTS_SKELETON_HPP_
|
||||
Loading…
Add table
Add a link
Reference in a new issue