[ 2672224 ] Patch To get gcc to compile assimp under Linux

git-svn-id: https://assimp.svn.sourceforge.net/svnroot/assimp/trunk@360 67173fc5-114c-0410-ac8e-9d2fd5bffc1f
pull/1/head
aramis_acg 2009-03-08 16:27:36 +00:00
parent 7080ba231c
commit 0023010840
5 changed files with 14 additions and 8 deletions

View File

@ -76,7 +76,7 @@ enum InputType
IT_Texcoord,
IT_Color,
IT_Tangent,
IT_Bitangent,
IT_Bitangent
};
/** Contains all data for one of the different transformation types */

View File

@ -53,7 +53,7 @@ namespace {
const static aiVector3D base_axis_x(1.f,0.f,0.f);
const static aiVector3D base_axis_z(0.f,0.f,1.f);
const static float angle_epsilon = 0.95f;
};
}
// ------------------------------------------------------------------------------------------------
// Constructor to be privately used by Importer

View File

@ -94,7 +94,7 @@ struct NodeDesc
OBJECT = 1,
LIGHT = 2,
CAMERA = 3,
BONE = 4,
BONE = 4
} type; // type of node
// if object: path

View File

@ -86,7 +86,7 @@ enum ShaderCullMode
{
CULL_NONE,
CULL_CW,
CULL_CCW,
CULL_CCW
};
// ---------------------------------------------------------------------------

View File

@ -42,6 +42,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "AssimpPCH.h"
#ifndef ASSIMP_BUILD_NO_OBJ_IMPORTER
#include "DefaultIOSystem.h"
#include "ObjFileImporter.h"
#include "ObjFileParser.h"
#include "ObjFileData.h"
@ -54,9 +56,11 @@ using namespace std;
// ------------------------------------------------------------------------------------------------
// Default constructor
ObjFileImporter::ObjFileImporter() :
m_pRootObject(NULL),
m_strAbsPath("\\")
m_pRootObject(NULL)
{
DefaultIOSystem io;
m_strAbsPath = io.getOsSeparator();
}
// ------------------------------------------------------------------------------------------------
@ -83,6 +87,8 @@ bool ObjFileImporter::CanRead( const std::string& pFile, IOSystem* pIOHandler, b
// Obj-file import implementation
void ObjFileImporter::InternReadFile( const std::string& pFile, aiScene* pScene, IOSystem* pIOHandler)
{
DefaultIOSystem io;
// Read file into memory
const std::string mode = "rb";
boost::scoped_ptr<IOStream> file( pIOHandler->Open( pFile, mode));
@ -100,8 +106,8 @@ void ObjFileImporter::InternReadFile( const std::string& pFile, aiScene* pScene,
assert (readsize == fileSize);
//
std::string strDirectory("\\"), strModelName;
std::string::size_type pos = pFile.find_last_of("\\");
std::string strDirectory(1,io.getOsSeparator()), strModelName;
std::string::size_type pos = pFile.find_last_of(io.getOsSeparator());
if (pos != std::string::npos)
{
strDirectory = pFile.substr(0, pos);