[ 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-9d2fd5bffc1fpull/1/head
parent
7080ba231c
commit
0023010840
|
@ -76,7 +76,7 @@ enum InputType
|
||||||
IT_Texcoord,
|
IT_Texcoord,
|
||||||
IT_Color,
|
IT_Color,
|
||||||
IT_Tangent,
|
IT_Tangent,
|
||||||
IT_Bitangent,
|
IT_Bitangent
|
||||||
};
|
};
|
||||||
|
|
||||||
/** Contains all data for one of the different transformation types */
|
/** Contains all data for one of the different transformation types */
|
||||||
|
|
|
@ -53,7 +53,7 @@ namespace {
|
||||||
const static aiVector3D base_axis_x(1.f,0.f,0.f);
|
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 aiVector3D base_axis_z(0.f,0.f,1.f);
|
||||||
const static float angle_epsilon = 0.95f;
|
const static float angle_epsilon = 0.95f;
|
||||||
};
|
}
|
||||||
|
|
||||||
// ------------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------------
|
||||||
// Constructor to be privately used by Importer
|
// Constructor to be privately used by Importer
|
||||||
|
|
|
@ -94,7 +94,7 @@ struct NodeDesc
|
||||||
OBJECT = 1,
|
OBJECT = 1,
|
||||||
LIGHT = 2,
|
LIGHT = 2,
|
||||||
CAMERA = 3,
|
CAMERA = 3,
|
||||||
BONE = 4,
|
BONE = 4
|
||||||
} type; // type of node
|
} type; // type of node
|
||||||
|
|
||||||
// if object: path
|
// if object: path
|
||||||
|
|
|
@ -86,7 +86,7 @@ enum ShaderCullMode
|
||||||
{
|
{
|
||||||
CULL_NONE,
|
CULL_NONE,
|
||||||
CULL_CW,
|
CULL_CW,
|
||||||
CULL_CCW,
|
CULL_CCW
|
||||||
};
|
};
|
||||||
|
|
||||||
// ---------------------------------------------------------------------------
|
// ---------------------------------------------------------------------------
|
||||||
|
|
|
@ -42,6 +42,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
#include "AssimpPCH.h"
|
#include "AssimpPCH.h"
|
||||||
#ifndef ASSIMP_BUILD_NO_OBJ_IMPORTER
|
#ifndef ASSIMP_BUILD_NO_OBJ_IMPORTER
|
||||||
|
|
||||||
|
#include "DefaultIOSystem.h"
|
||||||
|
|
||||||
#include "ObjFileImporter.h"
|
#include "ObjFileImporter.h"
|
||||||
#include "ObjFileParser.h"
|
#include "ObjFileParser.h"
|
||||||
#include "ObjFileData.h"
|
#include "ObjFileData.h"
|
||||||
|
@ -54,9 +56,11 @@ using namespace std;
|
||||||
// ------------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------------
|
||||||
// Default constructor
|
// Default constructor
|
||||||
ObjFileImporter::ObjFileImporter() :
|
ObjFileImporter::ObjFileImporter() :
|
||||||
m_pRootObject(NULL),
|
m_pRootObject(NULL)
|
||||||
m_strAbsPath("\\")
|
|
||||||
{
|
{
|
||||||
|
DefaultIOSystem io;
|
||||||
|
m_strAbsPath = io.getOsSeparator();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// ------------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------------
|
||||||
|
@ -83,6 +87,8 @@ bool ObjFileImporter::CanRead( const std::string& pFile, IOSystem* pIOHandler, b
|
||||||
// Obj-file import implementation
|
// Obj-file import implementation
|
||||||
void ObjFileImporter::InternReadFile( const std::string& pFile, aiScene* pScene, IOSystem* pIOHandler)
|
void ObjFileImporter::InternReadFile( const std::string& pFile, aiScene* pScene, IOSystem* pIOHandler)
|
||||||
{
|
{
|
||||||
|
DefaultIOSystem io;
|
||||||
|
|
||||||
// Read file into memory
|
// Read file into memory
|
||||||
const std::string mode = "rb";
|
const std::string mode = "rb";
|
||||||
boost::scoped_ptr<IOStream> file( pIOHandler->Open( pFile, mode));
|
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);
|
assert (readsize == fileSize);
|
||||||
|
|
||||||
//
|
//
|
||||||
std::string strDirectory("\\"), strModelName;
|
std::string strDirectory(1,io.getOsSeparator()), strModelName;
|
||||||
std::string::size_type pos = pFile.find_last_of("\\");
|
std::string::size_type pos = pFile.find_last_of(io.getOsSeparator());
|
||||||
if (pos != std::string::npos)
|
if (pos != std::string::npos)
|
||||||
{
|
{
|
||||||
strDirectory = pFile.substr(0, pos);
|
strDirectory = pFile.substr(0, pos);
|
||||||
|
|
Loading…
Reference in New Issue