CSEngine
Loading...
Searching...
No Matches
DrawableSkinnedMeshComponent.h
1#pragma once
2
3#include "DrawableStaticMeshComponent.h"
4#include "Animation/JointComponent.h"
5
6namespace CSE {
7
9 public:
10 COMPONENT_DEFINE_CONSTRUCTOR(DrawableSkinnedMeshComponent);
11
13
14 SComponent* Clone(SGameObject* object) override;
15
16 void CopyReference(SComponent* src, std::map<SGameObject*, SGameObject*> lists_obj,
17 std::map<SComponent*, SComponent*> lists_comp) override;
18
19
20 void SetRootJoint(SGameObject* joint_object, int joint_size);
21
22 JointComponent* GetRootJoint();
23
24 std::vector<mat4> GetJointMatrix() const;
25
26 bool SetMesh(const SISurface& meshSurface) override;
27
28 private:
29 void addJointsToVector(JointComponent* headJoint, std::vector<mat4>& matrix) const;
30
31 void SetJointSize(SGameObject* joint_object);
32
33 private:
34 JointComponent* m_jointRoot = nullptr;
35 int m_jointSize = 0;
36
37
38 };
39}