ObjImporter: remove unused code.
parent
e51b7d2a61
commit
ffdca3593b
|
@ -285,8 +285,6 @@ struct Model
|
|||
ObjFile::Material *m_pDefaultMaterial;
|
||||
//! Vector with all generated materials
|
||||
std::vector<std::string> m_MaterialLib;
|
||||
//! Vector with all generated group
|
||||
std::vector<std::string> m_GroupLib;
|
||||
//! Vector with all generated vertices
|
||||
std::vector<aiVector3D> m_Vertices;
|
||||
//! vector with all generated normals
|
||||
|
|
|
@ -692,38 +692,36 @@ int ObjFileParser::getMaterialIndex( const std::string &strMaterialName )
|
|||
|
||||
// -------------------------------------------------------------------
|
||||
// Getter for a group name.
|
||||
void ObjFileParser::getGroupName()
|
||||
{
|
||||
std::string strGroupName;
|
||||
void ObjFileParser::getGroupName() {
|
||||
std::string groupName;
|
||||
|
||||
// here we skip 'g ' from line
|
||||
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 ) ) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Change active group, if necessary
|
||||
if ( m_pModel->m_strActiveGroup != strGroupName )
|
||||
{
|
||||
if ( m_pModel->m_strActiveGroup != groupName ) {
|
||||
// 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
|
||||
createObject( strGroupName );
|
||||
createObject( groupName );
|
||||
|
||||
// New group name, creating a new entry
|
||||
if (it == m_pModel->m_Groups.end())
|
||||
{
|
||||
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);
|
||||
}
|
||||
else
|
||||
{
|
||||
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 );
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue