Merge branch 'force_generate_normals'
# solved Conflicts: # code/GenFaceNormalsProcess.cpp # code/GenVertexNormalsProcess.cpp
This commit is contained in:
@@ -72,6 +72,7 @@ GenVertexNormalsProcess::~GenVertexNormalsProcess() {
|
||||
// Returns whether the processing step is present in the given flag field.
|
||||
bool GenVertexNormalsProcess::IsActive( unsigned int pFlags) const
|
||||
{
|
||||
force_ = (pFlags & aiProcess_ForceGenNormals) != 0;
|
||||
return (pFlags & aiProcess_GenSmoothNormals) != 0;
|
||||
}
|
||||
|
||||
@@ -113,8 +114,10 @@ void GenVertexNormalsProcess::Execute( aiScene* pScene)
|
||||
// Executes the post processing step on the given imported data.
|
||||
bool GenVertexNormalsProcess::GenMeshVertexNormals (aiMesh* pMesh, unsigned int meshIndex)
|
||||
{
|
||||
if (NULL != pMesh->mNormals)
|
||||
return false;
|
||||
if (NULL != pMesh->mNormals) {
|
||||
if (force_) delete[] pMesh->mNormals;
|
||||
else return false;
|
||||
}
|
||||
|
||||
// If the mesh consists of lines and/or points but not of
|
||||
// triangles or higher-order polygons the normal vectors
|
||||
|
||||
Reference in New Issue
Block a user