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

Classes

struct  [struct].flags

Public Member Functions

 Fan (const MeshData &mesh_data, const int vert)
int count_edges_not_added () const
void mark_already_added_segments (const UVIsland &uv_island, const UVVert &uv_vert)
bool contains_vert_on_outside (const MeshData &mesh_data, const int vert) const
Vector< FanSegment * > best_path_between (const MeshData &mesh_data, const int from_vert, const int to_vert)
void print_debug (const MeshData &mesh_data) const

Static Public Member Functions

static int2 other_fan_edge_verts (const MeshData &mesh_data, const int vert, const int tri_i)
static int adjacent_tri (const MeshData &mesh_data, const Span< int > tris, const int vert, const int other_vert, const int tri_i)
static bool is_path_valid (const Span< FanSegment * > path, const MeshData &mesh_data, const int from_vert, const int to_vert)
static Vector< FanSegment * > path_between (const Span< FanSegment * > edge_order, const MeshData &mesh_data, const int from_vert, const int to_vert, const bool reversed)
static int64_t score (const Span< FanSegment * > solution)

Public Attributes

Vector< FanSegment > segments
struct  flags

Detailed Description

Definition at line 437 of file pbvh_uv_islands.cc.

Constructor & Destructor Documentation

◆ Fan()

Member Function Documentation

◆ adjacent_tri()

int blender::bke::pbvh::uv_islands::Fan::adjacent_tri ( const MeshData & mesh_data,
const Span< int > tris,
const int vert,
const int other_vert,
const int tri_i )
inlinestatic

Definition at line 466 of file pbvh_uv_islands.cc.

References blender::result, and blender::bke::pbvh::uv_islands::tri_contains_verts().

Referenced by Fan().

◆ best_path_between()

◆ contains_vert_on_outside()

bool blender::bke::pbvh::uv_islands::Fan::contains_vert_on_outside ( const MeshData & mesh_data,
const int vert ) 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 562 of file pbvh_uv_islands.cc.

References blender::bke::pbvh::uv_islands::MeshData::corner_verts, segments, and blender::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 531 of file pbvh_uv_islands.cc.

References blender::result, and segments.

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

◆ is_path_valid()

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

◆ mark_already_added_segments()

void blender::bke::pbvh::uv_islands::Fan::mark_already_added_segments ( const UVIsland & uv_island,
const UVVert & uv_vert )
inline

◆ other_fan_edge_verts()

int2 blender::bke::pbvh::uv_islands::Fan::other_fan_edge_verts ( const MeshData & mesh_data,
const int vert,
const int tri_i )
inlinestatic

◆ path_between()

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

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

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

Definition at line 598 of file pbvh_uv_islands.cc.

References blender::bke::pbvh::uv_islands::MeshData::corner_verts, blender::result, blender::Span< T >::size(), and blender::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 691 of file pbvh_uv_islands.cc.

References segments.

◆ score()

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

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

Referenced by best_path_between().

Member Data Documentation

◆ flags

struct blender::bke::pbvh::uv_islands::Fan::[struct].flags blender::bke::pbvh::uv_islands::Fan::flags

◆ segments

Vector<FanSegment> blender::bke::pbvh::uv_islands::Fan::segments

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