Blender  V3.3
Classes | Macros | Typedefs | Functions | Variables
sculpt_boundary.c File Reference
#include "MEM_guardedalloc.h"
#include "BLI_blenlib.h"
#include "BLI_edgehash.h"
#include "BLI_math.h"
#include "BLI_task.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_mesh.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 "paint_intern.h"
#include "sculpt_intern.h"
#include "GPU_immediate.h"
#include "GPU_immediate_util.h"
#include "GPU_matrix.h"
#include "GPU_state.h"
#include "bmesh.h"
#include <math.h>
#include <stdlib.h>

Go to the source code of this file.

Classes

struct  BoundaryInitialVertexFloodFillData
 
struct  BoundaryFloodFillData
 

Macros

#define BOUNDARY_VERTEX_NONE   -1
 
#define BOUNDARY_STEPS_NONE   -1
 

Typedefs

typedef struct BoundaryInitialVertexFloodFillData BoundaryInitialVertexFloodFillData
 
typedef struct BoundaryFloodFillData BoundaryFloodFillData
 

Functions

static bool boundary_initial_vertex_floodfill_cb (SculptSession *ss, int from_v, int to_v, bool is_duplicate, void *userdata)
 
static int sculpt_boundary_get_closest_boundary_vertex (SculptSession *ss, const int initial_vertex, const float radius)
 
static void sculpt_boundary_index_add (SculptBoundary *boundary, const int new_index, const float distance, GSet *included_vertices)
 
static void sculpt_boundary_preview_edge_add (SculptBoundary *boundary, const int v1, const int v2)
 
static bool sculpt_boundary_is_vertex_in_editable_boundary (SculptSession *ss, const int initial_vertex)
 
static bool boundary_floodfill_cb (SculptSession *ss, int from_v, int to_v, bool is_duplicate, void *userdata)
 
static void sculpt_boundary_indices_init (SculptSession *ss, SculptBoundary *boundary, const bool init_boundary_distances, const int initial_boundary_index)
 
static void sculpt_boundary_edit_data_init (SculptSession *ss, SculptBoundary *boundary, const int initial_vertex, const float radius)
 
static void sculpt_boundary_falloff_factor_init (SculptSession *ss, SculptBoundary *boundary, Brush *brush, const float radius)
 
SculptBoundarySCULPT_boundary_data_init (Object *object, Brush *brush, const int initial_vertex, const float radius)
 
void SCULPT_boundary_data_free (SculptBoundary *boundary)
 
static void sculpt_boundary_bend_data_init (SculptSession *ss, SculptBoundary *boundary)
 
static void sculpt_boundary_slide_data_init (SculptSession *ss, SculptBoundary *boundary)
 
static void sculpt_boundary_twist_data_init (SculptSession *ss, SculptBoundary *boundary)
 
static float sculpt_boundary_displacement_from_grab_delta_get (SculptSession *ss, SculptBoundary *boundary)
 
static void do_boundary_brush_bend_task_cb_ex (void *__restrict userdata, const int n, const TaskParallelTLS *__restrict UNUSED(tls))
 
static void do_boundary_brush_slide_task_cb_ex (void *__restrict userdata, const int n, const TaskParallelTLS *__restrict UNUSED(tls))
 
static void do_boundary_brush_inflate_task_cb_ex (void *__restrict userdata, const int n, const TaskParallelTLS *__restrict UNUSED(tls))
 
static void do_boundary_brush_grab_task_cb_ex (void *__restrict userdata, const int n, const TaskParallelTLS *__restrict UNUSED(tls))
 
static void do_boundary_brush_twist_task_cb_ex (void *__restrict userdata, const int n, const TaskParallelTLS *__restrict UNUSED(tls))
 
static void do_boundary_brush_smooth_task_cb_ex (void *__restrict userdata, const int n, const TaskParallelTLS *__restrict UNUSED(tls))
 
void SCULPT_do_boundary_brush (Sculpt *sd, Object *ob, PBVHNode **nodes, int totnode)
 
void SCULPT_boundary_edges_preview_draw (const uint gpuattr, SculptSession *ss, const float outline_col[3], const float outline_alpha)
 
void SCULPT_boundary_pivot_line_preview_draw (const uint gpuattr, SculptSession *ss)
 

Variables

static int BOUNDARY_INDICES_BLOCK_SIZE = 300
 

Macro Definition Documentation

◆ BOUNDARY_STEPS_NONE

#define BOUNDARY_STEPS_NONE   -1

Definition at line 46 of file sculpt_boundary.c.

◆ BOUNDARY_VERTEX_NONE

#define BOUNDARY_VERTEX_NONE   -1

Definition at line 45 of file sculpt_boundary.c.

Typedef Documentation

◆ BoundaryFloodFillData

◆ BoundaryInitialVertexFloodFillData

Function Documentation

◆ boundary_floodfill_cb()

static bool boundary_floodfill_cb ( SculptSession ss,
int  from_v,
int  to_v,
bool  is_duplicate,
void userdata 
)
static

◆ boundary_initial_vertex_floodfill_cb()

static bool boundary_initial_vertex_floodfill_cb ( SculptSession ss,
int  from_v,
int  to_v,
bool  is_duplicate,
void userdata 
)
static

