diff options
author | Campbell Barton <ideasman42@gmail.com> | 2019-04-17 07:17:24 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2019-04-17 07:21:24 +0300 |
commit | e12c08e8d170b7ca40f204a5b0423c23a9fbc2c1 (patch) | |
tree | 8cf3453d12edb177a218ef8009357518ec6cab6a /source/blender/collada/DocumentImporter.h | |
parent | b3dabc200a4b0399ec6b81f2ff2730d07b44fcaa (diff) |
ClangFormat: apply to source, most of intern
Apply clang format as proposed in T53211.
For details on usage and instructions for migrating branches
without conflicts, see:
https://wiki.blender.org/wiki/Tools/ClangFormat
Diffstat (limited to 'source/blender/collada/DocumentImporter.h')
-rw-r--r-- | source/blender/collada/DocumentImporter.h | 172 |
1 files changed, 84 insertions, 88 deletions
diff --git a/source/blender/collada/DocumentImporter.h b/source/blender/collada/DocumentImporter.h index 1ba1a9c5388..b48ddaaa827 100644 --- a/source/blender/collada/DocumentImporter.h +++ b/source/blender/collada/DocumentImporter.h @@ -32,7 +32,6 @@ #include "COLLADAFWSkinController.h" #include "COLLADAFWEffectCommon.h" - #include "BKE_object.h" #include "BKE_constraint.h" @@ -46,130 +45,127 @@ struct bContext; /** Importer class. */ -class DocumentImporter : COLLADAFW::IWriter -{ -public: - //! Enumeration to denote the stage of import - enum ImportStage { - Fetching_Scene_data, /* First pass to collect all data except controller */ - Fetching_Controller_data, /* Second pass to collect controller data */ - }; - /** Constructor */ - DocumentImporter(bContext *C, const ImportSettings *import_settings); +class DocumentImporter : COLLADAFW::IWriter { + public: + //! Enumeration to denote the stage of import + enum ImportStage { + Fetching_Scene_data, /* First pass to collect all data except controller */ + Fetching_Controller_data, /* Second pass to collect controller data */ + }; + /** Constructor */ + DocumentImporter(bContext *C, const ImportSettings *import_settings); - /** Destructor */ - ~DocumentImporter(); + /** Destructor */ + ~DocumentImporter(); - /** Function called by blender UI */ - bool import(); + /** Function called by blender UI */ + bool import(); - /** these should not be here */ - Object* create_camera_object(COLLADAFW::InstanceCamera*, Scene*); - Object* create_light_object(COLLADAFW::InstanceLight*, Scene*); - Object* create_instance_node(Object*, COLLADAFW::Node*, COLLADAFW::Node*, Scene*, bool); - void create_constraints(ExtraTags *et, Object *ob); - std::vector<Object *> *write_node(COLLADAFW::Node*, COLLADAFW::Node*, Scene*, Object*, bool); - void write_profile_COMMON(COLLADAFW::EffectCommon*, Material*); + /** these should not be here */ + Object *create_camera_object(COLLADAFW::InstanceCamera *, Scene *); + Object *create_light_object(COLLADAFW::InstanceLight *, Scene *); + Object *create_instance_node(Object *, COLLADAFW::Node *, COLLADAFW::Node *, Scene *, bool); + void create_constraints(ExtraTags *et, Object *ob); + std::vector<Object *> *write_node(COLLADAFW::Node *, COLLADAFW::Node *, Scene *, Object *, bool); + void write_profile_COMMON(COLLADAFW::EffectCommon *, Material *); - void translate_anim_recursive(COLLADAFW::Node*, COLLADAFW::Node*, Object*); + void translate_anim_recursive(COLLADAFW::Node *, COLLADAFW::Node *, Object *); - /** - * This method will be called if an error in the loading process occurred and the loader cannot - * continue to load. The writer should undo all operations that have been performed. - * \param errorMessage: A message containing information about the error that occurred. - */ - void cancel(const COLLADAFW::String& errorMessage); + /** + * This method will be called if an error in the loading process occurred and the loader cannot + * continue to load. The writer should undo all operations that have been performed. + * \param errorMessage: A message containing information about the error that occurred. + */ + void cancel(const COLLADAFW::String &errorMessage); - /** This is the method called. The writer hast to prepare to receive data.*/ - void start(); + /** This is the method called. The writer hast to prepare to receive data.*/ + void start(); - /** This method is called after the last write* method. No other methods will be called after this.*/ - void finish(); + /** This method is called after the last write* method. No other methods will be called after this.*/ + void finish(); - bool writeGlobalAsset(const COLLADAFW::FileInfo*); - std::string get_import_version(const COLLADAFW::FileInfo *asset); + bool writeGlobalAsset(const COLLADAFW::FileInfo *); + std::string get_import_version(const COLLADAFW::FileInfo *asset); - bool writeScene(const COLLADAFW::Scene*); + bool writeScene(const COLLADAFW::Scene *); - bool writeVisualScene(const COLLADAFW::VisualScene*); + bool writeVisualScene(const COLLADAFW::VisualScene *); - bool writeLibraryNodes(const COLLADAFW::LibraryNodes*); + bool writeLibraryNodes(const COLLADAFW::LibraryNodes *); - bool writeAnimation(const COLLADAFW::Animation*); + bool writeAnimation(const COLLADAFW::Animation *); - bool writeAnimationList(const COLLADAFW::AnimationList*); + bool writeAnimationList(const COLLADAFW::AnimationList *); #if WITH_OPENCOLLADA_ANIMATION_CLIP - // Please enable this when building with Collada 1.6.65 or newer (also in DocumentImporter.cpp) - bool writeAnimationClip(const COLLADAFW::AnimationClip *animationClip); + // Please enable this when building with Collada 1.6.65 or newer (also in DocumentImporter.cpp) + bool writeAnimationClip(const COLLADAFW::AnimationClip *animationClip); #endif - bool writeGeometry(const COLLADAFW::Geometry*); - - bool writeMaterial(const COLLADAFW::Material*); - - bool writeEffect(const COLLADAFW::Effect*); - - bool writeCamera(const COLLADAFW::Camera*); + bool writeGeometry(const COLLADAFW::Geometry *); - bool writeImage(const COLLADAFW::Image*); + bool writeMaterial(const COLLADAFW::Material *); - bool writeLight(const COLLADAFW::Light*); + bool writeEffect(const COLLADAFW::Effect *); - bool writeSkinControllerData(const COLLADAFW::SkinControllerData*); + bool writeCamera(const COLLADAFW::Camera *); - bool writeController(const COLLADAFW::Controller*); + bool writeImage(const COLLADAFW::Image *); - bool writeFormulas(const COLLADAFW::Formulas*); + bool writeLight(const COLLADAFW::Light *); - bool writeKinematicsScene(const COLLADAFW::KinematicsScene*); + bool writeSkinControllerData(const COLLADAFW::SkinControllerData *); - /** Add element and data for UniqueId */ - bool addExtraTags(const COLLADAFW::UniqueId &uid, ExtraTags *extra_tags); - /** Get an extisting ExtraTags for uid */ - ExtraTags* getExtraTags(const COLLADAFW::UniqueId &uid); + bool writeController(const COLLADAFW::Controller *); - bool is_armature(COLLADAFW::Node * node); + bool writeFormulas(const COLLADAFW::Formulas *); + bool writeKinematicsScene(const COLLADAFW::KinematicsScene *); + /** Add element and data for UniqueId */ + bool addExtraTags(const COLLADAFW::UniqueId &uid, ExtraTags *extra_tags); + /** Get an extisting ExtraTags for uid */ + ExtraTags *getExtraTags(const COLLADAFW::UniqueId &uid); -private: - const ImportSettings *import_settings; + bool is_armature(COLLADAFW::Node *node); - /** Current import stage we're in. */ - ImportStage mImportStage; + private: + const ImportSettings *import_settings; - bContext *mContext; - ViewLayer *view_layer; + /** Current import stage we're in. */ + ImportStage mImportStage; - UnitConverter unit_converter; - ArmatureImporter armature_importer; - MeshImporter mesh_importer; - AnimationImporter anim_importer; + bContext *mContext; + ViewLayer *view_layer; - /** TagsMap typedef for uid_tags_map. */ - typedef std::map<std::string, ExtraTags*> TagsMap; - /** Tags map of unique id as a string and ExtraTags instance. */ - TagsMap uid_tags_map; + UnitConverter unit_converter; + ArmatureImporter armature_importer; + MeshImporter mesh_importer; + AnimationImporter anim_importer; - UidImageMap 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, Light*> uid_light_map; - std::map<Material*, TexIndexTextureArrayMap> material_texture_mapping_map; - std::multimap<COLLADAFW::UniqueId, Object*> object_map; - std::map<COLLADAFW::UniqueId, COLLADAFW::Node*> node_map; - std::vector<const COLLADAFW::VisualScene*> vscenes; - std::vector<Object*> libnode_ob; + /** TagsMap typedef for uid_tags_map. */ + typedef std::map<std::string, ExtraTags *> TagsMap; + /** Tags map of unique id as a string and ExtraTags instance. */ + TagsMap uid_tags_map; - std::map<COLLADAFW::UniqueId, COLLADAFW::Node*> root_map; // find root joint by child joint uid, for bone tree evaluation during resampling - std::map<COLLADAFW::UniqueId, const COLLADAFW::Object*> FW_object_map; + UidImageMap 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, Light *> uid_light_map; + std::map<Material *, TexIndexTextureArrayMap> material_texture_mapping_map; + std::multimap<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::string import_from_version; + std::map<COLLADAFW::UniqueId, COLLADAFW::Node *> + root_map; // find root joint by child joint uid, for bone tree evaluation during resampling + std::map<COLLADAFW::UniqueId, const COLLADAFW::Object *> FW_object_map; - void report_unknown_reference(const COLLADAFW::Node &node, const std::string object_type); + std::string import_from_version; + void report_unknown_reference(const COLLADAFW::Node &node, const std::string object_type); }; #endif |