Supports skinnd and unskinned meshes

ExplosionEffects now supports SplatMapping
This commit is contained in:
Teejoon
2016-02-08 13:01:10 +01:00
parent 43719f8304
commit d2cfa592f0
8 changed files with 355 additions and 112 deletions
+6 -3
View File
@@ -40,8 +40,8 @@ void RawModelCustom::ReadMeshFile(std::string filePath)
void RawModelCustom::ReadMeshFileHeader(std::size_t& offset, char* fileData)
{
#ifdef BOOST_LITTLE_ENDIAN
hasSkin = true;//*(bool*)(fileData + offset);
//offset += sizeof(bool);
hasSkin = *(bool*)(fileData + offset);
offset += sizeof(bool);
if (hasSkin) {
m_SkinedVertices.resize(static_cast<std::size_t>(*(unsigned int*)(fileData + offset)));
}
@@ -290,7 +290,10 @@ void RawModelCustom::ReadAnimationFile(std::string filePath)
if (!in.is_open()) {
//throw Resource::FailedLoadingException("Open animation file failed");
return;
}
} else if (hasSkin) {
throw Resource::FailedLoadingException("Open animation file for a skinned mesh failed, unknown stuff will happen");
return;
}
unsigned int fileByteSize = static_cast<unsigned int>(in.tellg());
in.seekg(0, std::ios_base::beg);