diff options
author | Campbell Barton <ideasman42@gmail.com> | 2020-10-10 10:19:55 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2020-10-10 14:04:51 +0300 |
commit | 2abfcebb0eb7989e3d1e7d03f37ecf5c088210af (patch) | |
tree | e7a1ad5912b4661d4ece743f4f7fd86e6bf4d3c4 /source/blender/io/collada/SkinInfo.h | |
parent | c735aca42e9f5961fec7e5d5fc196b5bd6b85f56 (diff) |
Cleanup: use C comments for descriptive text
Follow our code style guide by using C-comments for text descriptions.
Diffstat (limited to 'source/blender/io/collada/SkinInfo.h')
-rw-r--r-- | source/blender/io/collada/SkinInfo.h | 42 |
1 files changed, 21 insertions, 21 deletions
diff --git a/source/blender/io/collada/SkinInfo.h b/source/blender/io/collada/SkinInfo.h index 3b94e403b6d..7ce66b22a5f 100644 --- a/source/blender/io/collada/SkinInfo.h +++ b/source/blender/io/collada/SkinInfo.h @@ -35,28 +35,28 @@ #include "TransformReader.h" #include "collada_internal.h" -// This is used to store data passed in write_controller_data. -// Arrays from COLLADAFW::SkinControllerData lose ownership, so do this class members -// so that arrays don't get freed until we free them explicitly. +/* This is used to store data passed in write_controller_data. + * Arrays from COLLADAFW::SkinControllerData lose ownership, so do this class members + * so that arrays don't get freed until we free them explicitly. */ class SkinInfo { private: - // to build armature bones from inverse bind matrices + /* to build armature bones from inverse bind matrices */ struct JointData { - float inv_bind_mat[4][4]; // joint inverse bind matrix - COLLADAFW::UniqueId joint_uid; // joint node UID - // Object *ob_arm; // armature object + float inv_bind_mat[4][4]; /* joint inverse bind matrix */ + COLLADAFW::UniqueId joint_uid; /* joint node UID */ + // Object *ob_arm; /* armature object */ }; float bind_shape_matrix[4][4]; - // data from COLLADAFW::SkinControllerData, each array should be freed + /* data from COLLADAFW::SkinControllerData, each array should be freed */ COLLADAFW::UIntValuesArray joints_per_vertex; COLLADAFW::UIntValuesArray weight_indices; COLLADAFW::IntValuesArray joint_indices; - // COLLADAFW::FloatOrDoubleArray weights; + /* COLLADAFW::FloatOrDoubleArray weights; */ std::vector<float> weights; - std::vector<JointData> joint_data; // index to this vector is joint index + std::vector<JointData> joint_data; /* index to this vector is joint index */ UnitConverter *unit_converter; @@ -69,10 +69,10 @@ class SkinInfo { SkinInfo(const SkinInfo &skin); SkinInfo(UnitConverter *conv); - // nobody owns the data after this, so it should be freed manually with releaseMemory + /* nobody owns the data after this, so it should be freed manually with releaseMemory */ template<typename T> void transfer_array_data(T &src, T &dest); - // when src is const we cannot src.yieldOwnerShip, this is used by copy constructor + /* when src is const we cannot src.yieldOwnerShip, this is used by copy constructor */ void transfer_int_array_data_const(const COLLADAFW::IntValuesArray &src, COLLADAFW::IntValuesArray &dest); @@ -83,14 +83,14 @@ class SkinInfo { void free(); - // using inverse bind matrices to construct armature - // it is safe to invert them to get the original matrices - // because if they are inverse matrices, they can be inverted + /* using inverse bind matrices to construct armature + * it is safe to invert them to get the original matrices + * because if they are inverse matrices, they can be inverted */ void add_joint(const COLLADABU::Math::Matrix4 &matrix); void set_controller(const COLLADAFW::SkinController *co); - // called from write_controller + /* called from write_controller */ Object *create_armature(Main *bmain, Scene *scene, ViewLayer *view_layer); Object *set_armature(Object *ob_arm); @@ -101,11 +101,11 @@ class SkinInfo { const COLLADAFW::UniqueId &get_controller_uid(); - // check if this skin controller references a joint or any descendant of it - // - // some nodes may not be referenced by SkinController, - // in this case to determine if the node belongs to this armature, - // we need to search down the tree + /* check if this skin controller references a joint or any descendant of it + * + * some nodes may not be referenced by SkinController, + * in this case to determine if the node belongs to this armature, + * we need to search down the tree */ bool uses_joint_or_descendant(COLLADAFW::Node *node); void link_armature(bContext *C, |