- corrected all local include paths so that there are no "additional include paths" necessary in the build configuration anymore

- wrote some further documentation text
- moved ObjFileParser.h to the code directory

git-svn-id: https://assimp.svn.sourceforge.net/svnroot/assimp/trunk@23 67173fc5-114c-0410-ac8e-9d2fd5bffc1f
This commit is contained in:
ulfjorensen
2008-05-21 15:35:28 +00:00
parent 10dbe4e6a3
commit 71fa1b508e
18 changed files with 48 additions and 33 deletions
+1 -1
View File
@@ -46,7 +46,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include <algorithm>
#include "3DSSpatialSort.h"
#include "aiAssert.h"
#include "../include/aiAssert.h"
using namespace Assimp;
using namespace Assimp::Dot3DS;
+1 -1
View File
@@ -43,7 +43,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "BaseImporter.h"
#include "DefaultLogger.h"
#include "../include/aiScene.h"
#include "aiAssert.h"
#include "../include/aiAssert.h"
using namespace Assimp;
// ------------------------------------------------------------------------------------------------
+1 -1
View File
@@ -41,7 +41,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
/** @file Default File I/O implementation for #Importer */
#include "DefaultIOStream.h"
#include "aiAssert.h"
#include "../include/aiAssert.h"
#include <sys/types.h>
#include <sys/stat.h>
+1 -1
View File
@@ -44,7 +44,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include <string>
#include <stdio.h>
#include "IOStream.h"
#include "../include/IOStream.h"
namespace Assimp
{
+1 -1
View File
@@ -42,7 +42,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef AI_DEFAULTIOSYSTEM_H_INC
#define AI_DEFAULTIOSYSTEM_H_INC
#include "IOSystem.h"
#include "../include/IOSystem.h"
namespace Assimp
{
+2 -2
View File
@@ -40,10 +40,10 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "DefaultLogger.h"
#include "aiAssert.h"
#include "../include/aiAssert.h"
#include "DefaultIOSystem.h"
#include "Win32DebugLogStream.h"
#include "IOStream.h"
#include "../include/IOStream.h"
#include "FileLogStream.h"
#include <iostream>
+1 -1
View File
@@ -38,7 +38,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
----------------------------------------------------------------------
*/
#include "Logger.h"
#include "../include/Logger.h"
#include <vector>
namespace Assimp
+2 -2
View File
@@ -1,8 +1,8 @@
#ifndef ASSIMP_FILELOGSTREAM_H_INC
#define ASSIMP_FILELOGSTREAM_H_INC
#include "LogStream.h"
#include "IOStream.h"
#include "../include/LogStream.h"
#include "../include/IOStream.h"
namespace Assimp
{
+1 -3
View File
@@ -38,9 +38,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
----------------------------------------------------------------------
*/
#include "assimp.h"
#include "aiMaterial.h"
#include "assimp.hpp"
#include "../include/aiMaterial.h"
#include "MaterialSystem.h"
+1 -1
View File
@@ -43,7 +43,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include <vector>
#include <map>
#include "aiTypes.h"
#include "../include/aiTypes.h"
namespace Assimp
{
+5 -5
View File
@@ -1,11 +1,11 @@
#include "ObjFileImporter.h"
#include "ObjFileParser.h"
#include "ObjFileData.h"
#include "IOStream.h"
#include "IOSystem.h"
#include "aiMesh.h"
#include "aiScene.h"
#include "aiAssert.h"
#include "../include/IOStream.h"
#include "../include/IOSystem.h"
#include "../include/aiMesh.h"
#include "../include/aiScene.h"
#include "../include/aiAssert.h"
#include "MaterialSystem.h"
#include "DefaultLogger.h"
+2 -2
View File
@@ -1,8 +1,8 @@
#include "ObjFileMtlImporter.h"
#include "aiTypes.h"
#include "../include/aiTypes.h"
#include "../include/aiAssert.h"
#include "ObjTools.h"
#include "ObjFileData.h"
#include "aiAssert.h"
#include "fast_atof.h"
+3 -4
View File
@@ -2,10 +2,9 @@
#include "ObjTools.h"
#include "ObjFileData.h"
#include "DefaultIOSystem.h"
#include "IOStream.h"
#include "aiTypes.h"
#include "aiVector3D.h"
#include "aiAssert.h"
#include "../include/IOStream.h"
#include "../include/aiTypes.h"
#include "../include/aiAssert.h"
#include "fast_atof.h"
#include <iostream>
+108
View File
@@ -0,0 +1,108 @@
/*
Free Asset Import Library (ASSIMP)
----------------------------------------------------------------------
Copyright (c) 2006-2008, ASSIMP Development Team
All rights reserved.
Redistribution and use of this software in source and binary forms,
with or without modification, are permitted provided that the
following conditions are met:
* Redistributions of source code must retain the above
copyright notice, this list of conditions and the
following disclaimer.
* Redistributions in binary form must reproduce the above
copyright notice, this list of conditions and the
following disclaimer in the documentation and/or other
materials provided with the distribution.
* Neither the name of the ASSIMP team, nor the names of its
contributors may be used to endorse or promote products
derived from this software without specific prior
written permission of the ASSIMP Development Team.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
----------------------------------------------------------------------
*/
#ifndef OBJ_FILEPARSER_H_INC
#define OBJ_FILEPARSER_H_INC
#include <vector>
#include <string>
#include "../include/aiTypes.h"
/*struct aiVector2D_t;
struct aiVector3D_t;*/
namespace Assimp
{
namespace ObjFile
{
struct Model;
struct Object;
struct Material;
struct Point3;
struct Point2;
}
class ObjFileImporter;
class ObjFileParser
{
public:
static const size_t BUFFERSIZE = 1024;
typedef std::vector<char> DataArray;
typedef std::vector<char>::iterator DataArrayIt;
typedef std::vector<char>::const_iterator ConstDataArrayIt;
public:
ObjFileParser(std::vector<char> &Data, const std::string &strAbsPath, const std::string &strModelName);
~ObjFileParser();
ObjFile::Model *GetModel() const;
private:
void parseFile();
void copyNextWord(char *pBuffer, size_t length);
void copyNextLine(char *pBuffer, size_t length);
void getVector3(std::vector<aiVector3D*> &point3d_array);
void getVector2(std::vector<aiVector2D*> &point2d_array);
void getFace();
void getMaterialDesc();
void getComment();
void getMaterialLib();
void getNewMaterial();
void getGroupName();
void getGroupNumber();
void getObjectName();
void createObject(const std::string &strObjectName);
void reportErrorTokenInFace();
void extractExtension(const std::string strFile, std::string &strExt);
private:
std::string m_strAbsPath;
DataArrayIt m_DataIt;
DataArrayIt m_DataItEnd;
ObjFile::Model *m_pModel;
unsigned int m_uiLine;
char m_buffer[BUFFERSIZE];
};
} // Namespace Assimp
#endif
+1 -1
View File
@@ -1,7 +1,7 @@
#ifndef AI_WIN32DEBUGLOGSTREAM_H_INC
#define AI_WIN32DEBUGLOGSTREAM_H_INC
#include "LogStream.h"
#include "../include/LogStream.h"
//#ifdef _MSC_VER
#ifdef WIN32
+1 -1
View File
@@ -1,5 +1,5 @@
#include <iostream>
#include "aiAssert.h"
#include "../include/aiAssert.h"
#ifdef _WIN32
#ifndef __GNUC__
# include "crtdbg.h"