111 if (dist_sq > vp_handle->
dists_sq[index]) {
116 vp_handle->
dists_sq[index] = dist_sq;
132 const float mval_fl[2])
175 vp_handle->
ob =
nullptr;
176 vp_handle->
scene =
nullptr;
187 const float mval_fl[2])
196 MEM_delete(vp_handle);
@ MESH_FOREACH_USE_NORMAL
void BKE_mesh_foreach_mapped_vert(const Mesh *mesh, void(*func)(void *user_data, int index, const float co[3], const float no[3]), void *user_data, MeshForeachFlag flag)
General operations, lookup, etc. for blender objects.
Mesh * BKE_object_get_evaluated_mesh(const Object *object_eval)
BLI_INLINE bool BLI_listbase_is_empty(const struct ListBase *lb)
MINLINE float len_squared_v2v2(const float a[2], const float b[2]) ATTR_WARN_UNUSED_RESULT
Object * DEG_get_evaluated_object(const Depsgraph *depsgraph, Object *object)
Object is a sort of wrapper for general info.
@ V3D_PROJ_TEST_CLIP_NEAR
eV3DProjStatus ED_view3d_project_float_object(const ARegion *region, const float co[3], float r_co[2], eV3DProjTest flag)
Read Guarded memory(de)allocation.
void fill(const T &value) const
void reinitialize(const int64_t new_size)
const Depsgraph * depsgraph
static void vpaint_proj_dm_map_cosnos_update__map_cb(void *user_data, int index, const float co[3], const float no[3])
VertProjHandle * ED_vpaint_proj_handle_create(Depsgraph &depsgraph, Scene &scene, Object &ob, blender::Span< blender::float3 > &r_vert_positions, blender::Span< blender::float3 > &r_vert_normals)
static void vpaint_proj_dm_map_cosnos_update(Depsgraph *depsgraph, VertProjHandle *vp_handle, ARegion *region, const float mval_fl[2])
static void vpaint_proj_dm_map_cosnos_init(Depsgraph &depsgraph, Scene &, Object &ob, VertProjHandle &vp_handle)
static void vpaint_proj_dm_map_cosnos_init__map_cb(void *user_data, int index, const float co[3], const float no[3])
void ED_vpaint_proj_handle_update(Depsgraph *depsgraph, VertProjHandle *vp_handle, ARegion *region, const float mval_fl[2])
void ED_vpaint_proj_handle_free(VertProjHandle *vp_handle)
blender::Array< blender::float3 > vert_positions
blender::Array< blender::float3 > vert_normals
blender::Array< float > dists_sq
VertProjHandle * vp_handle