|
Blender V4.3
|
#include <GEO_uv_pack.hh>
Public Member Functions | |
| PackIsland () | |
| void | add_triangle (float2 uv0, float2 uv1, float2 uv2) |
| void | add_polygon (Span< float2 > uvs, MemArena *arena, Heap *heap) |
| void | build_transformation (float scale, double rotation, float r_matrix[2][2]) const |
| void | build_inverse_transformation (float scale, double rotation, float r_matrix[2][2]) const |
| float2 | get_diagonal_support (float scale, float rotation, float margin) const |
| float2 | get_diagonal_support_d4 (float scale, float rotation, float margin) const |
| void | place_ (float scale, UVPhi phi) |
| void | finalize_geometry_ (const UVPackIsland_Params ¶ms, MemArena *arena, Heap *heap) |
| bool | can_rotate_before_pack_ (const UVPackIsland_Params ¶ms) const |
| bool | can_rotate_ (const UVPackIsland_Params ¶ms) const |
| bool | can_scale_ (const UVPackIsland_Params ¶ms) const |
| bool | can_translate_ (const UVPackIsland_Params ¶ms) const |
Public Attributes | |
| float | aspect_y |
| bool | pinned |
| float2 | pre_translate |
| float | angle |
| int | caller_index |
| float2 | pivot_ |
| float2 | half_diagonal_ |
| float | pre_rotate_ |
| Vector< float2 > | triangle_vertices_ |
Friends | |
| class | Occupancy |
| class | OverlapMerger |
Definition at line 121 of file GEO_uv_pack.hh.
| blender::geometry::PackIsland::PackIsland | ( | ) |
Definition at line 136 of file uv_pack.cc.
References aspect_y, caller_index, half_diagonal_, pinned, pivot_, pre_rotate_, and pre_translate.
| void blender::geometry::PackIsland::add_polygon | ( | Span< float2 > | uvs, |
| MemArena * | arena, | ||
| Heap * | heap ) |
Definition at line 164 of file uv_pack.cc.
References add_triangle(), BLI_assert, BLI_heap_clear(), BLI_memarena_alloc(), BLI_polyfill_beautify(), BLI_polyfill_calc_arena(), blender::Span< T >::data(), float, int, and blender::Span< T >::size().
Referenced by finalize_geometry_(), and uvedit_pack_islands_multi().
Definition at line 149 of file uv_pack.cc.
References blender::geometry::dist_signed_squared_to_edge(), and triangle_vertices_.
Referenced by blender::geometry::OverlapMerger::add_geometry(), add_polygon(), and blender::geometry::uv_parametrizer_pack().
| void blender::geometry::PackIsland::build_inverse_transformation | ( | float | scale, |
| double | rotation, | ||
| float | r_matrix[2][2] ) const |
Definition at line 2369 of file uv_pack.cc.
References cos(), and reflect().
Referenced by place_().
| void blender::geometry::PackIsland::build_transformation | ( | float | scale, |
| double | rotation, | ||
| float | r_matrix[2][2] ) const |
Definition at line 2351 of file uv_pack.cc.
References cos(), and reflect().
Referenced by blender::geometry::find_best_fit_for_island(), get_diagonal_support(), blender::geometry::rotate_inside_square(), blender::geometry::Occupancy::trace_island(), blender::geometry::uv_parametrizer_pack(), and uvedit_pack_islands_multi().
| bool blender::geometry::PackIsland::can_rotate_ | ( | const UVPackIsland_Params & | params | ) | const |
Definition at line 2423 of file uv_pack.cc.
References blender::geometry::can_rotate_with_method(), and params.
Referenced by blender::geometry::pack_island_xatlas().
| bool blender::geometry::PackIsland::can_rotate_before_pack_ | ( | const UVPackIsland_Params & | params | ) | const |
Check that rotation is allowed before packing, where the island may rotated to a desired orientation but not as part of packing. Needed for X/Y axis alignment to be supported.
Definition at line 2414 of file uv_pack.cc.
References blender::geometry::can_rotate_with_method(), ED_UVPACK_ROTATION_AXIS_ALIGNED, ED_UVPACK_ROTATION_AXIS_ALIGNED_X, ED_UVPACK_ROTATION_AXIS_ALIGNED_Y, ELEM, and params.
| bool blender::geometry::PackIsland::can_scale_ | ( | const UVPackIsland_Params & | params | ) | const |
Definition at line 2428 of file uv_pack.cc.
References ED_UVPACK_PIN_LOCK_ALL, ED_UVPACK_PIN_LOCK_ROTATION_SCALE, ED_UVPACK_PIN_LOCK_SCALE, and params.
Referenced by blender::geometry::pack_island_xatlas(), blender::geometry::pack_islands_margin_fraction(), blender::geometry::pack_islands_scale_margin(), blender::geometry::rotate_inside_square(), blender::geometry::uv_parametrizer_pack(), and uvedit_pack_islands_multi().
| bool blender::geometry::PackIsland::can_translate_ | ( | const UVPackIsland_Params & | params | ) | const |
Definition at line 2446 of file uv_pack.cc.
References ED_UVPACK_PIN_LOCK_ALL, and params.
Referenced by blender::geometry::pack_island_xatlas().
| void blender::geometry::PackIsland::finalize_geometry_ | ( | const UVPackIsland_Params & | params, |
| MemArena * | arena, | ||
| Heap * | heap ) |
Definition at line 324 of file uv_pack.cc.
References add_polygon(), BLI_assert, BLI_convexhull_2d(), BLI_heap_len(), BLI_memarena_alloc(), ED_UVPACK_SHAPE_CONVEX, float, int, params, and triangle_vertices_.
| float2 blender::geometry::PackIsland::get_diagonal_support | ( | float | scale, |
| float | rotation, | ||
| float | margin ) const |
Definition at line 1280 of file uv_pack.cc.
References aspect_y, build_transformation(), DEG2RADF, fabsf, half_diagonal_, and mul_v2_m2v2().
Referenced by blender::geometry::find_best_fit_for_island(), blender::geometry::pack_island_xatlas(), and blender::geometry::Occupancy::trace_island().
| float2 blender::geometry::PackIsland::get_diagonal_support_d4 | ( | float | scale, |
| float | rotation, | ||
| float | margin ) const |
Definition at line 401 of file uv_pack.cc.
References build_inverse_transformation(), mul_m2_v2(), mul_v2_m2v2(), pivot_, pre_rotate_, and pre_translate.
Referenced by blender::geometry::pack_islands_margin_fraction().
|
friend |
Definition at line 169 of file GEO_uv_pack.hh.
|
friend |
Definition at line 170 of file GEO_uv_pack.hh.
| float blender::geometry::PackIsland::angle |
Output angle in radians.
Definition at line 132 of file GEO_uv_pack.hh.
Referenced by blender::geometry::OverlapMerger::pack_islands_overlap(), blender::geometry::uv_parametrizer_pack(), and uvedit_pack_islands_multi().
| float blender::geometry::PackIsland::aspect_y |
Aspect ratio, required for rotation.
Definition at line 126 of file GEO_uv_pack.hh.
Referenced by get_diagonal_support(), blender::geometry::pack_islands_scale_margin(), PackIsland(), blender::geometry::rotate_inside_square(), blender::geometry::uv_parametrizer_pack(), and uvedit_pack_islands_multi().
| int blender::geometry::PackIsland::caller_index |
Unchanged by pack_islands, used by caller.
Definition at line 134 of file GEO_uv_pack.hh.
Referenced by PackIsland(), blender::geometry::uv_parametrizer_pack(), and uvedit_pack_islands_multi().
| float2 blender::geometry::PackIsland::half_diagonal_ |
Half of the diagonal of the AABB.
Definition at line 148 of file GEO_uv_pack.hh.
Referenced by get_diagonal_support(), blender::geometry::guess_initial_scale(), blender::geometry::pack_islands_scale_margin(), and PackIsland().
| bool blender::geometry::PackIsland::pinned |
Are any of the UVs pinned?
Definition at line 128 of file GEO_uv_pack.hh.
Referenced by blender::geometry::can_rotate_with_method(), blender::geometry::OverlapMerger::pack_islands_overlap(), PackIsland(), blender::geometry::uv_parametrizer_pack(), and uvedit_pack_islands_multi().
| float2 blender::geometry::PackIsland::pivot_ |
Center of AABB and inside-or-touching the convex hull.
Definition at line 146 of file GEO_uv_pack.hh.
Referenced by blender::geometry::pack_island_xatlas(), PackIsland(), place_(), blender::geometry::rotate_inside_square(), and blender::geometry::Occupancy::trace_island().
| float blender::geometry::PackIsland::pre_rotate_ |
Definition at line 149 of file GEO_uv_pack.hh.
Referenced by blender::geometry::OverlapMerger::pack_islands_overlap(), PackIsland(), and place_().
| float2 blender::geometry::PackIsland::pre_translate |
Output pre-translation.
Definition at line 130 of file GEO_uv_pack.hh.
Referenced by blender::geometry::OverlapMerger::pack_islands_overlap(), PackIsland(), place_(), blender::geometry::uv_parametrizer_pack(), and uvedit_pack_islands_multi().
Definition at line 163 of file GEO_uv_pack.hh.
Referenced by blender::geometry::OverlapMerger::add_geometry(), add_triangle(), finalize_geometry_(), blender::geometry::rotate_inside_square(), and blender::geometry::Occupancy::trace_island().