Update FBXConverter.cpp

Fix merge conflicts
pull/2541/head
Kim Kulling 2019-07-11 19:17:41 +02:00 committed by GitHub
parent eb5e829436
commit da33262bcc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 33 deletions

View File

@ -420,11 +420,6 @@ namespace Assimp {
out_camera->mAspect = cam.AspectWidth() / cam.AspectHeight();
//cameras are defined along positive x direction
/*out_camera->mPosition = cam.Position();
out_camera->mLookAt = (cam.InterestPosition() - out_camera->mPosition).Normalize();
out_camera->mUp = cam.UpVector();*/
out_camera->mPosition = aiVector3D(0.0f);
out_camera->mLookAt = aiVector3D(1.0f, 0.0f, 0.0f);
out_camera->mUp = aiVector3D(0.0f, 1.0f, 0.0f);
@ -667,8 +662,7 @@ namespace Assimp {
if ((v - all_ones).SquareLength() > zero_epsilon) {
return true;
}
}
else if (ok) {
} else if (ok) {
if (v.SquareLength() > zero_epsilon) {
return true;
}
@ -1396,10 +1390,6 @@ namespace Assimp {
}
std::vector<aiAnimMesh*> animMeshes;
<<<<<<< HEAD:code/FBXConverter.cpp
size_t bsIdx(0), bsChannelIdx(0);
=======
>>>>>>> master:code/FBX/FBXConverter.cpp
for (const BlendShape* blendShape : mesh.GetBlendShapes()) {
for (const BlendShapeChannel* blendShapeChannel : blendShape->BlendShapeChannels()) {
const std::vector<const ShapeGeometry*>& shapeGeometries = blendShapeChannel->GetShapeGeometries();
@ -1417,12 +1407,7 @@ namespace Assimp {
unsigned int count = 0;
const unsigned int* outIndices = mesh.ToOutputVertexIndex(index, count);
for (unsigned int k = 0; k < count; k++) {
<<<<<<< HEAD:code/FBXConverter.cpp
unsigned int index = outIndices[k];
=======
unsigned int index = translateIndexMap[outIndices[k]];
>>>>>>> master:code/FBX/FBXConverter.cpp
animMesh->mVertices[index] += vertex;
if (animMesh->mNormals != nullptr) {
animMesh->mNormals[index] += normal;
@ -1433,20 +1418,6 @@ namespace Assimp {
animMesh->mWeight = shapeGeometries.size() > 1 ? blendShapeChannel->DeformPercent() / 100.0f : 1.0f;
animMeshes.push_back(animMesh);
}
<<<<<<< HEAD:code/FBXConverter.cpp
bsChannelIdx++;
}
bsIdx++;
}
const size_t numAnimMeshes = animMeshes.size();
if (numAnimMeshes > 0) {
out_mesh->mNumAnimMeshes = static_cast<unsigned int>(numAnimMeshes);
out_mesh->mAnimMeshes = new aiAnimMesh * [numAnimMeshes];
for (size_t i = 0; i < numAnimMeshes; i++) {
out_mesh->mAnimMeshes[i] = animMeshes.at(i);
=======
>>>>>>> master:code/FBX/FBXConverter.cpp
}
}
@ -1756,8 +1727,7 @@ namespace Assimp {
void FBXConverter::TrySetTextureProperties(aiMaterial* out_mat, const TextureMap& textures,
const std::string& propName,
aiTextureType target, const MeshGeometry* const mesh)
{
aiTextureType target, const MeshGeometry* const mesh) {
TextureMap::const_iterator it = textures.find(propName);
if (it == textures.end()) {
return;