Assimp: Cleanup skeletal mesh code.

* Use pmap instead of phash_map
  * Remove PT() in create_joint() function header
This commit is contained in:
Mitchell Stokes 2015-10-06 20:41:16 -07:00
parent 43958e820c
commit 45e1f4d25e
2 changed files with 4 additions and 4 deletions

View File

@ -418,7 +418,7 @@ load_material(size_t index) {
// Description: Creates a CharacterJoint from an aiNode // Description: Creates a CharacterJoint from an aiNode
//////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////
void AssimpLoader:: void AssimpLoader::
create_joint(PT(Character) character, PT(CharacterJointBundle) bundle, PartGroup *parent, const aiNode &node) create_joint(Character *character, CharacterJointBundle *bundle, PartGroup *parent, const aiNode &node)
{ {
const aiMatrix4x4 &t = node.mTransformation; const aiMatrix4x4 &t = node.mTransformation;
LMatrix4 mat(t.a1, t.b1, t.c1, t.d1, LMatrix4 mat(t.a1, t.b1, t.c1, t.d1,

View File

@ -33,8 +33,8 @@ struct char_cmp {
return strcmp(a,b) < 0; return strcmp(a,b) < 0;
} }
}; };
typedef phash_map<const char *, const aiNode *, char_cmp> BoneMap; typedef pmap<const char *, const aiNode *, char_cmp> BoneMap;
typedef phash_map<const char *, PT(Character), char_cmp> CharacterMap; typedef pmap<const char *, PT(Character), char_cmp> CharacterMap;
//////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////
// Class : AssimpLoader // Class : AssimpLoader
@ -75,7 +75,7 @@ private:
void load_texture(size_t index); void load_texture(size_t index);
void load_texture_stage(const aiMaterial &mat, const aiTextureType &ttype, CPT(TextureAttrib) &tattr); void load_texture_stage(const aiMaterial &mat, const aiTextureType &ttype, CPT(TextureAttrib) &tattr);
void load_material(size_t index); void load_material(size_t index);
void create_joint(PT(Character) character, PT(CharacterJointBundle) bundle, PartGroup *parent, const aiNode &node); void create_joint(Character *character, CharacterJointBundle *bundle, PartGroup *parent, const aiNode &node);
void load_mesh(size_t index); void load_mesh(size_t index);
void load_node(const aiNode &node, PandaNode *parent); void load_node(const aiNode &node, PandaNode *parent);
void load_light(const aiLight &light); void load_light(const aiLight &light);