From 0d53ac5ad558098fc3aaf1315a6566519fc324d3 Mon Sep 17 00:00:00 2001 From: aramis_acg <aramis_acg@67173fc5-114c-0410-ac8e-9d2fd5bffc1f> Date: Sun, 19 Apr 2009 10:36:36 +0000 Subject: [PATCH] Fixing build errors. git-svn-id: https://assimp.svn.sourceforge.net/svnroot/assimp/trunk@395 67173fc5-114c-0410-ac8e-9d2fd5bffc1f --- code/ObjFileData.h | 6 +++--- code/ObjFileImporter.cpp | 6 +++--- code/ObjFileParser.cpp | 4 ++-- code/ObjFileParser.h | 2 +- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/code/ObjFileData.h b/code/ObjFileData.h index 225c66afb..69fae0727 100644 --- a/code/ObjFileData.h +++ b/code/ObjFileData.h @@ -253,9 +253,9 @@ struct Model //! Vector with all generated group std::vector<std::string> m_GroupLib; //! Vector with all generated vertices - std::vector<aiVector3D*> m_Vertices; + std::vector<aiVector3D> m_Vertices; //! vector with all generated normals - std::vector<aiVector3D*> m_Normals; + std::vector<aiVector3D> m_Normals; //! Groupmap GroupMap m_Groups; //! Group to face id assignment @@ -263,7 +263,7 @@ struct Model //! Active group std::string m_strActiveGroup; //! Vector with generated texture coordinates - std::vector<aiVector2D*> m_TextureCoord; + std::vector<aiVector2D> m_TextureCoord; //! Current mesh instance Mesh *m_pCurrentMesh; //! Vector with stored meshes diff --git a/code/ObjFileImporter.cpp b/code/ObjFileImporter.cpp index 88fcee64a..7237111dd 100644 --- a/code/ObjFileImporter.cpp +++ b/code/ObjFileImporter.cpp @@ -341,14 +341,14 @@ void ObjFileImporter::createVertexArray(const ObjFile::Model* pModel, { unsigned int vertex = pSourceFace->m_pVertices->at( vertexIndex ); assert ( vertex < pModel->m_Vertices.size() ); - pMesh->mVertices[ newIndex ] = *pModel->m_Vertices[ vertex ]; + pMesh->mVertices[ newIndex ] = pModel->m_Vertices[ vertex ]; // Copy all normals if ( !pSourceFace->m_pNormals->empty() ) { const unsigned int normal = pSourceFace->m_pNormals->at( vertexIndex ); 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 @@ -362,7 +362,7 @@ void ObjFileImporter::createVertexArray(const ObjFile::Model* pModel, { 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 ); } } diff --git a/code/ObjFileParser.cpp b/code/ObjFileParser.cpp index eb7962d62..cfe0846da 100644 --- a/code/ObjFileParser.cpp +++ b/code/ObjFileParser.cpp @@ -235,7 +235,7 @@ void ObjFileParser::getVector3(std::vector<aiVector3D> &point3d_array) // ------------------------------------------------------------------- // 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; copyNextWord(m_buffer, BUFFERSIZE); @@ -244,7 +244,7 @@ void ObjFileParser::getVector2( std::vector<aiVector2D*> &point2d_array ) copyNextWord(m_buffer, BUFFERSIZE); 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 ); } diff --git a/code/ObjFileParser.h b/code/ObjFileParser.h index bd4d162f8..5f8fb37b4 100644 --- a/code/ObjFileParser.h +++ b/code/ObjFileParser.h @@ -88,7 +88,7 @@ private: /// Stores the following 3d vector. void getVector3( std::vector<aiVector3D> &point3d_array ); /// Stores the following 3d vector. - void getVector2(std::vector<aiVector2D*> &point2d_array); + void getVector2(std::vector<aiVector2D> &point2d_array); /// Stores the following face. void getFace(); void getMaterialDesc();