Obj: fix issue 121 - set group names as the mesh names.

This commit is contained in:
Kim Kulling
2015-07-09 20:15:44 +02:00
parent 891c17ee7b
commit e138a02dd5
4 changed files with 25 additions and 23 deletions

View File

@@ -219,10 +219,10 @@ struct Material
// ------------------------------------------------------------------------------------------------
//! \struct Mesh
//! \brief Data structure to store a mesh
struct Mesh
{
struct Mesh {
static const unsigned int NoMaterial = ~0u;
/// The name for the mesh
std::string m_name;
/// Array with pointer to all stored faces
std::vector<Face*> m_Faces;
/// Assigned material
@@ -235,13 +235,14 @@ struct Mesh
unsigned int m_uiMaterialIndex;
/// True, if normals are stored.
bool m_hasNormals;
/// Constructor
Mesh() :
m_pMaterial(NULL),
m_uiNumIndices(0),
m_uiMaterialIndex( NoMaterial ),
m_hasNormals(false)
{
Mesh( const std::string &name )
: m_name( name )
, m_pMaterial(NULL)
, m_uiNumIndices(0)
, m_uiMaterialIndex( NoMaterial )
, m_hasNormals(false) {
memset(m_uiUVCoordinates, 0, sizeof( unsigned int ) * AI_MAX_NUMBER_OF_TEXTURECOORDS);
}