pub struct Cartesian3d<X: Ranged, Y: Ranged, Z: Ranged> { /* private fields */ }
Expand description
A 3D cartesian coordinate system
Implementations§
Source§impl<X: Ranged, Y: Ranged, Z: Ranged> Cartesian3d<X, Y, Z>
impl<X: Ranged, Y: Ranged, Z: Ranged> Cartesian3d<X, Y, Z>
Sourcepub fn with_projection<SX: Into<X>, SY: Into<Y>, SZ: Into<Z>, F: FnOnce(ProjectionMatrixBuilder) -> ProjectionMatrix>(
logic_x: SX,
logic_y: SY,
logic_z: SZ,
(actual_x, actual_y): (Range<i32>, Range<i32>),
build_projection_matrix: F,
) -> Self
pub fn with_projection<SX: Into<X>, SY: Into<Y>, SZ: Into<Z>, F: FnOnce(ProjectionMatrixBuilder) -> ProjectionMatrix>( logic_x: SX, logic_y: SY, logic_z: SZ, (actual_x, actual_y): (Range<i32>, Range<i32>), build_projection_matrix: F, ) -> Self
Creates a Cartesian3d object with the given projection.
Sourcepub fn set_coord_pixel_range(
&mut self,
actual_x: Range<i32>,
actual_y: Range<i32>,
coord_size: (i32, i32, i32),
) -> &mut Self
pub fn set_coord_pixel_range( &mut self, actual_x: Range<i32>, actual_y: Range<i32>, coord_size: (i32, i32, i32), ) -> &mut Self
Sets the pixel sizes and projections according to the given ranges.
Sourcepub fn set_projection<F: FnOnce(ProjectionMatrixBuilder) -> ProjectionMatrix>(
&mut self,
actual_x: Range<i32>,
actual_y: Range<i32>,
f: F,
) -> &mut Self
pub fn set_projection<F: FnOnce(ProjectionMatrixBuilder) -> ProjectionMatrix>( &mut self, actual_x: Range<i32>, actual_y: Range<i32>, f: F, ) -> &mut Self
Set the projection matrix
Sourcepub fn new<SX: Into<X>, SY: Into<Y>, SZ: Into<Z>>(
logic_x: SX,
logic_y: SY,
logic_z: SZ,
(actual_x, actual_y): (Range<i32>, Range<i32>),
) -> Self
pub fn new<SX: Into<X>, SY: Into<Y>, SZ: Into<Z>>( logic_x: SX, logic_y: SY, logic_z: SZ, (actual_x, actual_y): (Range<i32>, Range<i32>), ) -> Self
Create a new coordinate
Sourcepub fn projection(&self) -> &ProjectionMatrix
pub fn projection(&self) -> &ProjectionMatrix
Get the projection matrix
Trait Implementations§
Source§impl<X: Clone + Ranged, Y: Clone + Ranged, Z: Clone + Ranged> Clone for Cartesian3d<X, Y, Z>
impl<X: Clone + Ranged, Y: Clone + Ranged, Z: Clone + Ranged> Clone for Cartesian3d<X, Y, Z>
Source§fn clone(&self) -> Cartesian3d<X, Y, Z>
fn clone(&self) -> Cartesian3d<X, Y, Z>
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<X: Ranged, Y: Ranged, Z: Ranged> CoordTranslate for Cartesian3d<X, Y, Z>
impl<X: Ranged, Y: Ranged, Z: Ranged> CoordTranslate for Cartesian3d<X, Y, Z>
Auto Trait Implementations§
impl<X, Y, Z> Freeze for Cartesian3d<X, Y, Z>
impl<X, Y, Z> RefUnwindSafe for Cartesian3d<X, Y, Z>
impl<X, Y, Z> Send for Cartesian3d<X, Y, Z>
impl<X, Y, Z> Sync for Cartesian3d<X, Y, Z>
impl<X, Y, Z> Unpin for Cartesian3d<X, Y, Z>
impl<X, Y, Z> UnwindSafe for Cartesian3d<X, Y, Z>
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Layout§
Note: Unable to compute type layout, possibly due to this type having generic parameters. Layout can only be computed for concrete, fully-instantiated types.