diff options
author | Campbell Barton <ideasman42@gmail.com> | 2021-06-29 13:13:55 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2021-06-29 13:23:30 +0300 |
commit | f2c52aa0e1a5a6905849daa299ab907e60cab983 (patch) | |
tree | 66a0a61f511929ada3cfd08668a38980724e4a7e /source/blender/editors/transform/transform.h | |
parent | 855f7fee63c4bc57d5e154ced0e7e51bf315ea32 (diff) |
Cleanup: use 'const' arguments in transform calculation
Use const arguments to simplify further optimizations.
Transforming elements shouldn't need to change their containers
data-structures.
ElementResize for grease pencil stroke thickness was
modifying TransInfo.num & TransInfo.values_final.
Now copies are operated on to preserve const correctness although
it's worth investigating if this can be avoided altogether.
Diffstat (limited to 'source/blender/editors/transform/transform.h')
-rw-r--r-- | source/blender/editors/transform/transform.h | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/source/blender/editors/transform/transform.h b/source/blender/editors/transform/transform.h index 2df0d86d02b..4f97c3b6713 100644 --- a/source/blender/editors/transform/transform.h +++ b/source/blender/editors/transform/transform.h @@ -356,22 +356,22 @@ typedef struct TransCon { /** Apply function pointer for linear vectorial transformation * The last three parameters are pointers to the in/out/printable vectors. */ - void (*applyVec)(struct TransInfo *t, - struct TransDataContainer *tc, + void (*applyVec)(const struct TransInfo *t, + const struct TransDataContainer *tc, struct TransData *td, const float in[3], - float out[3]); + float r_out[3]); /** Apply function pointer for size transformation. */ - void (*applySize)(struct TransInfo *t, - struct TransDataContainer *tc, + void (*applySize)(const struct TransInfo *t, + const struct TransDataContainer *tc, struct TransData *td, - float smat[3][3]); + float r_smat[3][3]); /** Apply function pointer for rotation transformation */ - void (*applyRot)(struct TransInfo *t, - struct TransDataContainer *tc, + void (*applyRot)(const struct TransInfo *t, + const struct TransDataContainer *tc, struct TransData *td, - float vec[3], - float *angle); + float r_axis[3], + float *r_angle); } TransCon; typedef struct MouseInput { |