Blender V4.3
blender::bke::pbvh::uv_islands::Fan Struct Reference

Public Member Functions

 Fan (const MeshData &mesh_data, const int vertex)
 
int count_edges_not_added () const
 
void mark_already_added_segments (const UVVertex &uv_vertex)
 
void init_uv_coordinates (const MeshData &mesh_data, UVVertex &uv_vertex)
 
bool contains_vertex_on_outside (const MeshData &mesh_data, const int vertex_index) const
 
Vector< FanSegment * > best_path_between (const MeshData &mesh_data, const int from_vertex, const int to_vertex)
 
void print_debug (const MeshData &mesh_data) const
 

Static Public Member Functions

static bool is_path_valid (const Span< FanSegment * > path, const MeshData &mesh_data, const int from_vertex, const int to_vertex)
 
static Vector< FanSegment * > path_between (const Span< FanSegment * > edge_order, const MeshData &mesh_data, const int from_vertex, const int to_vertex, const bool reversed)
 
static int64_t score (const Span< FanSegment * > solution)
 

Public Attributes

Vector< FanSegmentsegments
 
struct { 
 
   bool   is_manifold: 1 
 
flags 
 

Detailed Description

Definition at line 558 of file pbvh_uv_islands.cc.

Constructor & Destructor Documentation

◆ Fan()

Member Function Documentation

◆ best_path_between()

Vector< FanSegment * > blender::bke::pbvh::uv_islands::Fan::best_path_between ( const MeshData & mesh_data,
const int from_vertex,
const int to_vertex )
inline

◆ contains_vertex_on_outside()

bool blender::bke::pbvh::uv_islands::Fan::contains_vertex_on_outside ( const MeshData & mesh_data,
const int vertex_index ) const
inline

Check if the given vertex is part of the outside of the fan. Return true if the given vertex is found on the outside of the fan, otherwise returns false.

Definition at line 662 of file pbvh_uv_islands.cc.

References blender::bke::pbvh::uv_islands::MeshData::corner_verts, segments, and v2.

Referenced by best_path_between().

◆ count_edges_not_added()

int blender::bke::pbvh::uv_islands::Fan::count_edges_not_added ( ) const
inline

Definition at line 611 of file pbvh_uv_islands.cc.

References result, and segments.

Referenced by blender::bke::pbvh::uv_islands::extend_at_vert().

◆ init_uv_coordinates()

◆ is_path_valid()

static bool blender::bke::pbvh::uv_islands::Fan::is_path_valid ( const Span< FanSegment * > path,
const MeshData & mesh_data,
const int from_vertex,
const int to_vertex )
inlinestatic

Definition at line 675 of file pbvh_uv_islands.cc.

References blender::bke::pbvh::uv_islands::MeshData::corner_verts, ELEM, and v2.

Referenced by best_path_between().

◆ mark_already_added_segments()

void blender::bke::pbvh::uv_islands::Fan::mark_already_added_segments ( const UVVertex & uv_vertex)
inline

◆ path_between()

static Vector< FanSegment * > blender::bke::pbvh::uv_islands::Fan::path_between ( const Span< FanSegment * > edge_order,
const MeshData & mesh_data,
const int from_vertex,
const int to_vertex,
const bool reversed )
inlinestatic

Find the closest path over the fan between from_vertex and to_vertex. The result contains exclude the starting and final edge.

Algorithm only uses the winding order of the given fan segments.

Definition at line 698 of file pbvh_uv_islands.cc.

References blender::bke::pbvh::uv_islands::MeshData::corner_verts, blender::Vector< T, InlineBufferCapacity, Allocator >::reserve(), result, blender::Span< T >::size(), and v2.

Referenced by best_path_between().

◆ print_debug()

void blender::bke::pbvh::uv_islands::Fan::print_debug ( const MeshData & mesh_data) const
inline

Definition at line 791 of file pbvh_uv_islands.cc.

References segments.

◆ score()

static int64_t blender::bke::pbvh::uv_islands::Fan::score ( const Span< FanSegment * > solution)
inlinestatic

Score the given solution to be the best. Best solution would have the lowest score.

Score is determined by counting the number of steps and subtracting that with steps that have not yet been visited.

Definition at line 741 of file pbvh_uv_islands.cc.

References blender::Span< T >::size().

Referenced by best_path_between().

Member Data Documentation

◆ [struct]

struct { ... } blender::bke::pbvh::uv_islands::Fan::flags

◆ is_manifold

bool blender::bke::pbvh::uv_islands::Fan::is_manifold

Do all segments of the fan make a full fan, or are there parts missing. Non manifold meshes can have missing parts.

Definition at line 567 of file pbvh_uv_islands.cc.

Referenced by blender::bke::pbvh::uv_islands::extend_at_vert().

◆ segments


The documentation for this struct was generated from the following file: