OpenABF 2.1.0
Loading...
Searching...
No Matches
Public Attributes | List of all members
OpenABF::PackOptions< T > Struct Template Reference

Options controlling PackCharts behavior. More...

Public Attributes

bool minimize_bounding_box {true}
 Rotate each chart in-plane to minimize its bounding-box area.
 
bool normalize {false}
 Fit the packed atlas into the unit square [0,1]^2
 
std::optional< T > target_width {}
 Target shelf width; overrides the sqrt(total area) heuristic.
 
padding {T(0)}
 Gutter added around every chart, in chart/absolute units.
 

Detailed Description

template<typename T>
struct OpenABF::PackOptions< T >

Options controlling PackCharts behavior.

Template Parameters
TFloating-point scalar type
Examples
MultiChartFlatten.cpp.

Member Data Documentation

◆ minimize_bounding_box

template<typename T >
bool OpenABF::PackOptions< T >::minimize_bounding_box {true}

Rotate each chart in-plane to minimize its bounding-box area.

When true (default), each chart is rotated within its UV plane before layout so its axis-aligned bounding box has minimum area, then stood on its long axis (larger extent vertical) to match the tallest-first shelf strategy. Shelf packing works on axis-aligned boxes, so tightening and consistently orienting each box lets charts nest more densely. The rotation is applied in place and preserves topology and vertex identity, so any back-maps a caller holds remain valid.

◆ normalize

template<typename T >
bool OpenABF::PackOptions< T >::normalize {false}

Fit the packed atlas into the unit square [0,1]^2

When false (default), charts keep their absolute (physical) scale and are only translated. When true, a single global uniform scale is applied after layout so the whole atlas fits in [0,1]^2. A single global factor preserves relative chart sizes and cross-chart texel density; only the absolute units change.

Examples
MultiChartFlatten.cpp.

◆ padding

template<typename T >
T OpenABF::PackOptions< T >::padding {T(0)}

Gutter added around every chart, in chart/absolute units.

Applied on all four sides of each chart, including against the atlas boundary, so perimeter charts are inset from the returned extent by padding as well – not merely separated from their neighbors. Defaults to 0 (charts laid out flush). padding is in absolute chart units and is applied before any normalize scaling. Must be non-negative.

Examples
MultiChartFlatten.cpp.

◆ target_width

template<typename T >
std::optional<T> OpenABF::PackOptions< T >::target_width {}

Target shelf width; overrides the sqrt(total area) heuristic.

Charts wrap to a new shelf when a row would exceed this width. If unset, the width defaults to sqrt(sum of per-chart bounding-box areas), which yields a roughly square atlas. Must be positive when set.