ObjImporter: remove unused code.

pull/996/head
Kim Kulling 2016-09-06 15:41:37 +02:00
parent e51b7d2a61
commit ffdca3593b
2 changed files with 8 additions and 12 deletions

View File

@ -285,8 +285,6 @@ struct Model
ObjFile::Material *m_pDefaultMaterial; ObjFile::Material *m_pDefaultMaterial;
//! Vector with all generated materials //! Vector with all generated materials
std::vector<std::string> m_MaterialLib; std::vector<std::string> m_MaterialLib;
//! Vector with all generated group
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

View File

@ -692,38 +692,36 @@ int ObjFileParser::getMaterialIndex( const std::string &strMaterialName )
// ------------------------------------------------------------------- // -------------------------------------------------------------------
// Getter for a group name. // Getter for a group name.
void ObjFileParser::getGroupName() void ObjFileParser::getGroupName() {
{ std::string groupName;
std::string strGroupName;
// here we skip 'g ' from line // here we skip 'g ' from line
m_DataIt = getNextToken<DataArrayIt>(m_DataIt, m_DataItEnd); m_DataIt = getNextToken<DataArrayIt>(m_DataIt, m_DataItEnd);
m_DataIt = getName<DataArrayIt>(m_DataIt, m_DataItEnd, strGroupName); m_DataIt = getName<DataArrayIt>(m_DataIt, m_DataItEnd, groupName);
if( isEndOfBuffer( m_DataIt, m_DataItEnd ) ) { if( isEndOfBuffer( m_DataIt, m_DataItEnd ) ) {
return; return;
} }
// Change active group, if necessary // Change active group, if necessary
if ( m_pModel->m_strActiveGroup != strGroupName ) if ( m_pModel->m_strActiveGroup != groupName ) {
{
// Search for already existing entry // Search for already existing entry
ObjFile::Model::ConstGroupMapIt it = m_pModel->m_Groups.find(strGroupName); ObjFile::Model::ConstGroupMapIt it = m_pModel->m_Groups.find(groupName);
// We are mapping groups into the object structure // We are mapping groups into the object structure
createObject( strGroupName ); createObject( groupName );
// New group name, creating a new entry // New group name, creating a new entry
if (it == m_pModel->m_Groups.end()) if (it == m_pModel->m_Groups.end())
{ {
std::vector<unsigned int> *pFaceIDArray = new std::vector<unsigned int>; std::vector<unsigned int> *pFaceIDArray = new std::vector<unsigned int>;
m_pModel->m_Groups[ strGroupName ] = pFaceIDArray; m_pModel->m_Groups[ groupName ] = pFaceIDArray;
m_pModel->m_pGroupFaceIDs = (pFaceIDArray); m_pModel->m_pGroupFaceIDs = (pFaceIDArray);
} }
else else
{ {
m_pModel->m_pGroupFaceIDs = (*it).second; m_pModel->m_pGroupFaceIDs = (*it).second;
} }
m_pModel->m_strActiveGroup = strGroupName; m_pModel->m_strActiveGroup = groupName;
} }
m_DataIt = skipLine<DataArrayIt>( m_DataIt, m_DataItEnd, m_uiLine ); m_DataIt = skipLine<DataArrayIt>( m_DataIt, m_DataItEnd, m_uiLine );
} }