Blender V5.0
bmo_rotate_edges.cc File Reference
#include <cfloat>
#include "MEM_guardedalloc.h"
#include "BLI_heap.h"
#include "bmesh.hh"
#include "intern/bmesh_operators_private.hh"

Go to the source code of this file.

Macros

#define EDGE_OUT   1
#define FACE_MARK   1

Functions

static void bm_rotate_edges_simple (BMesh *bm, BMOperator *op, const short check_flag, const bool use_ccw)
static float bm_edge_calc_rotate_cost (const BMEdge *e)
static bool bm_edge_rotate_is_boundary (const BMEdge *e)
static void bm_rotate_edges_shared (BMesh *bm, BMOperator *op, short check_flag, const bool use_ccw, const int edges_len)
void bmo_rotate_edges_exec (BMesh *bm, BMOperator *op)

Detailed Description

Rotate edges topology that share two faces.

Definition in file bmo_rotate_edges.cc.

Macro Definition Documentation

◆ EDGE_OUT

#define EDGE_OUT   1

Definition at line 21 of file bmo_rotate_edges.cc.

◆ FACE_MARK

#define FACE_MARK   1

Definition at line 22 of file bmo_rotate_edges.cc.

Function Documentation

◆ bm_edge_calc_rotate_cost()

float bm_edge_calc_rotate_cost ( const BMEdge * e)
static

Edge length is just a way of ordering that's independent of order in the edges argument, we could use some other method since ideally all edges will be rotated, this just happens to be simple to calculate.

Definition at line 52 of file bmo_rotate_edges.cc.

References BM_edge_calc_length_squared(), and e.

Referenced by bm_rotate_edges_shared().

◆ bm_edge_rotate_is_boundary()

bool bm_edge_rotate_is_boundary ( const BMEdge * e)
static

Check if this edge is a boundary: Are more than one of the connected faces edges rotating too?

Definition at line 60 of file bmo_rotate_edges.cc.

References BM_elem_index_get, count, BMLoop::e, e, BMLoop::next, and BMLoop::radial_next.

Referenced by bm_rotate_edges_shared().

◆ bm_rotate_edges_shared()

void bm_rotate_edges_shared ( BMesh * bm,
BMOperator * op,
short check_flag,
const bool use_ccw,
const int edges_len )
static

◆ bm_rotate_edges_simple()

void bm_rotate_edges_simple ( BMesh * bm,
BMOperator * op,
const short check_flag,
const bool use_ccw )
static

Rotate edges where every edge has its own faces (we can rotate in any order).

Definition at line 27 of file bmo_rotate_edges.cc.

References bm, BM_EDGE, BM_edge_rotate(), BM_edge_rotate_check(), BMO_edge_flag_enable, BMO_ITER, e, EDGE_OUT, and BMOperator::slots_in.

Referenced by bmo_rotate_edges_exec().

◆ bmo_rotate_edges_exec()