From 7769c003853a5238135b763c748ed8db2b77b4d9 Mon Sep 17 00:00:00 2001 From: Nathan Letwory Date: Fri, 28 Jan 2011 12:56:30 +0000 Subject: First step towards having a 2-pass reading of COLLADA .dae files. --- source/blender/collada/DocumentImporter.h | 56 ++++++++++++++++++------------- 1 file changed, 32 insertions(+), 24 deletions(-) (limited to 'source/blender/collada/DocumentImporter.h') diff --git a/source/blender/collada/DocumentImporter.h b/source/blender/collada/DocumentImporter.h index a2c5e664623..114c2839d49 100644 --- a/source/blender/collada/DocumentImporter.h +++ b/source/blender/collada/DocumentImporter.h @@ -1,4 +1,4 @@ -/** +/* * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** @@ -46,32 +46,15 @@ struct Main; struct bContext; +/** Importer class. */ class DocumentImporter : COLLADAFW::IWriter { - private: - - std::string mFilename; - - bContext *mContext; - - UnitConverter unit_converter; - ArmatureImporter armature_importer; - MeshImporter mesh_importer; - AnimationImporter anim_importer; - - std::map uid_image_map; - std::map uid_material_map; - std::map uid_effect_map; - std::map uid_camera_map; - std::map uid_lamp_map; - std::map material_texture_mapping_map; - std::map object_map; - std::map node_map; - std::vector vscenes; - std::vector libnode_ob; - - std::map root_map; // find root joint by child joint uid, for bone tree evaluation during resampling public: + //! Enumeration to keep denote the stage of import + enum ImportStage { + General, //!< First pass to collect all data except controller + Controller, //!< Second pass to collect controller data + }; /** Constructor */ DocumentImporter(bContext *C, const char *filename); @@ -134,6 +117,31 @@ class DocumentImporter : COLLADAFW::IWriter bool writeKinematicsScene(const COLLADAFW::KinematicsScene*); + private: + + /** Current import stage we're in. */ + ImportStage mImportStage; + std::string mFilename; + + bContext *mContext; + + UnitConverter unit_converter; + ArmatureImporter armature_importer; + MeshImporter mesh_importer; + AnimationImporter anim_importer; + + std::map uid_image_map; + std::map uid_material_map; + std::map uid_effect_map; + std::map uid_camera_map; + std::map uid_lamp_map; + std::map material_texture_mapping_map; + std::map object_map; + std::map node_map; + std::vector vscenes; + std::vector libnode_ob; + + std::map root_map; // find root joint by child joint uid, for bone tree evaluation during resampling }; -- cgit v1.2.3