Formatting changes.

pull/633/head
Andreas Henne 2015-08-06 13:37:16 +02:00
parent fb9e4d1266
commit 5030fe8c7e
1 changed files with 19 additions and 18 deletions

View File

@ -3,7 +3,7 @@
Open Asset Import Library (assimp)
---------------------------------------------------------------------------
Copyright (c) 2006-2012, assimp team
Copyright (c) 2006-2015, assimp team
All rights reserved.
@ -53,6 +53,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "../include/assimp/scene.h"
#include "../include/assimp/DefaultLogger.hpp"
using namespace Assimp;
namespace {
@ -123,7 +124,7 @@ bool STLImporter::CanRead( const std::string& pFile, IOSystem* pIOHandler, bool
if (extension == "stl")
return true;
else if (!extension.length() || checkSig) {
else if (!extension.length() || checkSig) {
if (!pIOHandler)
return true;
const char* tokens[] = {"STL","solid"};
@ -159,7 +160,7 @@ void STLImporter::InternReadFile( const std::string& pFile,
boost::scoped_ptr<IOStream> file( pIOHandler->Open( pFile, "rb"));
// Check whether we can read from the file
if( file.get() == NULL) {
if( file.get() == NULL) {
throw DeadlyImportError( "Failed to open STL file " + pFile + ".");
}
@ -388,7 +389,7 @@ bool STLImporter::LoadBinaryFile()
// search for an occurence of "COLOR=" in the header
const unsigned char* sz2 = (const unsigned char*)mBuffer;
const unsigned char* const szEnd = sz2+80;
while (sz2 < szEnd) {
while (sz2 < szEnd) {
if ('C' == *sz2++ && 'O' == *sz2++ && 'L' == *sz2++ &&
'O' == *sz2++ && 'R' == *sz2++ && '=' == *sz2++) {
@ -425,7 +426,7 @@ bool STLImporter::LoadBinaryFile()
vp = pMesh->mVertices = new aiVector3D[pMesh->mNumVertices];
vn = pMesh->mNormals = new aiVector3D[pMesh->mNumVertices];
for (unsigned int i = 0; i < pMesh->mNumFaces;++i) {
for (unsigned int i = 0; i < pMesh->mNumFaces;++i) {
// NOTE: Blender sometimes writes empty normals ... this is not
// our fault ... the RemoveInvalidData helper step should fix that