Blender V5.0
blender::bke::pbvh::uv_islands Namespace Reference

Classes

struct  FanSegment
struct  Fan
class  VertToEdgeMap
class  EdgeToPrimitiveMap
class  TriangleToEdgeMap
struct  MeshData
struct  UVVertex
struct  UVEdge
struct  UVPrimitive
struct  UVBorderEdge
struct  UVBorderCorner
struct  UVBorder
struct  UVIsland
struct  UVIslands
struct  UVIslandsMask

Functions

static void uv_edge_append_to_uv_vertices (UVEdge &uv_edge)
static void uv_primitive_append_to_uv_edges (UVPrimitive &uv_primitive)
static void uv_primitive_append_to_uv_vertices (UVPrimitive &uv_primitive)
Mesh Primitives
static int primitive_get_other_uv_vertex (const MeshData &mesh_data, const int3 &tri, const int v1, const int v2)
static bool primitive_has_shared_uv_edge (const Span< float2 > uv_map, const int3 &tri, const int3 &tri_other)
static int get_uv_loop (const MeshData &mesh_data, const int3 &tri, const int vert)
static rctf primitive_uv_bounds (const int3 &tri, const Span< float2 > uv_map)
UVVertex
static void uv_vertex_init_flags (UVVertex &uv_vertex)
static Vector< int > connecting_mesh_primitive_indices (const UVVertex &uv_vertex)
UVIsland
static UVPrimitiveadd_primitive (const MeshData &mesh_data, UVIsland &uv_island, const int primitive_i)
static std::optional< UVBorderCornersharpest_border_corner (UVBorder &border, float *r_angle)
static std::optional< UVBorderCornersharpest_border_corner (UVIsland &island)
static void add_uv_primitive_shared_uv_edge (const MeshData &mesh_data, UVIsland &island, UVVertex *connected_vert_1, UVVertex *connected_vert_2, float2 uv_unconnected, const int mesh_primitive_i)
static int find_fill_primitive (const MeshData &mesh_data, UVBorderCorner &corner)
static void add_uv_primitive_fill (UVIsland &island, UVVertex &uv_vertex1, UVVertex &uv_vertex2, UVVertex &uv_vertex3, const int fill_primitive_i)
static void extend_at_vert (const MeshData &mesh_data, UVIsland &island, UVBorderCorner &corner, float min_uv_distance)
static void reset_extendability_flags (UVIsland &island)
UVIslandsMask
static ushort2 mask_resolution_from_tile_resolution (ushort2 tile_resolution)
static void add_uv_island (const MeshData &mesh_data, UVIslandsMask::Tile &tile, const UVIsland &uv_island, int16_t island_index)
static bool dilate_x (UVIslandsMask::Tile &islands_mask)
static bool dilate_y (UVIslandsMask::Tile &islands_mask)
static void dilate_tile (UVIslandsMask::Tile &tile, int max_iterations)

MeshData

static constexpr int INVALID_UV_ISLAND_ID = -1
static void mesh_data_init_edges (MeshData &mesh_data)
static void extract_uv_neighbors (const MeshData &mesh_data, const Span< int > uv_island_ids, const int primitive_i, Vector< int > &prims_to_add)
static int mesh_data_init_primitive_uv_island_ids (MeshData &mesh_data)
static void mesh_data_init (MeshData &mesh_data)

Function Documentation

◆ add_primitive()

◆ add_uv_island()

◆ add_uv_primitive_fill()

◆ add_uv_primitive_shared_uv_edge()

◆ connecting_mesh_primitive_indices()

Vector< int > blender::bke::pbvh::uv_islands::connecting_mesh_primitive_indices ( const UVVertex & uv_vertex)
static

Get a list containing the indices of mesh primitives (primitive of the input mesh), that surround the given uv_vertex in uv-space.

Definition at line 246 of file pbvh_uv_islands.cc.

References blender::Vector< T, InlineBufferCapacity, Allocator >::append_non_duplicates(), blender::bke::pbvh::uv_islands::UVVertex::uv_edges, and blender::bke::pbvh::uv_islands::UVEdge::uv_primitive_indices.

Referenced by blender::bke::pbvh::uv_islands::Fan::mark_already_added_segments().

◆ dilate_tile()

void blender::bke::pbvh::uv_islands::dilate_tile ( UVIslandsMask::Tile & tile,
int max_iterations )
static

Definition at line 1605 of file pbvh_uv_islands.cc.

References dilate_x(), dilate_y(), and tile.

Referenced by blender::bke::pbvh::uv_islands::UVIslandsMask::dilate().

◆ dilate_x()

bool blender::bke::pbvh::uv_islands::dilate_x ( UVIslandsMask::Tile & islands_mask)
static

◆ dilate_y()

bool blender::bke::pbvh::uv_islands::dilate_y ( UVIslandsMask::Tile & islands_mask)
static

◆ extend_at_vert()

void blender::bke::pbvh::uv_islands::extend_at_vert ( const MeshData & mesh_data,
UVIsland & island,
UVBorderCorner & corner,
float min_uv_distance )
static

Definition at line 884 of file pbvh_uv_islands.cc.