◆ do_boundary_brush_bend_task_cb_ex()

static void do_boundary_brush_bend_task_cb_ex ( void *__restrict  userdata,
const int  n,
const TaskParallelTLS *__restrict   UNUSEDtls 
)
static

◆ do_boundary_brush_grab_task_cb_ex()

static void do_boundary_brush_grab_task_cb_ex ( void *__restrict  userdata,
const int  n,
const TaskParallelTLS *__restrict   UNUSEDtls 
)
static

◆ do_boundary_brush_inflate_task_cb_ex()

static void do_boundary_brush_inflate_task_cb_ex ( void *__restrict  userdata,
const int  n,
const TaskParallelTLS *__restrict   UNUSEDtls 
)
static

◆ do_boundary_brush_slide_task_cb_ex()

static void do_boundary_brush_slide_task_cb_ex ( void *__restrict  userdata,
const int  n,
const TaskParallelTLS *__restrict   UNUSEDtls 
)
static

◆ do_boundary_brush_smooth_task_cb_ex()

static void do_boundary_brush_smooth_task_cb_ex ( void *__restrict  userdata,
const int  n,
const TaskParallelTLS *__restrict   UNUSEDtls 
)
static

◆ do_boundary_brush_twist_task_cb_ex()

static void do_boundary_brush_twist_task_cb_ex ( void *__restrict  userdata,
const int  n,
const TaskParallelTLS *__restrict   UNUSEDtls 
)
static

◆ sculpt_boundary_bend_data_init()

static void sculpt_boundary_bend_data_init ( SculptSession ss,
SculptBoundary boundary 
)
static

◆ SCULPT_boundary_data_free()

void SCULPT_boundary_data_free ( SculptBoundary boundary)

◆ SCULPT_boundary_data_init()

SculptBoundary* SCULPT_boundary_data_init ( Object object,
Brush brush,
int  initial_vertex,
float  radius 
)

◆ sculpt_boundary_displacement_from_grab_delta_get()

static float sculpt_boundary_displacement_from_grab_delta_get ( SculptSession ss,
SculptBoundary boundary 
)
static

◆ SCULPT_boundary_edges_preview_draw()

void SCULPT_boundary_edges_preview_draw ( const uint  gpuattr,
SculptSession ss,
const float  outline_col[3],
const float  outline_alpha 
)

◆ sculpt_boundary_edit_data_init()

static void sculpt_boundary_edit_data_init ( SculptSession ss,
SculptBoundary boundary,
const int  initial_vertex,
const float  radius 
)
static

◆ sculpt_boundary_falloff_factor_init()

static void sculpt_boundary_falloff_factor_init ( SculptSession ss,
SculptBoundary boundary,
Brush brush,
const float  radius 
)
static

◆ sculpt_boundary_get_closest_boundary_vertex()

static int sculpt_boundary_get_closest_boundary_vertex ( SculptSession ss,
const int  initial_vertex,
const float  radius 
)
static

◆ sculpt_boundary_index_add()

static void sculpt_boundary_index_add ( SculptBoundary boundary,
const int  new_index,
const float  distance,
GSet included_vertices 
)
static

◆ sculpt_boundary_indices_init()

static void sculpt_boundary_indices_init ( SculptSession ss,
SculptBoundary boundary,
const bool  init_boundary_distances,
const int  initial_boundary_index 
)
static

◆ sculpt_boundary_is_vertex_in_editable_boundary()

static bool sculpt_boundary_is_vertex_in_editable_boundary ( SculptSession ss,
const int  initial_vertex 
)
static

This function is used to check where the propagation should stop when calculating the boundary, as well as to check if the initial vertex is valid.

Definition at line 161 of file sculpt_boundary.c.

References SculptVertexNeighborIter::index, SCULPT_vertex_is_boundary(), SCULPT_VERTEX_NEIGHBORS_ITER_BEGIN, SCULPT_VERTEX_NEIGHBORS_ITER_END, and SCULPT_vertex_visible_get().

Referenced by boundary_floodfill_cb(), SCULPT_boundary_data_init(), and sculpt_boundary_indices_init().

◆ SCULPT_boundary_pivot_line_preview_draw()

void SCULPT_boundary_pivot_line_preview_draw ( const uint  gpuattr,
SculptSession ss 
)

◆ sculpt_boundary_preview_edge_add()

static void sculpt_boundary_preview_edge_add ( SculptBoundary boundary,
const int  v1,
const int  v2 
)
static

◆ sculpt_boundary_slide_data_init()

static void sculpt_boundary_slide_data_init ( SculptSession ss,
SculptBoundary boundary 
)
static

◆ sculpt_boundary_twist_data_init()

static void sculpt_boundary_twist_data_init ( SculptSession ss,
SculptBoundary boundary 
)
static

◆ SCULPT_do_boundary_brush()

void SCULPT_do_boundary_brush ( Sculpt sd,
Object ob,
PBVHNode **  nodes,
int  totnode 
)

Variable Documentation

◆ BOUNDARY_INDICES_BLOCK_SIZE

int BOUNDARY_INDICES_BLOCK_SIZE = 300
static