Fixing build errors.
git-svn-id: https://assimp.svn.sourceforge.net/svnroot/assimp/trunk@395 67173fc5-114c-0410-ac8e-9d2fd5bffc1fpull/1/head
parent
85a14fa265
commit
0d53ac5ad5
|
@ -253,9 +253,9 @@ struct Model
|
||||||
//! Vector with all generated group
|
//! Vector with all generated group
|
||||||
std::vector<std::string> m_GroupLib;
|
std::vector<std::string> m_GroupLib;
|
||||||
//! Vector with all generated vertices
|
//! Vector with all generated vertices
|
||||||
std::vector<aiVector3D*> m_Vertices;
|
std::vector<aiVector3D> m_Vertices;
|
||||||
//! vector with all generated normals
|
//! vector with all generated normals
|
||||||
std::vector<aiVector3D*> m_Normals;
|
std::vector<aiVector3D> m_Normals;
|
||||||
//! Groupmap
|
//! Groupmap
|
||||||
GroupMap m_Groups;
|
GroupMap m_Groups;
|
||||||
//! Group to face id assignment
|
//! Group to face id assignment
|
||||||
|
@ -263,7 +263,7 @@ struct Model
|
||||||
//! Active group
|
//! Active group
|
||||||
std::string m_strActiveGroup;
|
std::string m_strActiveGroup;
|
||||||
//! Vector with generated texture coordinates
|
//! Vector with generated texture coordinates
|
||||||
std::vector<aiVector2D*> m_TextureCoord;
|
std::vector<aiVector2D> m_TextureCoord;
|
||||||
//! Current mesh instance
|
//! Current mesh instance
|
||||||
Mesh *m_pCurrentMesh;
|
Mesh *m_pCurrentMesh;
|
||||||
//! Vector with stored meshes
|
//! Vector with stored meshes
|
||||||
|
|
|
@ -341,14 +341,14 @@ void ObjFileImporter::createVertexArray(const ObjFile::Model* pModel,
|
||||||
{
|
{
|
||||||
unsigned int vertex = pSourceFace->m_pVertices->at( vertexIndex );
|
unsigned int vertex = pSourceFace->m_pVertices->at( vertexIndex );
|
||||||
assert ( vertex < pModel->m_Vertices.size() );
|
assert ( vertex < pModel->m_Vertices.size() );
|
||||||
pMesh->mVertices[ newIndex ] = *pModel->m_Vertices[ vertex ];
|
pMesh->mVertices[ newIndex ] = pModel->m_Vertices[ vertex ];
|
||||||
|
|
||||||
// Copy all normals
|
// Copy all normals
|
||||||
if ( !pSourceFace->m_pNormals->empty() )
|
if ( !pSourceFace->m_pNormals->empty() )
|
||||||
{
|
{
|
||||||
const unsigned int normal = pSourceFace->m_pNormals->at( vertexIndex );
|
const unsigned int normal = pSourceFace->m_pNormals->at( vertexIndex );
|
||||||
ai_assert( normal < pModel->m_Normals.size() );
|
ai_assert( normal < pModel->m_Normals.size() );
|
||||||
pMesh->mNormals[ newIndex ] = *pModel->m_Normals[ normal ];
|
pMesh->mNormals[ newIndex ] = pModel->m_Normals[ normal ];
|
||||||
}
|
}
|
||||||
|
|
||||||
// Copy all texture coordinates
|
// Copy all texture coordinates
|
||||||
|
@ -362,7 +362,7 @@ void ObjFileImporter::createVertexArray(const ObjFile::Model* pModel,
|
||||||
{
|
{
|
||||||
if ( pMesh->mNumUVComponents[ i ] > 0 )
|
if ( pMesh->mNumUVComponents[ i ] > 0 )
|
||||||
{
|
{
|
||||||
aiVector2D coord2d = *pModel->m_TextureCoord[ tex ];
|
aiVector2D coord2d = pModel->m_TextureCoord[ tex ];
|
||||||
pMesh->mTextureCoords[ i ][ newIndex ] = aiVector3D( coord2d.x, coord2d.y, 0.0 );
|
pMesh->mTextureCoords[ i ][ newIndex ] = aiVector3D( coord2d.x, coord2d.y, 0.0 );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -235,7 +235,7 @@ void ObjFileParser::getVector3(std::vector<aiVector3D> &point3d_array)
|
||||||
|
|
||||||
// -------------------------------------------------------------------
|
// -------------------------------------------------------------------
|
||||||
// Get values for a new 2D vector instance
|
// Get values for a new 2D vector instance
|
||||||
void ObjFileParser::getVector2( std::vector<aiVector2D*> &point2d_array )
|
void ObjFileParser::getVector2( std::vector<aiVector2D> &point2d_array )
|
||||||
{
|
{
|
||||||
float x, y;
|
float x, y;
|
||||||
copyNextWord(m_buffer, BUFFERSIZE);
|
copyNextWord(m_buffer, BUFFERSIZE);
|
||||||
|
@ -244,7 +244,7 @@ void ObjFileParser::getVector2( std::vector<aiVector2D*> &point2d_array )
|
||||||
copyNextWord(m_buffer, BUFFERSIZE);
|
copyNextWord(m_buffer, BUFFERSIZE);
|
||||||
y = (float) fast_atof(m_buffer);
|
y = (float) fast_atof(m_buffer);
|
||||||
|
|
||||||
point2d_array.push_back(new aiVector2D(x, y));
|
point2d_array.push_back(aiVector2D(x, y));
|
||||||
|
|
||||||
m_DataIt = skipLine<DataArrayIt>( m_DataIt, m_DataItEnd, m_uiLine );
|
m_DataIt = skipLine<DataArrayIt>( m_DataIt, m_DataItEnd, m_uiLine );
|
||||||
}
|
}
|
||||||
|
|
|
@ -88,7 +88,7 @@ private:
|
||||||
/// Stores the following 3d vector.
|
/// Stores the following 3d vector.
|
||||||
void getVector3( std::vector<aiVector3D> &point3d_array );
|
void getVector3( std::vector<aiVector3D> &point3d_array );
|
||||||
/// Stores the following 3d vector.
|
/// Stores the following 3d vector.
|
||||||
void getVector2(std::vector<aiVector2D*> &point2d_array);
|
void getVector2(std::vector<aiVector2D> &point2d_array);
|
||||||
/// Stores the following face.
|
/// Stores the following face.
|
||||||
void getFace();
|
void getFace();
|
||||||
void getMaterialDesc();
|
void getMaterialDesc();
|
||||||
|
|
Loading…
Reference in New Issue