Restructured Img and FontAtlas.

This commit is contained in:
2024-01-23 17:26:27 -08:00
parent 039ab8cc0f
commit 897d3b9120
13 changed files with 502 additions and 452 deletions

View File

@@ -20,7 +20,7 @@ namespace ehs
public:
Bone();
Bone(Str_8 name, const UInt_8 id, const Mat4_f& localBindTrans, const Mat4_f& invBindTrans);
Bone(Str_8 name, UInt_8 id, const Mat4_f& localBindTrans, const Mat4_f& invBindTrans);
Bone(Bone&& bone) noexcept;
@@ -50,21 +50,21 @@ namespace ehs
UInt_8 GetBoneCount() const;
bool HasBone(const UInt_64 hashName, const UInt_8 id) const;
bool HasBone(UInt_64 hashName, UInt_8 id) const;
bool HasBone(const UInt_64 hashName) const;
bool HasBone(UInt_64 hashName) const;
bool HasBone(const UInt_8 id) const;
bool HasBone(UInt_8 id) const;
bool AddBone(Bone child);
const Bone* GetBone(const UInt_64 hashName) const;
const Bone* GetBone(UInt_64 hashName) const;
Bone* GetBone(const UInt_64 hashName);
Bone* GetBone(UInt_64 hashName);
const Bone* GetBone(const UInt_8 id) const;
const Bone* GetBone(UInt_8 id) const;
Bone* GetBone(const UInt_8 id);
Bone* GetBone(UInt_8 id);
const Array<Bone>& GetChildren() const;

View File

@@ -7,38 +7,6 @@
namespace ehs
{
const Array<Vertex_f> portraitGuiVerts({
{{0.0f, 0.0f, 1.0f}, {0.0f, 0.0f, -1.0f}, {0.0f, 0.0f}},
{{0.0f, 1.0f, 1.0f}, {0.0f, 0.0f, -1.0f}, {0.0f, 1.0f}},
{{1.0f, 0.0f, 1.0f}, {0.0f, 0.0f, -1.0f}, {1.0f, 0.0f}},
{{1.0f, 1.0f, 1.0f}, {0.0f, 0.0f, -1.0f}, {1.0f, 1.0f}}
});
const Array<UInt_32> portraitGuiIndices({
0,
1,
2,
3,
2,
1
});
const Array<Vertex_f> portraitVerts({
{{-0.5f, -0.5f, 0.0f}, {0.0f, 0.0f, -1.0f}, {0.0f, 0.0f}},
{{-0.5f, 0.5f, 0.0f}, {0.0f, 0.0f, -1.0f}, {0.0f, 1.0f}},
{{0.5f, -0.5f, 0.0f}, {0.0f, 0.0f, -1.0f}, {1.0f, 0.0f}},
{{0.5f, 0.5f, 0.0f}, {0.0f, 0.0f, -1.0f}, {1.0f, 1.0f}}
});
const Array<UInt_32> portraitIndices({
0,
1,
2,
3,
2,
1
});
class Mesh final : public BaseObj
{
protected:
@@ -89,4 +57,24 @@ namespace ehs
private:
static void Calculate(Vertex_f& vert1, Vertex_f& vert2, Vertex_f& vert3);
};
const Mesh portraitGui("PortraitGui",
{
{{0.0f, 0.0f, 1.0f}, {0.0f, 0.0f, -1.0f}, {0.0f, 0.0f}},
{{0.0f, 1.0f, 1.0f}, {0.0f, 0.0f, -1.0f}, {0.0f, 1.0f}},
{{1.0f, 0.0f, 1.0f}, {0.0f, 0.0f, -1.0f}, {1.0f, 0.0f}},
{{1.0f, 1.0f, 1.0f}, {0.0f, 0.0f, -1.0f}, {1.0f, 1.0f}}
},
{0, 1, 2, 3, 2, 1}
);
const Mesh portrait("Portrait",
{
{{-0.5f, -0.5f, 0.0f}, {0.0f, 0.0f, -1.0f}, {0.0f, 0.0f}},
{{-0.5f, 0.5f, 0.0f}, {0.0f, 0.0f, -1.0f}, {0.0f, 1.0f}},
{{0.5f, -0.5f, 0.0f}, {0.0f, 0.0f, -1.0f}, {1.0f, 0.0f}},
{{0.5f, 0.5f, 0.0f}, {0.0f, 0.0f, -1.0f}, {1.0f, 1.0f}}
},
{0, 1, 2, 3, 2, 1}
);
}

View File

@@ -50,7 +50,7 @@ namespace ehs
Str_8 GetId() const;
Array<Mesh> GetMeshes() const;
const Array<Mesh>& GetMeshes() const;
Array<Mesh>& GetMeshes();
@@ -58,13 +58,13 @@ namespace ehs
Mesh* GetMesh(const Str_8& inId);
Bone GetSkeleton() const;
const Bone& GetSkeleton() const;
Bone& GetSkeleton();
Animation* GetAnimation(UInt_64 inHashId);
Array<Animation> GetAnimations() const;
const Array<Animation>& GetAnimations() const;
Array<Animation>& GetAnimations();