Struct TileCoordinates
pub struct TileCoordinates { pub tile_index: Vec2<usize>, pub level_index: Vec2<usize> }
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
impl TileCoordinates
fn write<W: Write>(&self, write: &mut W) -> UnitResultWithout validation, write this instance to the byte stream.
fn read(read: &mut impl Read) -> Result<Self>Read the value without validating.
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.
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.
fn is_largest_resolution_level(&self) -> boolReturns if this is the original resolution or a smaller copy.
Trait Implementations
impl Clone for TileCoordinates
fn clone(&self) -> Self
impl Copy for TileCoordinates
impl Debug for TileCoordinates
fn fmt(&self, f: &mut Formatter<'_>) -> Result
impl Eq for TileCoordinates
impl Hash for TileCoordinates
fn hash<__H: Hasher>(&self, state: &mut __H)
impl PartialEq for TileCoordinates
fn eq(&self, other: &Self) -> bool