References add_uv_primitive_fill(), add_uv_primitive_shared_uv_edge(), blender::bke::pbvh::uv_islands::UVBorderCorner::angle, blender::Vector< T, InlineBufferCapacity, Allocator >::append(), blender::bke::pbvh::uv_islands::Fan::best_path_between(), blender::bke::pbvh::uv_islands::UVBorderEdge::border_index, blender::bke::pbvh::uv_islands::UVIsland::borders, blender::bke::pbvh::uv_islands::UVBorderCorner::connected_in_mesh(), blender::bke::pbvh::uv_islands::MeshData::corner_tris, blender::bke::pbvh::uv_islands::Fan::count_edges_not_added(), blender::bke::pbvh::uv_islands::UVBorderEdge::edge, blender::bke::pbvh::uv_islands::UVBorder::edges, find_fill_primitive(), blender::bke::pbvh::uv_islands::UVBorderCorner::first, blender::bke::pbvh::uv_islands::Fan::flags, blender::bke::pbvh::uv_islands::UVEdge::get_other_uv_vertex(), blender::bke::pbvh::uv_islands::UVPrimitive::get_uv_edge(), blender::bke::pbvh::uv_islands::UVBorderEdge::get_uv_vertex(), blender::bke::pbvh::uv_islands::UVBorderEdge::index, blender::Vector< T, InlineBufferCapacity, Allocator >::index_range(), blender::bke::pbvh::uv_islands::Fan::init_uv_coordinates(), blender::bke::pbvh::uv_islands::Fan::is_manifold, blender::bke::pbvh::uv_islands::UVIsland::lookup_or_create(), blender::bke::pbvh::uv_islands::Fan::mark_already_added_segments(), primitive_get_other_uv_vertex(), blender::bke::pbvh::uv_islands::UVPrimitive::primitive_i, blender::bke::pbvh::uv_islands::UVBorder::remove(), blender::bke::pbvh::uv_islands::UVBorderEdge::reverse_order, blender::bke::pbvh::uv_islands::UVBorderCorner::second, blender::Vector< T, InlineBufferCapacity, Allocator >::size(), blender::bke::pbvh::uv_islands::UVBorder::update_indexes(), blender::bke::pbvh::uv_islands::UVBorderCorner::uv(), blender::bke::pbvh::uv_islands::UVVertex::uv, blender::bke::pbvh::uv_islands::UVBorderEdge::uv_primitive, blender::bke::pbvh::uv_islands::UVIsland::uv_primitives, blender::bke::pbvh::uv_islands::UVVertex::vertex, and blender::bke::pbvh::uv_islands::UVEdge::vertices.

Referenced by blender::bke::pbvh::uv_islands::UVIsland::extend_border().

◆ extract_uv_neighbors()

void blender::bke::pbvh::uv_islands::extract_uv_neighbors ( const MeshData & mesh_data,
const Span< int > uv_island_ids,
const int primitive_i,
Vector< int > & prims_to_add )
static

◆ find_fill_primitive()

◆ get_uv_loop()

int blender::bke::pbvh::uv_islands::get_uv_loop ( const MeshData & mesh_data,
const int3 & tri,
const int vert )
static

◆ mask_resolution_from_tile_resolution()

ushort2 blender::bke::pbvh::uv_islands::mask_resolution_from_tile_resolution ( ushort2 tile_resolution)
static

Definition at line 1477 of file pbvh_uv_islands.cc.

References max_ii().

Referenced by blender::bke::pbvh::uv_islands::UVIslandsMask::Tile::Tile().

◆ mesh_data_init()

void blender::bke::pbvh::uv_islands::mesh_data_init ( MeshData & mesh_data)
static

◆ mesh_data_init_edges()

◆ mesh_data_init_primitive_uv_island_ids()

◆ primitive_get_other_uv_vertex()

int blender::bke::pbvh::uv_islands::primitive_get_other_uv_vertex ( const MeshData & mesh_data,
const int3 & tri,
const int v1,
const int v2 )
static

◆ primitive_has_shared_uv_edge()

bool blender::bke::pbvh::uv_islands::primitive_has_shared_uv_edge ( const Span< float2 > uv_map,
const int3 & tri,
const int3 & tri_other )
static

Definition at line 62 of file pbvh_uv_islands.cc.

Referenced by extract_uv_neighbors().

◆ primitive_uv_bounds()

rctf blender::bke::pbvh::uv_islands::primitive_uv_bounds ( const int3 & tri,
const Span< float2 > uv_map )
static

Definition at line 88 of file pbvh_uv_islands.cc.

References BLI_rctf_do_minmax_v(), BLI_rctf_init_minmax(), and result.

Referenced by add_uv_island().

◆ reset_extendability_flags()

◆ sharpest_border_corner() [1/2]

◆ sharpest_border_corner() [2/2]

std::optional< UVBorderCorner > blender::bke::pbvh::uv_islands::sharpest_border_corner ( UVIsland & island)
static

◆ uv_edge_append_to_uv_vertices()

void blender::bke::pbvh::uv_islands::uv_edge_append_to_uv_vertices ( UVEdge & uv_edge)
static

◆ uv_primitive_append_to_uv_edges()

◆ uv_primitive_append_to_uv_vertices()

void blender::bke::pbvh::uv_islands::uv_primitive_append_to_uv_vertices ( UVPrimitive & uv_primitive)
static

◆ uv_vertex_init_flags()

Variable Documentation

◆ INVALID_UV_ISLAND_ID

int blender::bke::pbvh::uv_islands::INVALID_UV_ISLAND_ID = -1
staticconstexpr