Browse Source

Assimp: Cleanup skeletal mesh code.

  * Use pmap instead of phash_map
  * Remove PT() in create_joint() function header
Mitchell Stokes 10 years ago
parent
commit
45e1f4d25e
2 changed files with 4 additions and 4 deletions
  1. 1 1
      pandatool/src/assimp/assimpLoader.cxx
  2. 3 3
      pandatool/src/assimp/assimpLoader.h

+ 1 - 1
pandatool/src/assimp/assimpLoader.cxx

@@ -418,7 +418,7 @@ load_material(size_t index) {
 //  Description: Creates a CharacterJoint from an aiNode
 ////////////////////////////////////////////////////////////////////
 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;
   LMatrix4 mat(t.a1, t.b1, t.c1, t.d1,

+ 3 - 3
pandatool/src/assimp/assimpLoader.h

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