pub struct Options {
pub max_chart_angle: f32,
pub max_area_distortion: f32,
pub density: Density,
pub padding: u32,
pub allow_rotation: bool,
pub packing: Packing,
pub max_chart_size: u32,
pub block_align: bool,
}Expand description
Unwrapping options. Fields added in future versions will always have
defaults, so Options { padding: 4, ..Default::default() } keeps
compiling.
Fields§
§max_chart_angle: f32Maximum angle in degrees between a face normal and its chart’s average
normal. Lower values give flatter charts but more seams. Must be in
(0, 90). Default 70.
max_area_distortion: f32Maximum allowed ratio between a triangle’s relative UV area and its
relative surface area (in either direction). Charts exceeding it are
split. Must be >= 1. Default 4.
density: DensityTexel density and page size. Default Density::Auto with 1024-texel
pages.
padding: u32Empty texels around each chart, to avoid bleeding when filtering or
generating mipmaps: charts are at least 2 × padding texels apart and
padding texels from the page edges. Default 2.
allow_rotation: boolAllow rotating charts by multiples of 90° during packing. Rotations
never mirror. Default true.
packing: PackingPacking algorithm. Default Packing::Shape.
max_chart_size: u32Largest chart width or height in texels, excluding padding (0: no
limit). Bigger charts are scaled down to fit instead of growing the page
or failing, so they get a lower texel density than the rest. Default 0.
block_align: boolAlign charts to 4×4 texel blocks: every chart, with its padding,
occupies whole blocks at block-aligned positions and no two charts share
a block, so block-compressed (BC/ASTC 4×4) atlases don’t bleed between
charts. Page sizes become multiples of 4; a page_size must be one.
Default false.
Trait Implementations§
impl Copy for Options
impl StructuralPartialEq for Options
Auto Trait Implementations§
impl Freeze for Options
impl RefUnwindSafe for Options
impl Send for Options
impl Sync for Options
impl Unpin for Options
impl UnsafeUnpin for Options
impl UnwindSafe for Options
Blanket Implementations§
impl<T> Boilerplate for T
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more