EHS/include/ehs/io/model/Bone.h
karutoh 1a4a1ecd9c
Some checks failed
Build & Release / Linux-x86_64-Build (push) Successful in 40s
Build & Release / Linux-AARCH64-Build (push) Has been cancelled
First commit.
2024-01-31 22:28:19 -08:00

74 lines
1.2 KiB
C++

#pragma once
#include "ehs/EHS.h"
#include "ehs/Quat.h"
#include "ehs/Mat4.h"
namespace ehs
{
class Bone
{
private:
UInt_64 hashName;
Str_8 name;
UInt_8 id;
Mat4_f animTrans;
Mat4_f localBindTrans;
Mat4_f invBindTrans;
Array<Bone> children;
public:
Bone();
Bone(Str_8 name, UInt_8 id, const Mat4_f& localBindTrans, const Mat4_f& invBindTrans);
Bone(Bone&& bone) noexcept;
Bone(const Bone& bone);
Bone& operator=(Bone&& bone) noexcept;
Bone& operator=(const Bone& bone);
UInt_64 GetHashName() const;
void SetName(Str_8 newId);
Str_8 GetName() const;
UInt_8 GetId() const;
void SetAnimTrans(const Mat4_f& newTrans);
Mat4_f GetAnimTrans() const;
void GetAnimTransRec(Array<Mat4_f>& output) const;
Mat4_f GetLocalBindTrans() const;
Mat4_f GetInvBindTrans() const;
UInt_8 GetBoneCount() const;
bool HasBone(UInt_64 hashName, UInt_8 id) const;
bool HasBone(UInt_64 hashName) const;
bool HasBone(UInt_8 id) const;
bool AddBone(Bone child);
const Bone* GetBone(UInt_64 hashName) const;
Bone* GetBone(UInt_64 hashName);
const Bone* GetBone(UInt_8 id) const;
Bone* GetBone(UInt_8 id);
const Array<Bone>& GetChildren() const;
Array<Bone>& GetChildren();
};
}