Blender  V3.3
Macros | Functions
sculpt_geodesic.c File Reference
#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 floatSCULPT_geodesic_mesh_create (Object *ob, GSet *initial_vertices, const float limit_radius)
 
static floatSCULPT_geodesic_fallback_create (Object *ob, GSet *initial_vertices)
 
floatSCULPT_geodesic_distances_create (Object *ob, GSet *initial_vertices, const float limit_radius)
 
floatSCULPT_geodesic_from_vertex_and_symm (Sculpt *sd, Object *ob, const int vertex, const float limit_radius)
 
floatSCULPT_geodesic_from_vertex (Object *ob, const int vertex, const float limit_radius)
 

Macro Definition Documentation

◆ SCULPT_GEODESIC_VERTEX_NONE

#define SCULPT_GEODESIC_VERTEX_NONE   -1

Definition at line 61 of file sculpt_geodesic.c.

Function Documentation

◆ SCULPT_geodesic_distances_create()

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().

◆ SCULPT_geodesic_fallback_create()

static float* SCULPT_geodesic_fallback_create ( Object ob,
GSet initial_vertices 
)
static

◆ SCULPT_geodesic_from_vertex()

float* SCULPT_geodesic_from_vertex ( Object ob,
const int  vertex,
const float  limit_radius 
)

◆ SCULPT_geodesic_from_vertex_and_symm()

float* SCULPT_geodesic_from_vertex_and_symm ( Sculpt sd,
Object ob,
const int  vertex,
const float  limit_radius 
)

◆ SCULPT_geodesic_mesh_create()

static float* SCULPT_geodesic_mesh_create ( Object ob,
GSet initial_vertices,
const float  limit_radius 
)
static

◆ sculpt_geodesic_mesh_test_dist_add()

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