diff options
author | Alexander Gavrilov <angavrilov@gmail.com> | 2018-07-08 13:47:26 +0300 |
---|---|---|
committer | Alexander Gavrilov <angavrilov@gmail.com> | 2018-10-01 15:47:03 +0300 |
commit | e38a0b3748683a35601c256053f716ad8b57002f (patch) | |
tree | 940e008c1259316cf58921538b96b208fce84da0 /source/blender/makesdna/DNA_constraint_types.h | |
parent | be0e58d980d963c60869c412ada86641baaa2e48 (diff) |
Shrinkwrap Constraint: implement projection features from the modifier.
Allow raycasting in two directions and culling front or back faces.
Also implement a new Invert Cull option in both constraint and
modifier that can be used to aim for faces aligned with the project
axis direction when raycasting both ways.
Reviewers: mont29
Differential Revision: https://developer.blender.org/D3737
Diffstat (limited to 'source/blender/makesdna/DNA_constraint_types.h')
-rw-r--r-- | source/blender/makesdna/DNA_constraint_types.h | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/source/blender/makesdna/DNA_constraint_types.h b/source/blender/makesdna/DNA_constraint_types.h index e7d9e1fa7dd..a92899deaa8 100644 --- a/source/blender/makesdna/DNA_constraint_types.h +++ b/source/blender/makesdna/DNA_constraint_types.h @@ -429,7 +429,8 @@ typedef struct bShrinkwrapConstraint { char projAxisSpace; /* space to project axis in */ float projLimit; /* distance to search */ char shrinkMode; /* inside/outside/on surface (see MOD shrinkwrap) */ - char pad[3]; + char flag; /* options */ + char pad[2]; } bShrinkwrapConstraint; /* Follow Track constraints */ @@ -635,6 +636,21 @@ typedef enum eTrackToAxis_Modes { TRACK_nZ = 5 } eTrackToAxis_Modes; +/* Shrinkwrap flags */ +typedef enum eShrinkwrap_Flags { + /* Also raycast in the opposite direction. */ + CON_SHRINKWRAP_PROJECT_OPPOSITE = (1 << 0), + /* Invert the cull mode when projecting opposite. */ + CON_SHRINKWRAP_PROJECT_INVERT_CULL = (1 << 1), + + /* Ignore front faces in project; same value as MOD_SHRINKWRAP_CULL_TARGET_FRONTFACE */ + CON_SHRINKWRAP_PROJECT_CULL_FRONTFACE = (1 << 3), + /* Ignore back faces in project; same value as MOD_SHRINKWRAP_CULL_TARGET_BACKFACE */ + CON_SHRINKWRAP_PROJECT_CULL_BACKFACE = (1 << 4), +} eShrinkwrap_Flags; + +#define CON_SHRINKWRAP_PROJECT_CULL_MASK (CON_SHRINKWRAP_PROJECT_CULL_FRONTFACE | CON_SHRINKWRAP_PROJECT_CULL_BACKFACE) + /* FollowPath flags */ typedef enum eFollowPath_Flags { FOLLOWPATH_FOLLOW = (1<<0), |