Blender V5.3
bmo_subdivide.cc File Reference
#include <array>
#include "MEM_guardedalloc.h"
#include "BLI_math_geom_c.hh"
#include "BLI_math_vector_c.hh"
#include "BLI_noise_c.hh"
#include "BLI_rand_c.hh"
#include "BLI_stack_c.hh"
#include "BLI_vector.hh"
#include "BKE_customdata.hh"
#include "bmesh.hh"
#include "intern/bmesh_operators_private.hh"
#include "intern/bmesh_private.hh"

Go to the source code of this file.

Classes

struct  blender::SubDParams
struct  blender::SubDPattern
struct  blender::SubDFaceData

Namespaces

namespace  blender
 BMesh Iterators.

Macros

#define SUBD_SPLIT   1
#define EDGE_PERCENT   2
#define FACE_CUSTOMFILL   4
#define ELE_INNER   8
#define ELE_SPLIT   16
#define FLT_FACE_SPLIT_EPSILON   0.00005f
#define USE_SPHERE_DUAL_BLEND
#define PATTERNS_TOT   ARRAY_SIZE(patterns)

Typedefs

using blender::subd_pattern_fill_fp

Functions

static void blender::bmo_subd_init_shape_info (BMesh *bm, SubDParams *params)
static BMEdge * blender::connect_smallest_face (BMesh *bm, BMVert *v_a, BMVert *v_b, BMFace **r_f_new)
static void blender::interp_slerp_co_no_v3 (const float co_a[3], const float no_a[3], const float co_b[3], const float no_b[3], const float no_dir[3], float fac, float r_co[3])
static void blender::alter_co (BMVert *v, BMEdge *, const SubDParams *params, const float perc, const BMVert *v_a, const BMVert *v_b)
static BMVert * blender::bm_subdivide_edge_addvert (BMesh *bm, BMEdge *edge, BMEdge *e_orig, const SubDParams *params, const float factor_edge_split, const float factor_subd, BMVert *v_a, BMVert *v_b, BMEdge **r_edge)
static BMVert * blender::subdivide_edge_num (BMesh *bm, BMEdge *edge, BMEdge *e_orig, int curpoint, int totpoint, const SubDParams *params, BMVert *v_a, BMVert *v_b, BMEdge **r_edge)
static void blender::bm_subdivide_multicut (BMesh *bm, BMEdge *edge, const SubDParams *params, BMVert *v_a, BMVert *v_b)
static void blender::quad_1edge_split (BMesh *bm, BMFace *, BMVert **verts, const SubDParams *params)
static void blender::quad_2edge_split_path (BMesh *bm, BMFace *, BMVert **verts, const SubDParams *params)
static void blender::quad_2edge_split_innervert (BMesh *bm, BMFace *, BMVert **verts, const SubDParams *params)
static void blender::quad_2edge_split_fan (BMesh *bm, BMFace *, BMVert **verts, const SubDParams *params)
static void blender::quad_3edge_split (BMesh *bm, BMFace *, BMVert **verts, const SubDParams *params)
static void blender::quad_4edge_subdivide (BMesh *bm, BMFace *, BMVert **verts, const SubDParams *params)
static void blender::tri_1edge_split (BMesh *bm, BMFace *, BMVert **verts, const SubDParams *params)
static void blender::tri_3edge_subdivide (BMesh *bm, BMFace *, BMVert **verts, const SubDParams *params)
void blender::bmo_subdivide_edges_exec (BMesh *bm, BMOperator *op)
void blender::BM_mesh_esubdivide (BMesh *bm, char edge_hflag, float smooth, short smooth_falloff, bool use_smooth_even, float fractal, float along_normal, int numcuts, int seltype, int cornertype, short use_single_edge, short use_grid_fill, short use_only_quads, int seed)
void blender::bmo_bisect_edges_exec (BMesh *bm, BMOperator *op)

Variables

static const SubDPattern blender::quad_1edge
static const SubDPattern blender::quad_2edge_path
static const SubDPattern blender::quad_2edge_innervert
static const SubDPattern blender::quad_2edge_fan
static const SubDPattern blender::quad_3edge
static const SubDPattern blender::tri_1edge
static const SubDPattern blender::tri_3edge
static const SubDPattern blender::quad_4edge
static const SubDPattern * blender::patterns []

Detailed Description

Edge based subdivision with various subdivision patterns.

Definition in file bmo_subdivide.cc.

Macro Definition Documentation

◆ EDGE_PERCENT

#define EDGE_PERCENT   2

◆ ELE_INNER

◆ ELE_SPLIT

#define ELE_SPLIT   16

◆ FACE_CUSTOMFILL

#define FACE_CUSTOMFILL   4

Definition at line 102 of file bmo_subdivide.cc.

Referenced by blender::bmo_subdivide_edges_exec().

◆ FLT_FACE_SPLIT_EPSILON

#define FLT_FACE_SPLIT_EPSILON   0.00005f

A value of 0.00005 means we get face splits at a little under 1.0 degrees, see #32665.

Definition at line 109 of file bmo_subdivide.cc.

Referenced by blender::bmo_subdivide_edges_exec().

◆ PATTERNS_TOT

#define PATTERNS_TOT   ARRAY_SIZE(patterns)

Definition at line 901 of file bmo_subdivide.cc.

Referenced by blender::bmo_subdivide_edges_exec().

◆ SUBD_SPLIT

#define SUBD_SPLIT   1

Flags for all elements share a common bit-field space.

Definition at line 96 of file bmo_subdivide.cc.

Referenced by blender::bm_subdivide_multicut(), and blender::bmo_subdivide_edges_exec().

◆ USE_SPHERE_DUAL_BLEND

#define USE_SPHERE_DUAL_BLEND