Blender V4.5
mesh_triangulate.cc File Reference

Go to the source code of this file.

Namespaces

namespace  blender
namespace  blender::geometry
namespace  blender::geometry::quad
namespace  blender::geometry::ngon
namespace  blender::geometry::deduplication

Enumerations

enum class  blender::geometry::quad::QuadDirection : int8_t { blender::geometry::quad::Edge_0_2 = 0 , blender::geometry::quad::Edge_1_3 = 1 }

Functions

static void blender::geometry::gather (const Span< int > src, const Span< int16_t > indices, MutableSpan< int > dst)
static Span< int > blender::geometry::gather_or_reference (const Span< int > src, const Span< int16_t > indices, Vector< int > &dst)
static Span< int > blender::geometry::gather_or_reference (const Span< int > src, const IndexMaskSegment mask, Vector< int > &dst)
static Span< float3blender::geometry::face_normals_if_worthwhile (const Mesh &src_mesh, const int selection_size)
static void blender::geometry::copy_loose_vert_hint (const Mesh &src, Mesh &dst)
static void blender::geometry::copy_loose_edge_hint (const Mesh &src, Mesh &dst)
static OffsetIndices< int > blender::geometry::calc_face_offsets (const OffsetIndices< int > src_faces, const IndexMask &unselected, MutableSpan< int > offsets)
static QuadDirection blender::geometry::quad::calc_quad_direction_beauty (const float3 &v0, const float3 &v1, const float3 &v2, const float3 &v3)
static void blender::geometry::quad::calc_quad_directions (const Span< float3 > positions, const Span< int > face_offsets, const Span< int > corner_verts, const TriangulateQuadMode quad_mode, MutableSpan< QuadDirection > directions)
static void blender::geometry::quad::calc_corner_tris (const Span< int > face_offsets, const Span< QuadDirection > directions, MutableSpan< int3 > corner_tris)
static void blender::geometry::quad::calc_corner_tris (const Span< float3 > positions, const OffsetIndices< int > src_faces, const Span< int > src_corner_verts, const IndexMask &quads, const TriangulateQuadMode quad_mode, MutableSpan< int3 > corner_tris)
static void blender::geometry::quad::calc_edges (const Span< int > quad_corner_verts, MutableSpan< int2 > new_quad_edges)
static void blender::geometry::quad::calc_quad_corner_edges (const Span< int > src_corner_edges, const Span< int3 > corner_tris, const int edges_start, MutableSpan< int > corner_edges)
static void blender::geometry::quad::calc_edges (const Span< int > src_corner_edges, const Span< int3 > corner_tris, const Span< int > corner_verts, const int edges_start, MutableSpan< int2 > edges, MutableSpan< int > quad_corner_edges)
template<typename T>
static void blender::geometry::quad::copy_quad_data_to_tris (const Span< T > src, const IndexMask &quads, MutableSpan< T > dst)
static void blender::geometry::quad::copy_quad_data_to_tris (const GSpan src, const IndexMask &quads, GMutableSpan dst)
static OffsetIndices< int > blender::geometry::gather_selected_offsets (const OffsetIndices< int > src_offsets, const IndexMaskSegment selection, MutableSpan< int > dst_offsets)
static OffsetIndices< int > blender::geometry::ngon::calc_tris_by_ngon (const OffsetIndices< int > src_faces, const IndexMask &ngons, MutableSpan< int > face_offset_data)
static OffsetIndices< int > blender::geometry::ngon::calc_edges_by_ngon (const OffsetIndices< int > src_faces, const IndexMask &selection, MutableSpan< int > edge_offset_data)
static void blender::geometry::ngon::calc_corner_tris (const Span< float3 > positions, const OffsetIndices< int > src_faces, const Span< int > src_corner_verts, const Span< float3 > face_normals, const IndexMask &ngons, const OffsetIndices< int > tris_by_ngon, const TriangulateNGonMode ngon_mode, MutableSpan< int3 > corner_tris)
static void blender::geometry::ngon::calc_inner_tri_edges (const IndexRange src_face, const Span< int > src_corner_verts, const Span< int > src_corner_edges, const Span< int3 > corner_tris, const int edges_start, MutableSpan< int > corner_edges, VectorSet< OrderedEdge > &deduplication)
static void blender::geometry::ngon::calc_edges (const OffsetIndices< int > src_faces, const Span< int > src_corner_verts, const Span< int > src_corner_edges, const IndexMask &ngons, const OffsetIndices< int > tris_by_ngon, const OffsetIndices< int > edges_by_ngon, const IndexRange ngon_edges_range, const Span< int3 > corner_tris, MutableSpan< int2 > edges, MutableSpan< int > corner_edges)
static GroupedSpan< int > blender::geometry::deduplication::build_vert_to_tri_map (const int verts_num, const Span< int3 > vert_tris, Array< int > &r_offsets, Array< int > &r_indices)
static IndexMask blender::geometry::deduplication::calc_unselected_faces (const Mesh &mesh, const OffsetIndices< int > src_faces, const Span< int > src_corner_verts, const IndexMask &selection, const Span< int3 > corner_tris, IndexMaskMemory &memory)
static std::optional< int > blender::geometry::deduplication::find_edge_duplicate (const GroupedSpan< int > vert_to_edge_map, const Span< int2 > edges, const OrderedEdge edge)
static int blender::geometry::deduplication::calc_new_edges (const Mesh &src_mesh, const Span< int2 > src_edges, const IndexRange new_edges_range, MutableSpan< int2 > edges, MutableSpan< int > corner_edges)
std::optional< Mesh * > blender::geometry::mesh_triangulate (const Mesh &src_mesh, const IndexMask &selection, TriangulateNGonMode ngon_mode, TriangulateQuadMode quad_mode, const bke::AttributeFilter &attribute_filter)