46 for (j = 0; j < 2; j++) {
47 for (k = 0; k < 2; k++) {
54 for (j = 0; j < 2; j++) {
55 for (k = 0; k < 2; k++) {
68 for (j = 0; j < 2; j++) {
74 for (j = 0; j < 2; j++) {
102 v[1][0] = eed_last->
v1;
103 v[1][1] = eed_last->
v2;
108 const bool rev = (l_other ==
l->
prev);
109 while (!
ELEM(l_other->
v, eed_last->
v1, eed_last->
v2)) {
110 l_other = rev ? l_other->
prev : l_other->
next;
113 if (l_other->
v == eve_last) {
144 MEM_SAFE_DELETE(psel->
edges);
147 MEM_SAFE_DELETE(psel->
verts);
175 for (
int i = 0; i < psel->
edges_len; i++) {
196 for (
int i = 0; i < psel->
verts_len; i++) {
227 for (i = 1; i <= previewlines; i++) {
228 const float fac = (i / (
float(previewlines) + 1));
246 BMVert *
v[2][2] = {{
nullptr}}, *eve_last;
247 float (*edges)[2][3] =
nullptr;
265 for (eed = eed_last =
static_cast<BMEdge *
>(
BMW_begin(&walker, eed_start)); eed;
275 (
sizeof(*edges) * (
BLI_stack_count(edge_stack) + (eed_last != eed_start))) * previewlines,
290 v[1][0] = eed_last->
v1;
291 v[1][1] = eed_last->
v2;
292 eve_last = eed_last->
v1;
298 for (i = 1; i <= previewlines; i++) {
299 const float fac = (i / (
float(previewlines) + 1));
300 float v_cos[2][2][3];
312 if ((eed_last != eed_start) &&
313#ifdef BMW_EDGERING_NGON
325 for (i = 1; i <= previewlines; i++) {
326 const float fac = (i / (
float(previewlines) + 1));
327 float v_cos[2][2][3];
329 if (!
v[0][0] || !
v[0][1] || !
v[1][0] || !
v[1][1]) {
361 psel,
bm, eed_start, previewlines, vert_positions);
365 psel,
bm, eed_start, previewlines, vert_positions);
Read Blender memory allocation and freeing.
#define BM_elem_index_get(ele)
#define BM_ITER_ELEM(ele, iter, data, itype)
constexpr bool is_empty() const
float get_value_f(int colorid)
void * MEM_new_uninitialized(size_t len, const char *str) ATTR_WARN_UNUSED_RESULT ATTR_ALLOC_SIZE(1) ATTR_NONNULL(2)
static void edgering_vcos_get_pair(BMVert *v[2], float r_cos[2][3], const Span< float3 > vert_positions)
void BM_mesh_elem_index_ensure(BMesh *bm, const char htype)
EditMesh_PreSelEdgeRing * EDBM_preselect_edgering_create()
bool BM_edge_in_face(const BMEdge *e, const BMFace *f)
bool BM_edge_is_any_face_len_test(const BMEdge *e, const int len)
bool BLI_stack_is_empty(const BLI_Stack *stack) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL()
MINLINE void copy_v3_v3(float r[3], const float a[3])
void * MEM_new_array_uninitialized(size_t len, size_t size, const char *str) ATTR_WARN_UNUSED_RESULT ATTR_ALLOC_SIZE(1
bool BM_edge_share_face_check(BMEdge *e1, BMEdge *e2)
void BLI_stack_free(BLI_Stack *stack) ATTR_NONNULL()
ATTR_WARN_UNUSED_RESULT const BMLoop * l
void * BMW_begin(BMWalker *walker, void *start)
GPUVertFormat * immVertexFormat()
void BMW_init(BMWalker *walker, BMesh *bm, int type, short mask_vert, short mask_edge, short mask_face, BMWFlag flag, int layer, BMWDelimitFlag delimit)
Initialize Walker.
void BLI_stack_pop(BLI_Stack *stack, void *dst) ATTR_NONNULL()
static void view3d_preselect_mesh_edgering_update_edges_from_edge(EditMesh_PreSelEdgeRing *psel, BMesh *bm, BMEdge *eed_start, int previewlines, const Span< float3 > vert_positions)
void immBegin(GPUPrimType, uint vertex_len)
ATTR_WARN_UNUSED_RESULT const BMVert * v
void EDBM_preselect_edgering_update_from_edge(EditMesh_PreSelEdgeRing *psel, BMesh *bm, BMEdge *eed_start, int previewlines, Span< float3 > vert_positions)
void GPU_matrix_mul(const float m[4][4])
void immBindBuiltinProgram(GPUBuiltinShader shader_id)
void EDBM_preselect_edgering_clear(EditMesh_PreSelEdgeRing *psel)
void immUniform1f(const char *name, float x)
void * MEM_new_zeroed(size_t len, const char *str) ATTR_WARN_UNUSED_RESULT ATTR_ALLOC_SIZE(1) ATTR_NONNULL(2)
void BMW_end(BMWalker *walker)
End Walker.
size_t BLI_stack_count(const BLI_Stack *stack) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL()
void GPU_viewport_size_get_f(float coords[4])
@ GPU_SHADER_3D_POLYLINE_UNIFORM_COLOR
@ GPU_SHADER_3D_POINT_UNIFORM_SIZE_UNIFORM_COLOR_AA
void immUniformThemeColor3(int color_id)
void GPU_program_point_size(bool enable)
void interp_v3_v3v3(float r[3], const float a[3], const float b[3], float t)
void * BLI_stack_peek(BLI_Stack *stack) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL()
static void edgering_vcos_get(BMVert *v[2][2], float r_cos[2][2][3], const Span< float3 > vert_positions)
uint GPU_vertformat_attr_add(GPUVertFormat *format, StringRef name, gpu::VertAttrType type)
void immVertex3fv(uint attr_id, const float data[3])
bool BM_edge_share_quad_check(BMEdge *e1, BMEdge *e2)
static void edgering_find_order(BMEdge *eed_last, BMEdge *eed, BMVert *eve_last, BMVert *v[2][2])
static void view3d_preselect_mesh_edgering_update_verts_from_edge(EditMesh_PreSelEdgeRing *psel, BMesh *, BMEdge *eed_start, int previewlines, const Span< float3 > vert_positions)
MINLINE float max_ff(float a, float b)
void EDBM_preselect_edgering_destroy(EditMesh_PreSelEdgeRing *psel)
void * BMW_step(BMWalker *walker)
Step Walker.
void BLI_stack_push(BLI_Stack *stack, const void *src) ATTR_NONNULL()
void immUniform2fv(const char *name, const float data[2])
void EDBM_preselect_edgering_draw(EditMesh_PreSelEdgeRing *psel, const float matrix[4][4])
void GPU_blend(GPUBlend blend)
BLI_Stack * BLI_stack_new(size_t elem_size, const char *description) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL()
void GPU_depth_test(GPUDepthTest test)
@ BMW_DELIMIT_EDGE_RING_NGONS
BMLoop * BM_loop_other_edge_loop(BMLoop *l, BMVert *v)
KERNEL_FEATURE_LIGHT_PASSES KERNEL_FEATURE_PATH_GUIDING float