diff options
author | Campbell Barton <ideasman42@gmail.com> | 2019-04-30 06:41:21 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2019-04-30 06:41:21 +0300 |
commit | 5d7ee02b17f2afad574609be3450eb8e5c0f18d2 (patch) | |
tree | f649e4603a382b2e96701bf2aacaeb62a5967604 /source/blender/collada/MeshImporter.h | |
parent | d9fb06f87694a45dc6656a32b72b85ba8ade3a34 (diff) |
Cleanup: comments (long lines) in collada
Diffstat (limited to 'source/blender/collada/MeshImporter.h')
-rw-r--r-- | source/blender/collada/MeshImporter.h | 28 |
1 files changed, 15 insertions, 13 deletions
diff --git a/source/blender/collada/MeshImporter.h b/source/blender/collada/MeshImporter.h index 68ab6e73732..9517587013d 100644 --- a/source/blender/collada/MeshImporter.h +++ b/source/blender/collada/MeshImporter.h @@ -47,7 +47,7 @@ extern "C" { #include "DNA_scene_types.h" } -// only for ArmatureImporter to "see" MeshImporter::get_object_by_geom_uid +/* only for ArmatureImporter to "see" MeshImporter::get_object_by_geom_uid */ class MeshImporterBase { public: virtual Object *get_object_by_geom_uid(const COLLADAFW::UniqueId &geom_uid) = 0; @@ -86,22 +86,24 @@ class MeshImporter : public MeshImporterBase { ArmatureImporter *armature_importer; - std::map<std::string, std::string> mesh_geom_map; // needed for correct shape key naming - std::map<COLLADAFW::UniqueId, Mesh *> uid_mesh_map; // geometry unique id-to-mesh map - std::map<COLLADAFW::UniqueId, Object *> uid_object_map; // geom uid-to-object - std::vector<Object *> imported_objects; // list of imported objects + std::map<std::string, std::string> mesh_geom_map; /* needed for correct shape key naming */ + std::map<COLLADAFW::UniqueId, Mesh *> uid_mesh_map; /* geometry unique id-to-mesh map */ + std::map<COLLADAFW::UniqueId, Object *> uid_object_map; /* geom uid-to-object */ + std::vector<Object *> imported_objects; /* list of imported objects */ - // this structure is used to assign material indices to polygons - // it holds a portion of Mesh faces and corresponds to a DAE primitive list (<triangles>, <polylist>, etc.) + /* this structure is used to assign material indices to polygons + * it holds a portion of Mesh faces and corresponds to a DAE primitive list + * (<triangles>, <polylist>, etc.) */ struct Primitive { MPoly *mpoly; unsigned int totpoly; }; typedef std::map<COLLADAFW::MaterialId, std::vector<Primitive>> MaterialIdPrimitiveArrayMap; - std::map<COLLADAFW::UniqueId, MaterialIdPrimitiveArrayMap> - geom_uid_mat_mapping_map; // crazy name! - std::multimap<COLLADAFW::UniqueId, COLLADAFW::UniqueId> - materials_mapped_to_geom; //< materials that have already been mapped to a geometry. A pair of geom uid and mat uid, one geometry can have several materials + /* crazy name! */ + std::map<COLLADAFW::UniqueId, MaterialIdPrimitiveArrayMap> geom_uid_mat_mapping_map; + /* < materials that have already been mapped to a geometry. + * A pair/of geom uid and mat uid, one geometry can have several materials */ + std::multimap<COLLADAFW::UniqueId, COLLADAFW::UniqueId> materials_mapped_to_geom; bool set_poly_indices( MPoly *mpoly, MLoop *mloop, int loop_index, unsigned int *indices, int loop_count); @@ -137,7 +139,7 @@ class MeshImporter : public MeshImporterBase { void allocate_poly_data(COLLADAFW::Mesh *collada_mesh, Mesh *me); - // TODO: import uv set names + /* TODO: import uv set names */ void read_polys(COLLADAFW::Mesh *mesh, Mesh *me); void read_lines(COLLADAFW::Mesh *mesh, Mesh *me); unsigned int get_vertex_count(COLLADAFW::Polygons *mp, int index); @@ -172,7 +174,7 @@ class MeshImporter : public MeshImporterBase { bool isController, std::map<COLLADAFW::UniqueId, Material *> &uid_material_map); - // create a mesh storing a pointer in a map so it can be retrieved later by geometry UID + /* 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); std::string *get_geometry_name(const std::string &mesh_name); }; |