Changed up how resources import/export files. Added Model codecs.
This commit is contained in:
73
include/ehs/io/mdl/Bone.h
Normal file
73
include/ehs/io/mdl/Bone.h
Normal file
@@ -0,0 +1,73 @@
|
||||
#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();
|
||||
};
|
||||
}
|
Reference in New Issue
Block a user