update:
- add assert test in obj-import - fix material token in Obj. Signed-off-by: Kim Kulling <kim.kulling@googlemail.com>pull/394/head
parent
e6eeab8c84
commit
b359deb7fd
|
@ -284,7 +284,8 @@ aiMesh *ObjFileImporter::createTopology( const ObjFile::Model* pModel, const Obj
|
|||
aiMesh* pMesh = new aiMesh;
|
||||
for (size_t index = 0; index < pObjMesh->m_Faces.size(); index++)
|
||||
{
|
||||
ObjFile::Face* const inp = pObjMesh->m_Faces[ index ];
|
||||
ObjFile::Face *const inp = pObjMesh->m_Faces[ index ];
|
||||
ai_assert( NULL != inp );
|
||||
|
||||
if (inp->m_PrimitiveType == aiPrimitiveType_LINE) {
|
||||
pMesh->mNumFaces += inp->m_pVertices->size() - 1;
|
||||
|
@ -302,7 +303,7 @@ aiMesh *ObjFileImporter::createTopology( const ObjFile::Model* pModel, const Obj
|
|||
}
|
||||
}
|
||||
|
||||
unsigned int uiIdxCount = 0u;
|
||||
unsigned int uiIdxCount( 0u );
|
||||
if ( pMesh->mNumFaces > 0 )
|
||||
{
|
||||
pMesh->mFaces = new aiFace[ pMesh->mNumFaces ];
|
||||
|
@ -311,7 +312,7 @@ aiMesh *ObjFileImporter::createTopology( const ObjFile::Model* pModel, const Obj
|
|||
pMesh->mMaterialIndex = pObjMesh->m_uiMaterialIndex;
|
||||
}
|
||||
|
||||
unsigned int outIndex = 0;
|
||||
unsigned int outIndex( 0 );
|
||||
|
||||
// Copy all data from all stored meshes
|
||||
for (size_t index = 0; index < pObjMesh->m_Faces.size(); index++)
|
||||
|
|
|
@ -50,9 +50,9 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
namespace Assimp {
|
||||
|
||||
// Material specific token
|
||||
static const std::string DiffuseTexture = "map_kd";
|
||||
static const std::string AmbientTexture = "map_ka";
|
||||
static const std::string SpecularTexture = "map_ks";
|
||||
static const std::string DiffuseTexture = "map_Kd";
|
||||
static const std::string AmbientTexture = "map_Ka";
|
||||
static const std::string SpecularTexture = "map_Ks";
|
||||
static const std::string OpacityTexture = "map_d";
|
||||
static const std::string EmmissiveTexture = "map_emissive";
|
||||
static const std::string BumpTexture1 = "map_bump";
|
||||
|
|
Loading…
Reference in New Issue