Initiual commit: AssetImporter source moved from ZFXCE repository to its own repository. PLease do not use the ZFXCE repo any more.
git-svn-id: https://assimp.svn.sourceforge.net/svnroot/assimp/trunk@1 67173fc5-114c-0410-ac8e-9d2fd5bffc1f
This commit is contained in:
43
code/KillNormalsProcess.cpp
Normal file
43
code/KillNormalsProcess.cpp
Normal file
@@ -0,0 +1,43 @@
|
||||
/** @file Implementation of the post processing step tokill mesh normals
|
||||
*/
|
||||
#include "KillNormalsProcess.h"
|
||||
#include "../include/aiPostProcess.h"
|
||||
#include "../include/aiMesh.h"
|
||||
#include "../include/aiScene.h"
|
||||
|
||||
using namespace Assimp;
|
||||
|
||||
// Constructor to be privately used by Importer
|
||||
KillNormalsProcess::KillNormalsProcess()
|
||||
{
|
||||
}
|
||||
|
||||
// Destructor, private as well
|
||||
KillNormalsProcess::~KillNormalsProcess()
|
||||
{
|
||||
// nothing to do here
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
// Returns whether the processing step is present in the given flag field.
|
||||
bool KillNormalsProcess::IsActive( unsigned int pFlags) const
|
||||
{
|
||||
return (pFlags & aiProcess_KillNormals) != 0;
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
// Executes the post processing step on the given imported data.
|
||||
void KillNormalsProcess::Execute( aiScene* pScene)
|
||||
{
|
||||
for( unsigned int a = 0; a < pScene->mNumMeshes; a++)
|
||||
this->KillMeshNormals( pScene->mMeshes[a]);
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
// Executes the post processing step on the given imported data.
|
||||
void KillNormalsProcess::KillMeshNormals(aiMesh* pMesh)
|
||||
{
|
||||
delete[] pMesh->mNormals;
|
||||
pMesh->mNormals = NULL;
|
||||
return;
|
||||
}
|
||||
Reference in New Issue
Block a user