EHS
Bone.h
Go to the documentation of this file.
1#pragma once
2
3#include "ehs/EHS.h"
4#include "ehs/Quat.h"
5#include "ehs/Mat4.h"
6
7namespace ehs
8{
9 class EHS_LIB_IO Bone
10 {
11 private:
12 UInt_64 hashName;
13 Str_8 name;
14 UInt_8 id;
15 Mat4_f animTrans;
16 Mat4_f localBindTrans;
17 Mat4_f invBindTrans;
18 Array<Bone> children;
19
20 public:
21 Bone();
22
23 Bone(Str_8 name, UInt_8 id, const Mat4_f& localBindTrans, const Mat4_f& invBindTrans);
24
25 Bone(Bone&& bone) noexcept;
26
27 Bone(const Bone& bone);
28
29 Bone& operator=(Bone&& bone) noexcept;
30
31 Bone& operator=(const Bone& bone);
32
33 UInt_64 GetHashName() const;
34
35 void SetName(Str_8 newId);
36
37 Str_8 GetName() const;
38
39 UInt_8 GetId() const;
40
41 void SetAnimTrans(const Mat4_f& newTrans);
42
43 Mat4_f GetAnimTrans() const;
44
45 void GetAnimTransRec(Array<Mat4_f>& output) const;
46
47 Mat4_f GetLocalBindTrans() const;
48
49 Mat4_f GetInvBindTrans() const;
50
51 UInt_8 GetBoneCount() const;
52
53 bool HasBone(UInt_64 hashName, UInt_8 id) const;
54
55 bool HasBone(UInt_64 hashName) const;
56
57 bool HasBone(UInt_8 id) const;
58
59 bool AddBone(Bone child);
60
61 const Bone* GetBone(UInt_64 hashName) const;
62
63 Bone* GetBone(UInt_64 hashName);
64
65 const Bone* GetBone(UInt_8 id) const;
66
67 Bone* GetBone(UInt_8 id);
68
69 const Array<Bone>& GetChildren() const;
70
71 Array<Bone>& GetChildren();
72 };
73}
Definition: Array.h:16
Definition: Bone.h:10
Definition: Anchor.h:6
unsigned char UInt_8
Definition: Types.h:43