EHS
Loading...
Searching...
No Matches
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
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
72 };
73}
Definition Array.h:16
Str_8 GetName() const
Definition Bone.cpp:82
UInt_8 GetBoneCount() const
Definition Bone.cpp:120
void SetAnimTrans(const Mat4_f &newTrans)
Definition Bone.cpp:92
UInt_64 GetHashName() const
Definition Bone.cpp:71
const Bone * GetBone(UInt_64 hashName) const
Definition Bone.cpp:179
void GetAnimTransRec(Array< Mat4_f > &output) const
Definition Bone.cpp:102
UInt_8 GetId() const
Definition Bone.cpp:87
const Array< Bone > & GetChildren() const
Definition Bone.cpp:231
Mat4_f GetLocalBindTrans() const
Definition Bone.cpp:110
bool HasBone(UInt_64 hashName, UInt_8 id) const
Definition Bone.cpp:130
bool AddBone(Bone child)
Definition Bone.cpp:169
Bone()
Definition Bone.cpp:5
Bone & operator=(Bone &&bone) noexcept
Definition Bone.cpp:33
Mat4_f GetInvBindTrans() const
Definition Bone.cpp:115
void SetName(Str_8 newId)
Definition Bone.cpp:76
Mat4_f GetAnimTrans() const
Definition Bone.cpp:97
Definition Anchor.h:6
unsigned char UInt_8
Definition Types.h:43
Str< Char_8, UInt_64 > Str_8
Definition Str.h:1902
Mat4< float > Mat4_f
Definition Mat4.h:427