diff options
author | Nathan Letwory <nathan@letworyinteractive.com> | 2011-01-28 15:56:30 +0300 |
---|---|---|
committer | Nathan Letwory <nathan@letworyinteractive.com> | 2011-01-28 15:56:30 +0300 |
commit | 7769c003853a5238135b763c748ed8db2b77b4d9 (patch) | |
tree | ada4f8cdd3c8d66fdc8af40f5fdf06e6d344516c /source/blender/collada/DocumentImporter.h | |
parent | 037920caffe113c6ab9546ac426965fd5891e58c (diff) |
First step towards having a 2-pass reading of COLLADA .dae files.
Diffstat (limited to 'source/blender/collada/DocumentImporter.h')
-rw-r--r-- | source/blender/collada/DocumentImporter.h | 56 |
1 files changed, 32 insertions, 24 deletions
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<COLLADAFW::UniqueId, Image*> uid_image_map; - std::map<COLLADAFW::UniqueId, Material*> uid_material_map; - std::map<COLLADAFW::UniqueId, Material*> uid_effect_map; - std::map<COLLADAFW::UniqueId, Camera*> uid_camera_map; - std::map<COLLADAFW::UniqueId, Lamp*> uid_lamp_map; - std::map<Material*, TexIndexTextureArrayMap> material_texture_mapping_map; - std::map<COLLADAFW::UniqueId, Object*> object_map; - std::map<COLLADAFW::UniqueId, COLLADAFW::Node*> node_map; - std::vector<const COLLADAFW::VisualScene*> vscenes; - std::vector<Object*> libnode_ob; - - std::map<COLLADAFW::UniqueId, COLLADAFW::Node*> 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<COLLADAFW::UniqueId, Image*> uid_image_map; + std::map<COLLADAFW::UniqueId, Material*> uid_material_map; + std::map<COLLADAFW::UniqueId, Material*> uid_effect_map; + std::map<COLLADAFW::UniqueId, Camera*> uid_camera_map; + std::map<COLLADAFW::UniqueId, Lamp*> uid_lamp_map; + std::map<Material*, TexIndexTextureArrayMap> material_texture_mapping_map; + std::map<COLLADAFW::UniqueId, Object*> object_map; + std::map<COLLADAFW::UniqueId, COLLADAFW::Node*> node_map; + std::vector<const COLLADAFW::VisualScene*> vscenes; + std::vector<Object*> libnode_ob; + + std::map<COLLADAFW::UniqueId, COLLADAFW::Node*> root_map; // find root joint by child joint uid, for bone tree evaluation during resampling }; |