Blender V4.3
blender::bke::pbvh::uv_islands Namespace Reference

Classes

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

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< intconnecting_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()

static 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 245 of file pbvh_uv_islands.cc.

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

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

◆ dilate_tile()

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

Definition at line 1620 of file pbvh_uv_islands.cc.

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

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

◆ dilate_x()

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

◆ dilate_y()

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

◆ extend_at_vert()

static 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 891 of file pbvh_uv_islands.cc.

References add_uv_primitive_fill(), add_uv_primitive_shared_uv_edge(), blender::Vector< T, InlineBufferCapacity, Allocator >::append(), blender::bke::pbvh::uv_islands::Fan::best_path_between(), blender::bke::pbvh::uv_islands::UVIsland::borders, 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::Fan::flags, blender::bke::pbvh::uv_islands::UVEdge::get_other_uv_vertex(), blender::bke::pbvh::uv_islands::UVPrimitive::get_uv_edge(), 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::UVBorder::remove(), blender::bke::pbvh::uv_islands::UVBorderEdge::reverse_order, blender::Vector< T, InlineBufferCapacity, Allocator >::size(), blender::bke::pbvh::uv_islands::UVBorder::update_indexes(), 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()

static 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()

static int blender::bke::pbvh::uv_islands::find_fill_primitive ( const MeshData & mesh_data,
UVBorderCorner & corner )
static

◆ get_uv_loop()

static 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()

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

Definition at line 1490 of file pbvh_uv_islands.cc.

References max_ii().

◆ mesh_data_init()

static 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()

static 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()

static 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 61 of file pbvh_uv_islands.cc.

Referenced by extract_uv_neighbors().

◆ primitive_uv_bounds()

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

Definition at line 87 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()

static void blender::bke::pbvh::uv_islands::reset_extendability_flags ( UVIsland & island)
static

◆ sharpest_border_corner() [1/2]

◆ sharpest_border_corner() [2/2]

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

◆ uv_edge_append_to_uv_vertices()

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

◆ uv_primitive_append_to_uv_edges()

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

◆ uv_primitive_append_to_uv_vertices()

static 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