pub struct Affine(pub [f64; 6]);Expand description
[x0, dx, rx, y0, ry, dy], as GDAL and vaster order them:
x = x0 + col * dx + row * rx
y = y0 + col * ry + row * dy(col, row) are continuous index coordinates (0 is the outer edge of
the first cell). Rotation and shear terms (rx, ry) are allowed.
Tuple Fields§
§0: [f64; 6]Implementations§
Source§impl Affine
impl Affine
Sourcepub fn from_extent(extent: [f64; 4], dim: [usize; 2]) -> Self
pub fn from_extent(extent: [f64; 4], dim: [usize; 2]) -> Self
From an extent [xmin, xmax, ymin, ymax] and dimension
[ncol, nrow], north up (row 0 at ymax).
Sourcepub fn extent(&self, dim: [usize; 2]) -> [f64; 4]
pub fn extent(&self, dim: [usize; 2]) -> [f64; 4]
The extent [xmin, xmax, ymin, ymax] covered by dim cells, for an
axis-aligned transform.
pub fn forward(&self, col: f64, row: f64) -> (f64, f64)
pub fn inverse(&self) -> Option<Affine>
pub fn is_axis_aligned(&self) -> bool
Trait Implementations§
impl Copy for Affine
impl StructuralPartialEq for Affine
Auto Trait Implementations§
impl Freeze for Affine
impl RefUnwindSafe for Affine
impl Send for Affine
impl Sync for Affine
impl Unpin for Affine
impl UnsafeUnpin for Affine
impl UnwindSafe for Affine
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