Blender V5.3
extract_mesh_ibo_lines_adjacency.cc File Reference
#include <climits>
#include "BLI_map.hh"
#include "BLI_ordered_edge.hh"
#include "BKE_editmesh.hh"
#include "GPU_index_buffer.hh"
#include "draw_subdivision.hh"
#include "extract_mesh.hh"

Go to the source code of this file.

Namespaces

namespace  blender
 BMesh Iterators.
namespace  blender::draw

Macros

#define EDGE_IS_UNSET   INT_MAX
#define EDGE_IS_HANDLED   (INT_MAX - 1)
#define EDGE_IS_UNSET_OR_HANDLED(i)

Functions

static void blender::draw::create_lines_for_remaining_edges (MutableSpan< int > vert_to_corner, Map< OrderedEdge, int > &edge_hash, GPUIndexBufBuilder &elb, bool &is_manifold)
void blender::draw::rotate_vector (uint3 &value)
void blender::draw::lines_adjacency_triangle (uint3 vert_tri, uint3 corner_tri, MutableSpan< int > vert_to_corner, Map< OrderedEdge, int > &edge_hash, GPUIndexBufBuilder &elb, bool &is_manifold)
static void blender::draw::calc_adjacency_bm (const MeshRenderData &mr, MutableSpan< int > vert_to_corner, Map< OrderedEdge, int > &edge_hash, GPUIndexBufBuilder &elb, bool &is_manifold)
static void blender::draw::calc_adjacency_mesh (const MeshRenderData &mr, MutableSpan< int > vert_to_corner, Map< OrderedEdge, int > &edge_hash, GPUIndexBufBuilder &elb, bool &is_manifold)
gpu::IndexBufPtr blender::draw::extract_lines_adjacency (const MeshRenderData &mr, bool &r_is_manifold)
gpu::IndexBufPtr blender::draw::extract_lines_adjacency_subdiv (const DRWSubdivCache &subdiv_cache, bool &r_is_manifold)

Macro Definition Documentation

◆ EDGE_IS_HANDLED

#define EDGE_IS_HANDLED   (INT_MAX - 1)

Set when the edge has been initialized and handled. This is set instead of EDGE_IS_UNSET so the edge isn't handled again which can write past the buffer bounds, see: #150841.

Note
this isn't ideal as the winding checks may match or not depending on the order triangles are handled. Typically we try to avoid different behavior based on the order of data however enforcing exactly matching behavior seems fairly involved without much benefit, so accept this shortcoming.

Definition at line 36 of file extract_mesh_ibo_lines_adjacency.cc.

Referenced by blender::draw::lines_adjacency_triangle().

◆ EDGE_IS_UNSET

#define EDGE_IS_UNSET   INT_MAX

Set when the edge has not yet been initialized.

Definition at line 24 of file extract_mesh_ibo_lines_adjacency.cc.

Referenced by blender::draw::lines_adjacency_triangle().

◆ EDGE_IS_UNSET_OR_HANDLED

#define EDGE_IS_UNSET_OR_HANDLED ( i)