diff options
author | Campbell Barton <ideasman42@gmail.com> | 2017-06-18 02:08:30 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2017-06-18 02:08:30 +0300 |
commit | cf7447dacbc3c5c0d5fb80e3b082d745e4955e12 (patch) | |
tree | d7cbe2e8ee2a35e0e6379bff9e979386dd3d8861 /source/blender | |
parent | f860369ebf58f1ce683a587be136e2bf7dd08372 (diff) |
Manipulator: comments
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/windowmanager/manipulators/WM_manipulator_types.h | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/source/blender/windowmanager/manipulators/WM_manipulator_types.h b/source/blender/windowmanager/manipulators/WM_manipulator_types.h index eb8641fcd7e..6fd9f38671c 100644 --- a/source/blender/windowmanager/manipulators/WM_manipulator_types.h +++ b/source/blender/windowmanager/manipulators/WM_manipulator_types.h @@ -61,7 +61,8 @@ struct wmManipulator { /* While we don't have a real type, use this to put type-like vars. */ const struct wmManipulatorType *type; - /* Overrides 'type->handler' when set. */ + /* Overrides 'type->modal' when set. + * Note that this is a workaround, remove if we can. */ wmManipulatorFnModal custom_modal; /* pointer back to group this manipulator is in (just for quick access) */ @@ -72,9 +73,17 @@ struct wmManipulator { int flag; /* flags that influence the behavior or how the manipulators are drawn */ short state; /* state flags (active, highlighted, selected) */ + /* Optional ID for highlighting different parts of this manipulator. */ int highlight_part; - /* center of manipulator in space, 2d or 3d */ + /* Transformation of the manipulator in 2d or 3d space. + * - Matrix axis are expected to be unit length (scale is applied after). + * - Behavior when axis aren't orthogonal depends on each manipulator. + * - Typically the +Z is the primary axis for manipulators to use. + * - 'matrix[3]' must be used for location, + * besides this it's up to the manipulators internal code how the + * rotation components are used for drawing and interaction. + */ float matrix[4][4]; /* custom offset from origin */ float matrix_offset[4][4]; @@ -194,7 +203,11 @@ typedef struct wmManipulatorType { wmManipulatorFnPropertyUpdate property_update; /* Returns the final transformation which may be different from the 'matrix', - * depending on the manipulator. */ + * depending on the manipulator. + * Notes: + * - Scale isn't applied (wmManipulator.scale/user_scale). + * - Offset isn't applied (wmManipulator.matrix_offset). + */ wmManipulatorFnMatrixWorldGet matrix_world_get; /* activate a manipulator state when the user clicks on it */ |