Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGermano Cavalcante <germano.costa@ig.com.br>2021-03-19 21:10:51 +0300
committerGermano Cavalcante <germano.costa@ig.com.br>2021-03-22 18:46:29 +0300
commit9baf39c8daded5b000d4eacc6c677dbfd3359478 (patch)
treed77bd422c88d234d48f79b0ab66a9b75f6a52e50 /source/blender/editors/include/ED_view3d.h
parentfb1265c5cf24462985cd3debae9205ac78f5d6ab (diff)
Fix T86666: Lasso and Circle select tools selecting objects behind clip_min
Although it works well in most cases, the algorithm to detect if a point is within the limits of the camera does not work well in othographic mode. This commit also adds the option `V3D_PROJ_TEST_CLIP_FAR` (currently unused). Differential Revision: https://developer.blender.org/D10771
Diffstat (limited to 'source/blender/editors/include/ED_view3d.h')
-rw-r--r--source/blender/editors/include/ED_view3d.h16
1 files changed, 9 insertions, 7 deletions
diff --git a/source/blender/editors/include/ED_view3d.h b/source/blender/editors/include/ED_view3d.h
index a63b133cc22..3b8e062ffec 100644
--- a/source/blender/editors/include/ED_view3d.h
+++ b/source/blender/editors/include/ED_view3d.h
@@ -163,14 +163,16 @@ typedef enum {
V3D_PROJ_RET_OK = 0,
/** can't avoid this when in perspective mode, (can't avoid) */
V3D_PROJ_RET_CLIP_NEAR = 1,
+ /** After clip_end. */
+ V3D_PROJ_RET_CLIP_FAR = 2,
/** so close to zero we can't apply a perspective matrix usefully */
- V3D_PROJ_RET_CLIP_ZERO = 2,
+ V3D_PROJ_RET_CLIP_ZERO = 3,
/** bounding box clip - RV3D_CLIPPING */
- V3D_PROJ_RET_CLIP_BB = 3,
+ V3D_PROJ_RET_CLIP_BB = 4,
/** outside window bounds */
- V3D_PROJ_RET_CLIP_WIN = 4,
+ V3D_PROJ_RET_CLIP_WIN = 5,
/** outside range (mainly for short), (can't avoid) */
- V3D_PROJ_RET_OVERFLOW = 5,
+ V3D_PROJ_RET_OVERFLOW = 6,
} eV3DProjStatus;
/* some clipping tests are optional */
@@ -179,14 +181,14 @@ typedef enum {
V3D_PROJ_TEST_CLIP_BB = (1 << 0),
V3D_PROJ_TEST_CLIP_WIN = (1 << 1),
V3D_PROJ_TEST_CLIP_NEAR = (1 << 2),
- V3D_PROJ_TEST_CLIP_ZERO = (1 << 3),
+ V3D_PROJ_TEST_CLIP_FAR = (1 << 3),
+ V3D_PROJ_TEST_CLIP_ZERO = (1 << 4),
} eV3DProjTest;
#define V3D_PROJ_TEST_CLIP_DEFAULT \
(V3D_PROJ_TEST_CLIP_BB | V3D_PROJ_TEST_CLIP_WIN | V3D_PROJ_TEST_CLIP_NEAR)
#define V3D_PROJ_TEST_ALL \
- (V3D_PROJ_TEST_CLIP_BB | V3D_PROJ_TEST_CLIP_WIN | V3D_PROJ_TEST_CLIP_NEAR | \
- V3D_PROJ_TEST_CLIP_ZERO)
+ (V3D_PROJ_TEST_CLIP_DEFAULT | V3D_PROJ_TEST_CLIP_FAR | V3D_PROJ_TEST_CLIP_ZERO)
/* view3d_iterators.c */