Blender V4.3
blender::geometry::UVMinimumEnclosingSquareFinder Class Reference

Public Member Functions

 UVMinimumEnclosingSquareFinder (const float scale, const float margin, const UVPackIsland_Params *params)
 
float update (const double angle)
 
void update_recursive (const float angle0, const float quad0, const float angle1, const float quad1)
 

Public Attributes

const float scale_
 
const float margin_
 
const UVPackIsland_Paramsparams_
 
float best_quad
 
float best_angle
 
rctf best_bounds
 
Vector< float2points
 
Vector< intindices
 

Detailed Description

Helper to find the minimum enclosing square.

Definition at line 1438 of file uv_pack.cc.

Constructor & Destructor Documentation

◆ UVMinimumEnclosingSquareFinder()

blender::geometry::UVMinimumEnclosingSquareFinder::UVMinimumEnclosingSquareFinder ( const float scale,
const float margin,
const UVPackIsland_Params * params )
inline

Definition at line 1451 of file uv_pack.cc.

References best_angle, and best_quad.

Member Function Documentation

◆ update()

float blender::geometry::UVMinimumEnclosingSquareFinder::update ( const double angle)
inline

Calculates the square associated with a rotation of angle.

Returns
Size of square.

Definition at line 1463 of file uv_pack.cc.

References angle(), best_angle, best_bounds, best_quad, BLI_rctf_do_minmax_v(), BLI_rctf_init_minmax(), cos(), blender::geometry::get_aspect_scaled_extent(), margin_, params_, rctf::xmax, rctf::xmin, rctf::ymax, and rctf::ymin.

Referenced by blender::geometry::rotate_inside_square(), and update_recursive().

◆ update_recursive()

void blender::geometry::UVMinimumEnclosingSquareFinder::update_recursive ( const float angle0,
const float quad0,
const float angle1,
const float quad1 )
inline

Search between angle0 and angle1, looking for the smallest square.

Definition at line 1489 of file uv_pack.cc.

References DEG2RADF, update(), and update_recursive().

Referenced by blender::geometry::rotate_inside_square(), and update_recursive().

Member Data Documentation

◆ best_angle

float blender::geometry::UVMinimumEnclosingSquareFinder::best_angle

◆ best_bounds

rctf blender::geometry::UVMinimumEnclosingSquareFinder::best_bounds

Definition at line 1446 of file uv_pack.cc.

Referenced by blender::geometry::rotate_inside_square(), and update().

◆ best_quad

float blender::geometry::UVMinimumEnclosingSquareFinder::best_quad

◆ indices

Vector<int> blender::geometry::UVMinimumEnclosingSquareFinder::indices

Definition at line 1449 of file uv_pack.cc.

Referenced by blender::geometry::rotate_inside_square().

◆ margin_

const float blender::geometry::UVMinimumEnclosingSquareFinder::margin_

Definition at line 1441 of file uv_pack.cc.

Referenced by update().

◆ params_

const UVPackIsland_Params* blender::geometry::UVMinimumEnclosingSquareFinder::params_

Definition at line 1442 of file uv_pack.cc.

Referenced by update().

◆ points

Vector<float2> blender::geometry::UVMinimumEnclosingSquareFinder::points

Definition at line 1448 of file uv_pack.cc.

Referenced by blender::geometry::rotate_inside_square().

◆ scale_

const float blender::geometry::UVMinimumEnclosingSquareFinder::scale_

Definition at line 1440 of file uv_pack.cc.


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