Blender V5.0
blender::geometry::Occupancy Class Reference

Public Member Functions

 Occupancy (const float initial_scale)
void increase_scale ()
void clear ()
float trace_triangle (const float2 &uv0, const float2 &uv1, const float2 &uv2, const float margin, const bool write) const
float trace_island (const PackIsland *island, const UVPhi phi, const float scale, const float margin, const bool write) const

Public Attributes

int bitmap_radix = 800
float bitmap_scale_reciprocal = 1.0f

Detailed Description

Helper class for the xatlas strategy. Accelerates geometry queries by approximating exact queries with a bitmap. Includes some book keeping variables to simplify the algorithm.

Note
The last entry, (width-1, height-1) is named the "top-right".

Definition at line 1124 of file uv_pack.cc.

Constructor & Destructor Documentation

◆ Occupancy()

blender::geometry::Occupancy::Occupancy ( const float initial_scale)

Definition at line 1157 of file uv_pack.cc.

References bitmap_radix, bitmap_scale_reciprocal, false, and increase_scale().

Member Function Documentation

◆ clear()

void blender::geometry::Occupancy::clear ( )

Definition at line 1171 of file uv_pack.cc.

References bitmap_radix, and i.

Referenced by increase_scale(), and blender::geometry::pack_island_xatlas().

◆ increase_scale()

void blender::geometry::Occupancy::increase_scale ( )

Definition at line 1163 of file uv_pack.cc.

References bitmap_scale_reciprocal, BLI_assert, and clear().

Referenced by Occupancy(), and blender::geometry::pack_island_xatlas().

◆ trace_island()

◆ trace_triangle()

float blender::geometry::Occupancy::trace_triangle ( const float2 & uv0,
const float2 & uv1,
const float2 & uv2,
const float margin,
const bool write ) const

Member Data Documentation

◆ bitmap_radix

int blender::geometry::Occupancy::bitmap_radix = 800

◆ bitmap_scale_reciprocal

float blender::geometry::Occupancy::bitmap_scale_reciprocal = 1.0f

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