diff --git a/src/Libraries/MeshWriter.cpp b/src/Libraries/MeshWriter.cpp index df74954..54ef691 100644 --- a/src/Libraries/MeshWriter.cpp +++ b/src/Libraries/MeshWriter.cpp @@ -138,6 +138,11 @@ namespace SH_COMP sizeof(uint32_t) ); + file.write( + reinterpret_cast(&header.startNode), + sizeof(uint32_t) + ); + file.write( reinterpret_cast(header.charCounts.data()), sizeof(uint32_t) * header.nodeCount diff --git a/src/PseudoMath.h b/src/PseudoMath.h index a0e17dd..151e024 100644 --- a/src/PseudoMath.h +++ b/src/PseudoMath.h @@ -8,16 +8,29 @@ namespace SH_COMP float x, y; }; - struct SHVec3 - { - float x, y, z; - }; struct SHVec4 { float x, y, z, w; }; + struct SHVec3 + { + SHVec3() + :x{ 0.f }, y{ 0.f }, z{ 0.f } + {} + + SHVec3(SHVec4 const& rhs) + :x{ rhs.x }, y{ rhs.y }, z{ rhs.z } + {} + + SHVec3(float inx, float iny, float inz) + :x{ iny }, y{ iny }, z{ inz } + {} + + float x, y, z; + }; + struct SHVec4i { uint32_t x, y, z, w; diff --git a/src/Types/AnimationAsset.h b/src/Types/AnimationAsset.h index fa89337..c35df07 100644 --- a/src/Types/AnimationAsset.h +++ b/src/Types/AnimationAsset.h @@ -28,15 +28,23 @@ namespace SH_COMP struct KeyBase { float time; - SHVec3 value; }; // Smallest data containers - struct PositionKey :KeyBase {}; + struct PositionKey :KeyBase + { + SHVec3 value; + }; - struct RotationKey : KeyBase {}; + struct RotationKey : KeyBase + { + SHVec4 value; + }; - struct ScaleKey :KeyBase {}; + struct ScaleKey :KeyBase + { + SHVec3 value; + }; struct AnimDataHeader { diff --git a/src/Types/RigAsset.h b/src/Types/RigAsset.h index d01c193..7e96fb0 100644 --- a/src/Types/RigAsset.h +++ b/src/Types/RigAsset.h @@ -21,8 +21,6 @@ namespace SH_COMP uint32_t nodeCount; IndexType startNode; std::vector charCounts; - std::vector childCount; - std::vector dataFlags; }; struct NodeAsset