diff options
author | Gaia Clary <gaia.clary@machinimatrix.org> | 2013-01-21 17:45:49 +0400 |
---|---|---|
committer | Gaia Clary <gaia.clary@machinimatrix.org> | 2013-01-21 17:45:49 +0400 |
commit | c263753d1770b5b812ea0e5c38174fa296492e2f (patch) | |
tree | fecb2a493596b9078e36c43d723d527e172a9546 /source/blender/collada/MeshImporter.h | |
parent | 7d286d9a8096438e7a197a2a3f365fbb9df6a0b1 (diff) |
Added gsoc-2012 collada improvements from bratwurst branch
Diffstat (limited to 'source/blender/collada/MeshImporter.h')
-rw-r--r-- | source/blender/collada/MeshImporter.h | 29 |
1 files changed, 16 insertions, 13 deletions
diff --git a/source/blender/collada/MeshImporter.h b/source/blender/collada/MeshImporter.h index 746b0738108..946f9ff99e3 100644 --- a/source/blender/collada/MeshImporter.h +++ b/source/blender/collada/MeshImporter.h @@ -59,6 +59,7 @@ class MeshImporterBase { public: virtual Object *get_object_by_geom_uid(const COLLADAFW::UniqueId& geom_uid) = 0; + virtual Mesh *get_mesh_by_geom_uid(const COLLADAFW::UniqueId& mesh_uid) = 0; }; class UVDataWrapper @@ -106,10 +107,10 @@ private: #endif void set_face_uv(MTFace *mtface, UVDataWrapper &uvs, - COLLADAFW::IndexList& index_list, unsigned int *tris_indices); + COLLADAFW::IndexList& index_list, unsigned int *tris_indices); void set_face_uv(MTFace *mtface, UVDataWrapper &uvs, - COLLADAFW::IndexList& index_list, int index, bool quad); + COLLADAFW::IndexList& index_list, int index, bool quad); #ifdef COLLADA_DEBUG void print_index_list(COLLADAFW::IndexList& index_list); @@ -132,7 +133,7 @@ private: CustomData create_edge_custom_data(EdgeHash *eh); - void allocate_face_data(COLLADAFW::Mesh *mesh, Mesh *me, int new_tris); + void allocate_face_data(COLLADAFW::Mesh *mesh, Mesh *me, int new_tris); // TODO: import uv set names void read_faces(COLLADAFW::Mesh *mesh, Mesh *me, int new_tris); @@ -151,24 +152,26 @@ public: void bmeshConversion(); virtual Object *get_object_by_geom_uid(const COLLADAFW::UniqueId& geom_uid); + + virtual Mesh *get_mesh_by_geom_uid(const COLLADAFW::UniqueId& geom_uid); MTex *assign_textures_to_uvlayer(COLLADAFW::TextureCoordinateBinding &ctexture, - Mesh *me, TexIndexTextureArrayMap& texindex_texarray_map, - MTex *color_texture); + Mesh *me, TexIndexTextureArrayMap& texindex_texarray_map, + MTex *color_texture); - void optimize_material_assignments(); + void optimize_material_assignements(); MTFace *assign_material_to_geom(COLLADAFW::MaterialBinding cmaterial, - std::map<COLLADAFW::UniqueId, Material*>& uid_material_map, - Object *ob, const COLLADAFW::UniqueId *geom_uid, - MTex **color_texture, char *layername, MTFace *texture_face, - std::map<Material*, TexIndexTextureArrayMap>& material_texture_mapping_map, short mat_index); + std::map<COLLADAFW::UniqueId, Material*>& uid_material_map, + Object *ob, const COLLADAFW::UniqueId *geom_uid, + MTex **color_texture, char *layername, MTFace *texture_face, + std::map<Material*, TexIndexTextureArrayMap>& material_texture_mapping_map, short mat_index); Object *create_mesh_object(COLLADAFW::Node *node, COLLADAFW::InstanceGeometry *geom, - bool isController, - std::map<COLLADAFW::UniqueId, Material*>& uid_material_map, - std::map<Material*, TexIndexTextureArrayMap>& material_texture_mapping_map); + bool isController, + std::map<COLLADAFW::UniqueId, Material*>& uid_material_map, + std::map<Material*, TexIndexTextureArrayMap>& material_texture_mapping_map); // create a mesh storing a pointer in a map so it can be retrieved later by geometry UID bool write_geometry(const COLLADAFW::Geometry* geom); |