Blender
V3.3
|
#include "MEM_guardedalloc.h"
#include "BLI_blenlib.h"
#include "BLI_linklist_stack.h"
#include "BLI_math.h"
#include "BLI_task.h"
#include "BLT_translation.h"
#include "DNA_brush_types.h"
#include "DNA_mesh_types.h"
#include "DNA_meshdata_types.h"
#include "DNA_object_types.h"
#include "BKE_brush.h"
#include "BKE_ccg.h"
#include "BKE_colortools.h"
#include "BKE_context.h"
#include "BKE_image.h"
#include "BKE_mesh.h"
#include "BKE_mesh_mapping.h"
#include "BKE_multires.h"
#include "BKE_node.h"
#include "BKE_object.h"
#include "BKE_paint.h"
#include "BKE_pbvh.h"
#include "BKE_scene.h"
#include "BKE_subdiv_ccg.h"
#include "DEG_depsgraph.h"
#include "WM_api.h"
#include "WM_message.h"
#include "WM_toolsystem.h"
#include "WM_types.h"
#include "RNA_access.h"
#include "RNA_define.h"
#include "ED_object.h"
#include "ED_screen.h"
#include "ED_sculpt.h"
#include "ED_view3d.h"
#include "paint_intern.h"
#include "sculpt_intern.h"
#include "IMB_colormanagement.h"
#include "IMB_imbuf.h"
#include "bmesh.h"
#include <math.h>
#include <stdlib.h>
Go to the source code of this file.
Macros | |
#define | SCULPT_GEODESIC_VERTEX_NONE -1 |
Functions | |
static bool | sculpt_geodesic_mesh_test_dist_add (MVert *mvert, const int v0, const int v1, const int v2, float *dists, GSet *initial_vertices) |
static float * | SCULPT_geodesic_mesh_create (Object *ob, GSet *initial_vertices, const float limit_radius) |
static float * | SCULPT_geodesic_fallback_create (Object *ob, GSet *initial_vertices) |
float * | SCULPT_geodesic_distances_create (Object *ob, GSet *initial_vertices, const float limit_radius) |
float * | SCULPT_geodesic_from_vertex_and_symm (Sculpt *sd, Object *ob, const int vertex, const float limit_radius) |
float * | SCULPT_geodesic_from_vertex (Object *ob, const int vertex, const float limit_radius) |
#define SCULPT_GEODESIC_VERTEX_NONE -1 |
Definition at line 61 of file sculpt_geodesic.c.
float* SCULPT_geodesic_distances_create | ( | struct Object * | ob, |
struct GSet * | initial_vertices, | ||
float | limit_radius | ||
) |
Returns an array indexed by vertex index containing the geodesic distance to the closest vertex in the initial vertex set. The caller is responsible for freeing the array. Geodesic distances will only work when used with PBVH_FACES, for other types of PBVH it will fallback to euclidean distances to one of the initial vertices in the set.
Definition at line 290 of file sculpt_geodesic.c.
References BKE_pbvh_type(), BLI_assert, blender::geometry::limit_radius(), NULL, SculptSession::pbvh, PBVH_BMESH, PBVH_FACES, PBVH_GRIDS, Object::sculpt, SCULPT_geodesic_fallback_create(), and SCULPT_geodesic_mesh_create().
Referenced by sculpt_expand_geodesics_from_state_boundary(), SCULPT_geodesic_from_vertex(), and SCULPT_geodesic_from_vertex_and_symm().
Definition at line 261 of file sculpt_geodesic.c.
References BKE_object_get_original_mesh(), BLI_gsetIterator_getKey(), GSET_ITER, len_v3v3(), MEM_malloc_arrayN, mesh, POINTER_AS_INT, Object::sculpt, SCULPT_GEODESIC_VERTEX_NONE, SCULPT_vertex_co_get(), and Mesh::totvert.
Referenced by SCULPT_geodesic_distances_create().
Definition at line 337 of file sculpt_geodesic.c.
References BLI_gset_add(), BLI_gset_free(), BLI_gset_int_new(), blender::geometry::limit_radius(), NULL, POINTER_FROM_INT, and SCULPT_geodesic_distances_create().
float* SCULPT_geodesic_from_vertex_and_symm | ( | Sculpt * | sd, |
Object * | ob, | ||
const int | vertex, | ||
const float | limit_radius | ||
) |
Definition at line 306 of file sculpt_geodesic.c.
References BLI_gset_add(), BLI_gset_free(), BLI_gset_int_new(), flip_v3_v3(), blender::geometry::limit_radius(), NULL, POINTER_FROM_INT, Object::sculpt, SCULPT_geodesic_distances_create(), SCULPT_is_symmetry_iteration_valid(), SCULPT_mesh_symmetry_xyz_get(), SCULPT_nearest_vertex_get(), SCULPT_vertex_co_get(), and v.
Referenced by sculpt_expand_geodesic_falloff_create().
|
static |
Definition at line 99 of file sculpt_geodesic.c.
References BKE_mesh_edge_poly_map_create(), BKE_mesh_vert_edge_map_create(), BKE_object_get_original_mesh(), BLI_BITMAP_DISABLE, BLI_BITMAP_ENABLE, BLI_BITMAP_NEW, BLI_bitmap_set_all(), BLI_BITMAP_TEST, BLI_gset_haskey(), BLI_gsetIterator_getKey(), BLI_LINKSTACK_DECLARE, BLI_LINKSTACK_FREE, BLI_LINKSTACK_INIT, BLI_LINKSTACK_POP, BLI_LINKSTACK_PUSH, BLI_LINKSTACK_SIZE, BLI_LINKSTACK_SWAP, MeshElemMap::count, e, ELEM, SculptSession::epmap, SculptSession::epmap_mem, SculptSession::face_sets, GSET_ITER, MeshElemMap::indices, len_squared_v3v3(), blender::geometry::limit_radius(), MPoly::loopstart, Mesh::medge, MEM_malloc_arrayN, MEM_SAFE_FREE, mesh, Mesh::mloop, Mesh::mpoly, LinkNode::next, POINTER_AS_INT, POINTER_FROM_INT, queue, Object::sculpt, sculpt_geodesic_mesh_test_dist_add(), SCULPT_GEODESIC_VERTEX_NONE, SCULPT_mesh_deformed_mverts_get(), SWAP, Mesh::totedge, Mesh::totloop, MPoly::totloop, Mesh::totpoly, Mesh::totvert, v, MLoop::v, v1, MEdge::v1, v2, MEdge::v2, SculptSession::vemap, SculptSession::vemap_mem, and verts.
Referenced by SCULPT_geodesic_distances_create().
|
static |
Definition at line 64 of file sculpt_geodesic.c.
References BLI_assert, BLI_gset_haskey(), geodesic_distance_propagate_across_triangle(), len_v3(), POINTER_FROM_INT, SCULPT_GEODESIC_VERTEX_NONE, sub_v3_v3v3(), v1, and v2.
Referenced by SCULPT_geodesic_mesh_create().