Struct exr::block::chunk::TileCoordinates
source · pub struct TileCoordinates {
pub tile_index: Vec2<usize>,
pub level_index: Vec2<usize>,
}
Expand description
Indicates the position and resolution level of a TileBlock
or DeepTileBlock
.
Fields§
§tile_index: Vec2<usize>
Index of the tile, not pixel position.
level_index: Vec2<usize>
Index of the Mip/Rip level.
Implementations§
source§impl TileCoordinates
impl TileCoordinates
sourcepub fn write<W: Write>(&self, write: &mut W) -> UnitResult
pub fn write<W: Write>(&self, write: &mut W) -> UnitResult
Without validation, write this instance to the byte stream.
sourcepub fn to_data_indices(
&self,
tile_size: Vec2<usize>,
max: Vec2<usize>,
) -> Result<IntegerBounds>
pub fn to_data_indices( &self, tile_size: Vec2<usize>, max: Vec2<usize>, ) -> Result<IntegerBounds>
The indices which can be used to index into the arrays of a data window. These coordinates are only valid inside the corresponding one header. Will start at 0 and always be positive.
sourcepub fn to_absolute_indices(
&self,
tile_size: Vec2<usize>,
data_window: IntegerBounds,
) -> Result<IntegerBounds>
pub fn to_absolute_indices( &self, tile_size: Vec2<usize>, data_window: IntegerBounds, ) -> Result<IntegerBounds>
Absolute coordinates inside the global 2D space of a file, may be negative.
sourcepub fn is_largest_resolution_level(&self) -> bool
pub fn is_largest_resolution_level(&self) -> bool
Returns if this is the original resolution or a smaller copy.
Trait Implementations§
source§impl Clone for TileCoordinates
impl Clone for TileCoordinates
source§fn clone(&self) -> TileCoordinates
fn clone(&self) -> TileCoordinates
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for TileCoordinates
impl Debug for TileCoordinates
source§impl Hash for TileCoordinates
impl Hash for TileCoordinates
source§impl PartialEq for TileCoordinates
impl PartialEq for TileCoordinates
source§fn eq(&self, other: &TileCoordinates) -> bool
fn eq(&self, other: &TileCoordinates) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Copy for TileCoordinates
impl Eq for TileCoordinates
impl StructuralPartialEq for TileCoordinates
Auto Trait Implementations§
impl Freeze for TileCoordinates
impl RefUnwindSafe for TileCoordinates
impl Send for TileCoordinates
impl Sync for TileCoordinates
impl Unpin for TileCoordinates
impl UnwindSafe for TileCoordinates
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