diff options
Diffstat (limited to 'source/blender/editors/include/ED_view3d.h')
-rw-r--r-- | source/blender/editors/include/ED_view3d.h | 43 |
1 files changed, 28 insertions, 15 deletions
diff --git a/source/blender/editors/include/ED_view3d.h b/source/blender/editors/include/ED_view3d.h index 3b8e062ffec..52d69d12253 100644 --- a/source/blender/editors/include/ED_view3d.h +++ b/source/blender/editors/include/ED_view3d.h @@ -144,15 +144,28 @@ bool ED_view3d_camera_to_view_selected(struct Main *bmain, void ED_view3d_lastview_store(struct RegionView3D *rv3d); /* Depth buffer */ -void ED_view3d_depth_update(struct ARegion *region); -float ED_view3d_depth_read_cached(const struct ViewContext *vc, const int mval[2]); +typedef enum { + V3D_DEPTH_NO_GPENCIL = 0, + V3D_DEPTH_GPENCIL_ONLY, + V3D_DEPTH_OBJECT_ONLY, +} eV3DDepthOverrideMode; +void ED_view3d_depth_override(struct Depsgraph *depsgraph, + struct ARegion *region, + struct View3D *v3d, + struct Object *obact, + eV3DDepthOverrideMode mode, + bool update_cache); +bool ED_view3d_depth_read_cached(const ViewDepths *vd, + const int mval[2], + int margin, + float *r_depth); bool ED_view3d_depth_read_cached_normal(const ViewContext *vc, const int mval[2], float r_normal[3]); -bool ED_view3d_depth_unproject(const struct ARegion *region, - const int mval[2], - const double depth, - float r_location_world[3]); +bool ED_view3d_depth_unproject_v3(const struct ARegion *region, + const int mval[2], + const double depth, + float r_location_world[3]); void ED_view3d_depth_tag_update(struct RegionView3D *rv3d); /* Projection */ @@ -397,8 +410,13 @@ void ED_view3d_ob_project_mat_get_from_obmat(const struct RegionView3D *rv3d, const float obmat[4][4], float r_pmat[4][4]); -void ED_view3d_project(const struct ARegion *region, const float world[3], float r_region_co[3]); -bool ED_view3d_unproject( +void ED_view3d_project_v3(const struct ARegion *region, + const float world[3], + float r_region_co[3]); +void ED_view3d_project_v2(const struct ARegion *region, + const float world[3], + float r_region_co[2]); +bool ED_view3d_unproject_v3( const struct ARegion *region, float regionx, float regiony, float regionz, float world[3]); /* end */ @@ -441,7 +459,7 @@ bool ED_view3d_calc_render_border(const struct Scene *scene, struct ARegion *region, struct rcti *rect); -void ED_view3d_clipping_calc_from_boundbox(float clip[6][4], +void ED_view3d_clipping_calc_from_boundbox(float clip[4][4], const struct BoundBox *clipbb, const bool is_flip); void ED_view3d_clipping_calc(struct BoundBox *bb, @@ -481,11 +499,6 @@ bool ED_view3d_autodist(struct Depsgraph *depsgraph, const bool alphaoverride, const float fallback_depth_pt[3]); -/* Only draw so #ED_view3d_autodist_simple can be called many times after. */ -void ED_view3d_autodist_init(struct Depsgraph *depsgraph, - struct ARegion *region, - struct View3D *v3d, - int mode); bool ED_view3d_autodist_simple(struct ARegion *region, const int mval[2], float mouse_worldloc[3], @@ -682,7 +695,7 @@ float ED_view3d_grid_scale(const struct Scene *scene, void ED_view3d_grid_steps(const struct Scene *scene, struct View3D *v3d, struct RegionView3D *rv3d, - float *r_grid_steps); + float r_grid_steps[8]); float ED_view3d_grid_view_scale(struct Scene *scene, struct View3D *v3d, struct ARegion *region, |