Animation WIP merge #321
|
@ -58,5 +58,7 @@ namespace SHADE
|
||||||
std::vector<uint32_t> Indices;
|
std::vector<uint32_t> Indices;
|
||||||
std::vector<SHVec4U> VertexBoneIndices;
|
std::vector<SHVec4U> VertexBoneIndices;
|
||||||
std::vector<SHVec4> VertexBoneWeights;
|
std::vector<SHVec4> VertexBoneWeights;
|
||||||
|
|
||||||
|
uint32_t boneCount;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -221,6 +221,7 @@ namespace SHADE
|
||||||
data.VertexNormals.resize(header.vertexCount);
|
data.VertexNormals.resize(header.vertexCount);
|
||||||
data.VertexTexCoords.resize(header.vertexCount);
|
data.VertexTexCoords.resize(header.vertexCount);
|
||||||
data.Indices.resize(header.indexCount);
|
data.Indices.resize(header.indexCount);
|
||||||
|
data.boneCount = header.boneCount;
|
||||||
|
|
||||||
file.read(data.name.data(), header.charCount);
|
file.read(data.name.data(), header.charCount);
|
||||||
file.read(reinterpret_cast<char*>(data.VertexPositions.data()), vertexVec3Byte);
|
file.read(reinterpret_cast<char*>(data.VertexPositions.data()), vertexVec3Byte);
|
||||||
|
@ -252,11 +253,6 @@ namespace SHADE
|
||||||
data.VertexBoneIndices.resize(header.vertexCount);
|
data.VertexBoneIndices.resize(header.vertexCount);
|
||||||
data.VertexBoneWeights.resize(header.vertexCount);
|
data.VertexBoneWeights.resize(header.vertexCount);
|
||||||
|
|
||||||
//for (auto& weight : data.VertexBoneWeights)
|
|
||||||
//{
|
|
||||||
// weight = { -0.1f };
|
|
||||||
//}
|
|
||||||
|
|
||||||
for (uint32_t boneIndex{0}; boneIndex < bones.size(); ++boneIndex)
|
for (uint32_t boneIndex{0}; boneIndex < bones.size(); ++boneIndex)
|
||||||
{
|
{
|
||||||
auto const& bone = bones[boneIndex];
|
auto const& bone = bones[boneIndex];
|
||||||
|
|
Loading…
Reference in New Issue