pub struct AtlasLayerDiagnostics {
pub atlas_id: AtlasId,
pub total_area: u64,
pub free_area: u64,
pub free_rectangle_count: usize,
pub largest_free_width: u32,
pub largest_free_height: u32,
}Expand description
Free-space details for one atlas texture-array layer.
Fields§
§atlas_id: AtlasIdThe atlas represented by this layer.
total_area: u64The total layer area, in texels.
free_area: u64The total free layer area, in texels.
free_rectangle_count: usizeThe number of disjoint free rectangles in the layer.
largest_free_width: u32The width of the largest free rectangle by area.
largest_free_height: u32The height of the largest free rectangle by area.
Implementations§
Source§impl AtlasLayerDiagnostics
impl AtlasLayerDiagnostics
Sourcepub fn utilization_percentage(&self) -> f64
pub fn utilization_percentage(&self) -> f64
Calculate layer utilization as a percentage from 0 to 100.
Sourcepub fn fragmentation_percentage(&self) -> f64
pub fn fragmentation_percentage(&self) -> f64
Calculate layer fragmentation as a percentage from 0 to 100.
Trait Implementations§
Source§impl Clone for AtlasLayerDiagnostics
impl Clone for AtlasLayerDiagnostics
Source§fn clone(&self) -> AtlasLayerDiagnostics
fn clone(&self) -> AtlasLayerDiagnostics
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for AtlasLayerDiagnostics
impl RefUnwindSafe for AtlasLayerDiagnostics
impl Send for AtlasLayerDiagnostics
impl Sync for AtlasLayerDiagnostics
impl Unpin for AtlasLayerDiagnostics
impl UnsafeUnpin for AtlasLayerDiagnostics
impl UnwindSafe for AtlasLayerDiagnostics
Blanket Implementations§
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
Mutably borrows from an owned value. Read more