Revert "Fixed mesh centering"
This reverts commit 504042119962c2ab55fe8ef9bb16bcc878fa1b38 [formerly fae2cf41a63c7ce599c227344478567b1f12f130]. Conflicts: src/Nazara/Utility/Loaders/MD5Mesh/Loader.cpp Former-commit-id: 6bd25fd7216121cce6879d74c6c98fbba545f2cf
This commit is contained in:
@@ -163,6 +163,9 @@ namespace
|
||||
subMesh->SetMaterialIndex(meshes[i].material);
|
||||
subMesh->SetPrimitiveMode(nzPrimitiveMode_TriangleList);
|
||||
|
||||
if (parameters.mesh.center)
|
||||
subMesh->Center();
|
||||
|
||||
// Ce que nous pouvons générer dépend des données à disposition (par exemple les tangentes nécessitent des coordonnées de texture)
|
||||
if (hasNormals && hasTexCoords)
|
||||
subMesh->GenerateTangents();
|
||||
@@ -174,18 +177,6 @@ namespace
|
||||
mesh->AddSubMesh(meshes[i].name + '_' + materials[meshes[i].material], subMesh);
|
||||
}
|
||||
|
||||
if (parameters.mesh.center)
|
||||
{
|
||||
unsigned int subMeshCount = mesh->GetSubMeshCount();
|
||||
for (unsigned int i = 0; i < subMeshCount; ++i)
|
||||
{
|
||||
NzStaticMesh* subMesh = static_cast<NzStaticMesh*>(mesh->GetSubMesh(i));
|
||||
subMesh->Center();
|
||||
}
|
||||
|
||||
mesh->InvalidateAABB();
|
||||
}
|
||||
|
||||
mesh->SetMaterialCount(parser.GetMaterialCount());
|
||||
|
||||
model->SetMesh(mesh);
|
||||
|
||||
Reference in New Issue
Block a user