14#define MAX_CLIPPLANE_LEN 6
16#define SNAP_TO_EDGE_ELEMENTS \
17 (SCE_SNAP_TO_EDGE | SCE_SNAP_TO_EDGE_ENDPOINT | SCE_SNAP_TO_EDGE_MIDPOINT | \
18 SCE_SNAP_TO_EDGE_PERPENDICULAR)
139 bool skip_occlusion_plane =
false);
155 const bool is_in_front);
167 const float dir[3],
const float v0[3],
const float v1[3],
const float v2[3],
float no[3]);
172 const float (*clip_plane)[4],
173 const int clip_plane_len,
179 const float (*clip_plane)[4],
180 const int clip_plane_len,
200 bool is_object_active);
232 bool is_editmesh =
false);
245 float dist_px_sq_orig,
void(* BVHTree_RayCastCallback)(void *userdata, int index, const BVHTreeRay *ray, BVHTreeRayHit *hit)
void(* BVHTree_NearestPointCallback)(void *userdata, int index, const float co[3], BVHTreeNearest *nearest)
ATTR_WARN_UNUSED_RESULT const BMVert * v2
blender::Vector< blender::float4, MAX_CLIPPLANE_LEN+1 > clip_planes
void clip_planes_enable(SnapObjectContext *sctx, const Object *ob_eval, bool skip_occlusion_plane=false)
blender::float4x4 pmat_local
bool use_backface_culling
bool snap_point(const blender::float3 &co, int index=-1)
static void register_result_raycast(SnapObjectContext *sctx, const Object *ob_eval, const ID *id_eval, const blender::float4x4 &obmat, const BVHTreeRayHit *hit, const bool is_in_front)
SnapData(SnapObjectContext *sctx, const blender::float4x4 &obmat=blender::float4x4::identity())
static void register_result(SnapObjectContext *sctx, const Object *ob_eval, const ID *id_eval, const blender::float4x4 &obmat, BVHTreeNearest *r_nearest)
virtual void copy_vert_no(const int, float[3])
DistProjectedAABBPrecalc nearest_precalc
BVHTreeNearest nearest_point
eSnapMode snap_edge_points_impl(SnapObjectContext *sctx, int edge_index, float dist_px_sq_orig)
virtual void get_vert_co(const int, const float **)
bool snap_boundbox(const blender::float3 &min, const blender::float3 &max)
virtual void get_edge_verts_index(const int, int[2])
bool snap_edge(const blender::float3 &va, const blender::float3 &vb, int edge_index=-1)
BVHTree_RayCastCallback raycast_callback
const blender::float4x4 * obmat
struct SnapObjectContext::@587::@591 edit_mesh
blender::float4 occlusion_plane_in_front
blender::float3 ray_start
struct SnapObjectContext::@588 grid
const RegionView3D * rv3d
blender::Vector< blender::float4, MAX_CLIPPLANE_LEN > clip_planes
struct SnapObjectContext::@590 ret
bool(* test_face_fn)(BMFace *, void *user_data)
bool(* test_edge_fn)(BMEdge *, void *user_data)
blender::Map< const ID *, std::unique_ptr< SnapCache > > editmesh_caches
bool(* test_vert_fn)(BMVert *, void *user_data)
eSnapOcclusionTest occlusion_test_edit
struct SnapObjectContext::@589 runtime
blender::float4 occlusion_plane
bool has_occlusion_plane_in_front
blender::float4x4 persmat
float ray_depth_max_in_front
struct SnapObjectContext::@587 callbacks
static MatBase identity()