Struct jumpy::core::physics::collisions::rapier::nalgebra::geometry::Orthographic3
source · #[repr(C)]pub struct Orthographic3<T> {
matrix: Matrix<T, Const<4>, Const<4>, ArrayStorage<T, 4, 4>>,
}
Expand description
A 3D orthographic projection stored as a homogeneous 4x4 matrix.
Fields§
§matrix: Matrix<T, Const<4>, Const<4>, ArrayStorage<T, 4, 4>>
Implementations§
source§impl<T> Orthographic3<T>
impl<T> Orthographic3<T>
sourcepub const fn from_matrix_unchecked(
matrix: Matrix<T, Const<4>, Const<4>, ArrayStorage<T, 4, 4>>,
) -> Orthographic3<T>
pub const fn from_matrix_unchecked( matrix: Matrix<T, Const<4>, Const<4>, ArrayStorage<T, 4, 4>>, ) -> Orthographic3<T>
Wraps the given matrix to interpret it as a 3D orthographic matrix.
It is not checked whether or not the given matrix actually represents an orthographic projection.
§Example
let mat = Matrix4::new(
2.0 / 9.0, 0.0, 0.0, -11.0 / 9.0,
0.0, 2.0 / 18.0, 0.0, -22.0 / 18.0,
0.0, 0.0, -2.0 / 999.9, -1000.1 / 999.9,
0.0, 0.0, 0.0, 1.0
);
let proj = Orthographic3::from_matrix_unchecked(mat);
assert_eq!(proj, Orthographic3::new(1.0, 10.0, 2.0, 20.0, 0.1, 1000.0));
source§impl<T> Orthographic3<T>where
T: RealField,
impl<T> Orthographic3<T>where
T: RealField,
sourcepub fn new(
left: T,
right: T,
bottom: T,
top: T,
znear: T,
zfar: T,
) -> Orthographic3<T>
pub fn new( left: T, right: T, bottom: T, top: T, znear: T, zfar: T, ) -> Orthographic3<T>
Creates a new orthographic projection matrix.
This follows the OpenGL convention, so this will flip the z
axis.
§Example
let proj = Orthographic3::new(1.0, 10.0, 2.0, 20.0, 0.1, 1000.0);
// Check this projection actually transforms the view cuboid into the double-unit cube.
// See https://www.nalgebra.org/docs/user_guide/projections#orthographic-projection for more details.
let p1 = Point3::new(1.0, 2.0, -0.1);
let p2 = Point3::new(1.0, 2.0, -1000.0);
let p3 = Point3::new(1.0, 20.0, -0.1);
let p4 = Point3::new(1.0, 20.0, -1000.0);
let p5 = Point3::new(10.0, 2.0, -0.1);
let p6 = Point3::new(10.0, 2.0, -1000.0);
let p7 = Point3::new(10.0, 20.0, -0.1);
let p8 = Point3::new(10.0, 20.0, -1000.0);
assert_relative_eq!(proj.project_point(&p1), Point3::new(-1.0, -1.0, -1.0));
assert_relative_eq!(proj.project_point(&p2), Point3::new(-1.0, -1.0, 1.0));
assert_relative_eq!(proj.project_point(&p3), Point3::new(-1.0, 1.0, -1.0));
assert_relative_eq!(proj.project_point(&p4), Point3::new(-1.0, 1.0, 1.0));
assert_relative_eq!(proj.project_point(&p5), Point3::new( 1.0, -1.0, -1.0));
assert_relative_eq!(proj.project_point(&p6), Point3::new( 1.0, -1.0, 1.0));
assert_relative_eq!(proj.project_point(&p7), Point3::new( 1.0, 1.0, -1.0));
assert_relative_eq!(proj.project_point(&p8), Point3::new( 1.0, 1.0, 1.0));
// This also works with flipped axis. In other words, we allow that
// `left > right`, `bottom > top`, and/or `znear > zfar`.
let proj = Orthographic3::new(10.0, 1.0, 20.0, 2.0, 1000.0, 0.1);
assert_relative_eq!(proj.project_point(&p1), Point3::new( 1.0, 1.0, 1.0));
assert_relative_eq!(proj.project_point(&p2), Point3::new( 1.0, 1.0, -1.0));
assert_relative_eq!(proj.project_point(&p3), Point3::new( 1.0, -1.0, 1.0));
assert_relative_eq!(proj.project_point(&p4), Point3::new( 1.0, -1.0, -1.0));
assert_relative_eq!(proj.project_point(&p5), Point3::new(-1.0, 1.0, 1.0));
assert_relative_eq!(proj.project_point(&p6), Point3::new(-1.0, 1.0, -1.0));
assert_relative_eq!(proj.project_point(&p7), Point3::new(-1.0, -1.0, 1.0));
assert_relative_eq!(proj.project_point(&p8), Point3::new(-1.0, -1.0, -1.0));
sourcepub fn from_fov(aspect: T, vfov: T, znear: T, zfar: T) -> Orthographic3<T>
pub fn from_fov(aspect: T, vfov: T, znear: T, zfar: T) -> Orthographic3<T>
Creates a new orthographic projection matrix from an aspect ratio and the vertical field of view.
sourcepub fn inverse(&self) -> Matrix<T, Const<4>, Const<4>, ArrayStorage<T, 4, 4>>
pub fn inverse(&self) -> Matrix<T, Const<4>, Const<4>, ArrayStorage<T, 4, 4>>
Retrieves the inverse of the underlying homogeneous matrix.
§Example
let proj = Orthographic3::new(1.0, 10.0, 2.0, 20.0, 0.1, 1000.0);
let inv = proj.inverse();
assert_relative_eq!(inv * proj.as_matrix(), Matrix4::identity());
assert_relative_eq!(proj.as_matrix() * inv, Matrix4::identity());
let proj = Orthographic3::new(10.0, 1.0, 20.0, 2.0, 1000.0, 0.1);
let inv = proj.inverse();
assert_relative_eq!(inv * proj.as_matrix(), Matrix4::identity());
assert_relative_eq!(proj.as_matrix() * inv, Matrix4::identity());
sourcepub fn to_homogeneous(
self,
) -> Matrix<T, Const<4>, Const<4>, ArrayStorage<T, 4, 4>>
pub fn to_homogeneous( self, ) -> Matrix<T, Const<4>, Const<4>, ArrayStorage<T, 4, 4>>
Computes the corresponding homogeneous matrix.
§Example
let proj = Orthographic3::new(1.0, 10.0, 2.0, 20.0, 0.1, 1000.0);
let expected = Matrix4::new(
2.0 / 9.0, 0.0, 0.0, -11.0 / 9.0,
0.0, 2.0 / 18.0, 0.0, -22.0 / 18.0,
0.0, 0.0, -2.0 / 999.9, -1000.1 / 999.9,
0.0, 0.0, 0.0, 1.0
);
assert_eq!(proj.to_homogeneous(), expected);
sourcepub fn as_matrix(&self) -> &Matrix<T, Const<4>, Const<4>, ArrayStorage<T, 4, 4>>
pub fn as_matrix(&self) -> &Matrix<T, Const<4>, Const<4>, ArrayStorage<T, 4, 4>>
A reference to the underlying homogeneous transformation matrix.
§Example
let proj = Orthographic3::new(1.0, 10.0, 2.0, 20.0, 0.1, 1000.0);
let expected = Matrix4::new(
2.0 / 9.0, 0.0, 0.0, -11.0 / 9.0,
0.0, 2.0 / 18.0, 0.0, -22.0 / 18.0,
0.0, 0.0, -2.0 / 999.9, -1000.1 / 999.9,
0.0, 0.0, 0.0, 1.0
);
assert_eq!(*proj.as_matrix(), expected);
sourcepub fn as_projective(&self) -> &Transform<T, TProjective, 3>
pub fn as_projective(&self) -> &Transform<T, TProjective, 3>
A reference to this transformation seen as a Projective3
.
§Example
let proj = Orthographic3::new(1.0, 10.0, 2.0, 20.0, 0.1, 1000.0);
assert_eq!(proj.as_projective().to_homogeneous(), proj.to_homogeneous());
sourcepub fn to_projective(self) -> Transform<T, TProjective, 3>
pub fn to_projective(self) -> Transform<T, TProjective, 3>
This transformation seen as a Projective3
.
§Example
let proj = Orthographic3::new(1.0, 10.0, 2.0, 20.0, 0.1, 1000.0);
assert_eq!(proj.to_projective().to_homogeneous(), proj.to_homogeneous());
sourcepub fn into_inner(self) -> Matrix<T, Const<4>, Const<4>, ArrayStorage<T, 4, 4>>
pub fn into_inner(self) -> Matrix<T, Const<4>, Const<4>, ArrayStorage<T, 4, 4>>
Retrieves the underlying homogeneous matrix.
§Example
let proj = Orthographic3::new(1.0, 10.0, 2.0, 20.0, 0.1, 1000.0);
let expected = Matrix4::new(
2.0 / 9.0, 0.0, 0.0, -11.0 / 9.0,
0.0, 2.0 / 18.0, 0.0, -22.0 / 18.0,
0.0, 0.0, -2.0 / 999.9, -1000.1 / 999.9,
0.0, 0.0, 0.0, 1.0
);
assert_eq!(proj.into_inner(), expected);
sourcepub fn unwrap(self) -> Matrix<T, Const<4>, Const<4>, ArrayStorage<T, 4, 4>>
👎Deprecated: use .into_inner()
instead
pub fn unwrap(self) -> Matrix<T, Const<4>, Const<4>, ArrayStorage<T, 4, 4>>
.into_inner()
insteadRetrieves the underlying homogeneous matrix.
Deprecated: Use Orthographic3::into_inner
instead.
sourcepub fn left(&self) -> T
pub fn left(&self) -> T
The left offset of the view cuboid.
§Example
let proj = Orthographic3::new(1.0, 10.0, 2.0, 20.0, 0.1, 1000.0);
assert_relative_eq!(proj.left(), 1.0, epsilon = 1.0e-6);
let proj = Orthographic3::new(10.0, 1.0, 20.0, 2.0, 1000.0, 0.1);
assert_relative_eq!(proj.left(), 10.0, epsilon = 1.0e-6);
sourcepub fn right(&self) -> T
pub fn right(&self) -> T
The right offset of the view cuboid.
§Example
let proj = Orthographic3::new(1.0, 10.0, 2.0, 20.0, 0.1, 1000.0);
assert_relative_eq!(proj.right(), 10.0, epsilon = 1.0e-6);
let proj = Orthographic3::new(10.0, 1.0, 20.0, 2.0, 1000.0, 0.1);
assert_relative_eq!(proj.right(), 1.0, epsilon = 1.0e-6);
sourcepub fn bottom(&self) -> T
pub fn bottom(&self) -> T
The bottom offset of the view cuboid.
§Example
let proj = Orthographic3::new(1.0, 10.0, 2.0, 20.0, 0.1, 1000.0);
assert_relative_eq!(proj.bottom(), 2.0, epsilon = 1.0e-6);
let proj = Orthographic3::new(10.0, 1.0, 20.0, 2.0, 1000.0, 0.1);
assert_relative_eq!(proj.bottom(), 20.0, epsilon = 1.0e-6);
sourcepub fn top(&self) -> T
pub fn top(&self) -> T
The top offset of the view cuboid.
§Example
let proj = Orthographic3::new(1.0, 10.0, 2.0, 20.0, 0.1, 1000.0);
assert_relative_eq!(proj.top(), 20.0, epsilon = 1.0e-6);
let proj = Orthographic3::new(10.0, 1.0, 20.0, 2.0, 1000.0, 0.1);
assert_relative_eq!(proj.top(), 2.0, epsilon = 1.0e-6);
sourcepub fn znear(&self) -> T
pub fn znear(&self) -> T
The near plane offset of the view cuboid.
§Example
let proj = Orthographic3::new(1.0, 10.0, 2.0, 20.0, 0.1, 1000.0);
assert_relative_eq!(proj.znear(), 0.1, epsilon = 1.0e-6);
let proj = Orthographic3::new(10.0, 1.0, 20.0, 2.0, 1000.0, 0.1);
assert_relative_eq!(proj.znear(), 1000.0, epsilon = 1.0e-6);
sourcepub fn zfar(&self) -> T
pub fn zfar(&self) -> T
The far plane offset of the view cuboid.
§Example
let proj = Orthographic3::new(1.0, 10.0, 2.0, 20.0, 0.1, 1000.0);
assert_relative_eq!(proj.zfar(), 1000.0, epsilon = 1.0e-6);
let proj = Orthographic3::new(10.0, 1.0, 20.0, 2.0, 1000.0, 0.1);
assert_relative_eq!(proj.zfar(), 0.1, epsilon = 1.0e-6);
sourcepub fn project_point(&self, p: &OPoint<T, Const<3>>) -> OPoint<T, Const<3>>
pub fn project_point(&self, p: &OPoint<T, Const<3>>) -> OPoint<T, Const<3>>
Projects a point. Faster than matrix multiplication.
§Example
let proj = Orthographic3::new(1.0, 10.0, 2.0, 20.0, 0.1, 1000.0);
let p1 = Point3::new(1.0, 2.0, -0.1);
let p2 = Point3::new(1.0, 2.0, -1000.0);
let p3 = Point3::new(1.0, 20.0, -0.1);
let p4 = Point3::new(1.0, 20.0, -1000.0);
let p5 = Point3::new(10.0, 2.0, -0.1);
let p6 = Point3::new(10.0, 2.0, -1000.0);
let p7 = Point3::new(10.0, 20.0, -0.1);
let p8 = Point3::new(10.0, 20.0, -1000.0);
assert_relative_eq!(proj.project_point(&p1), Point3::new(-1.0, -1.0, -1.0));
assert_relative_eq!(proj.project_point(&p2), Point3::new(-1.0, -1.0, 1.0));
assert_relative_eq!(proj.project_point(&p3), Point3::new(-1.0, 1.0, -1.0));
assert_relative_eq!(proj.project_point(&p4), Point3::new(-1.0, 1.0, 1.0));
assert_relative_eq!(proj.project_point(&p5), Point3::new( 1.0, -1.0, -1.0));
assert_relative_eq!(proj.project_point(&p6), Point3::new( 1.0, -1.0, 1.0));
assert_relative_eq!(proj.project_point(&p7), Point3::new( 1.0, 1.0, -1.0));
assert_relative_eq!(proj.project_point(&p8), Point3::new( 1.0, 1.0, 1.0));
sourcepub fn unproject_point(&self, p: &OPoint<T, Const<3>>) -> OPoint<T, Const<3>>
pub fn unproject_point(&self, p: &OPoint<T, Const<3>>) -> OPoint<T, Const<3>>
Un-projects a point. Faster than multiplication by the underlying matrix inverse.
§Example
let proj = Orthographic3::new(1.0, 10.0, 2.0, 20.0, 0.1, 1000.0);
let p1 = Point3::new(-1.0, -1.0, -1.0);
let p2 = Point3::new(-1.0, -1.0, 1.0);
let p3 = Point3::new(-1.0, 1.0, -1.0);
let p4 = Point3::new(-1.0, 1.0, 1.0);
let p5 = Point3::new( 1.0, -1.0, -1.0);
let p6 = Point3::new( 1.0, -1.0, 1.0);
let p7 = Point3::new( 1.0, 1.0, -1.0);
let p8 = Point3::new( 1.0, 1.0, 1.0);
assert_relative_eq!(proj.unproject_point(&p1), Point3::new(1.0, 2.0, -0.1), epsilon = 1.0e-6);
assert_relative_eq!(proj.unproject_point(&p2), Point3::new(1.0, 2.0, -1000.0), epsilon = 1.0e-6);
assert_relative_eq!(proj.unproject_point(&p3), Point3::new(1.0, 20.0, -0.1), epsilon = 1.0e-6);
assert_relative_eq!(proj.unproject_point(&p4), Point3::new(1.0, 20.0, -1000.0), epsilon = 1.0e-6);
assert_relative_eq!(proj.unproject_point(&p5), Point3::new(10.0, 2.0, -0.1), epsilon = 1.0e-6);
assert_relative_eq!(proj.unproject_point(&p6), Point3::new(10.0, 2.0, -1000.0), epsilon = 1.0e-6);
assert_relative_eq!(proj.unproject_point(&p7), Point3::new(10.0, 20.0, -0.1), epsilon = 1.0e-6);
assert_relative_eq!(proj.unproject_point(&p8), Point3::new(10.0, 20.0, -1000.0), epsilon = 1.0e-6);
sourcepub fn project_vector<SB>(
&self,
p: &Matrix<T, Const<3>, Const<1>, SB>,
) -> Matrix<T, Const<3>, Const<1>, ArrayStorage<T, 3, 1>>
pub fn project_vector<SB>( &self, p: &Matrix<T, Const<3>, Const<1>, SB>, ) -> Matrix<T, Const<3>, Const<1>, ArrayStorage<T, 3, 1>>
Projects a vector. Faster than matrix multiplication.
Vectors are not affected by the translation part of the projection.
§Example
let proj = Orthographic3::new(1.0, 10.0, 2.0, 20.0, 0.1, 1000.0);
let v1 = Vector3::x();
let v2 = Vector3::y();
let v3 = Vector3::z();
assert_relative_eq!(proj.project_vector(&v1), Vector3::x() * 2.0 / 9.0);
assert_relative_eq!(proj.project_vector(&v2), Vector3::y() * 2.0 / 18.0);
assert_relative_eq!(proj.project_vector(&v3), Vector3::z() * -2.0 / 999.9);
sourcepub fn set_left(&mut self, left: T)
pub fn set_left(&mut self, left: T)
Sets the left offset of the view cuboid.
§Example
let mut proj = Orthographic3::new(1.0, 10.0, 2.0, 20.0, 0.1, 1000.0);
proj.set_left(2.0);
assert_relative_eq!(proj.left(), 2.0, epsilon = 1.0e-6);
// It is OK to set a left offset greater than the current right offset.
proj.set_left(20.0);
assert_relative_eq!(proj.left(), 20.0, epsilon = 1.0e-6);
sourcepub fn set_right(&mut self, right: T)
pub fn set_right(&mut self, right: T)
Sets the right offset of the view cuboid.
§Example
let mut proj = Orthographic3::new(1.0, 10.0, 2.0, 20.0, 0.1, 1000.0);
proj.set_right(15.0);
assert_relative_eq!(proj.right(), 15.0, epsilon = 1.0e-6);
// It is OK to set a right offset smaller than the current left offset.
proj.set_right(-3.0);
assert_relative_eq!(proj.right(), -3.0, epsilon = 1.0e-6);
sourcepub fn set_bottom(&mut self, bottom: T)
pub fn set_bottom(&mut self, bottom: T)
Sets the bottom offset of the view cuboid.
§Example
let mut proj = Orthographic3::new(1.0, 10.0, 2.0, 20.0, 0.1, 1000.0);
proj.set_bottom(8.0);
assert_relative_eq!(proj.bottom(), 8.0, epsilon = 1.0e-6);
// It is OK to set a bottom offset greater than the current top offset.
proj.set_bottom(50.0);
assert_relative_eq!(proj.bottom(), 50.0, epsilon = 1.0e-6);
sourcepub fn set_top(&mut self, top: T)
pub fn set_top(&mut self, top: T)
Sets the top offset of the view cuboid.
§Example
let mut proj = Orthographic3::new(1.0, 10.0, 2.0, 20.0, 0.1, 1000.0);
proj.set_top(15.0);
assert_relative_eq!(proj.top(), 15.0, epsilon = 1.0e-6);
// It is OK to set a top offset smaller than the current bottom offset.
proj.set_top(-3.0);
assert_relative_eq!(proj.top(), -3.0, epsilon = 1.0e-6);
sourcepub fn set_znear(&mut self, znear: T)
pub fn set_znear(&mut self, znear: T)
Sets the near plane offset of the view cuboid.
§Example
let mut proj = Orthographic3::new(1.0, 10.0, 2.0, 20.0, 0.1, 1000.0);
proj.set_znear(8.0);
assert_relative_eq!(proj.znear(), 8.0, epsilon = 1.0e-6);
// It is OK to set a znear greater than the current zfar.
proj.set_znear(5000.0);
assert_relative_eq!(proj.znear(), 5000.0, epsilon = 1.0e-6);
sourcepub fn set_zfar(&mut self, zfar: T)
pub fn set_zfar(&mut self, zfar: T)
Sets the far plane offset of the view cuboid.
§Example
let mut proj = Orthographic3::new(1.0, 10.0, 2.0, 20.0, 0.1, 1000.0);
proj.set_zfar(15.0);
assert_relative_eq!(proj.zfar(), 15.0, epsilon = 1.0e-6);
// It is OK to set a zfar smaller than the current znear.
proj.set_zfar(-3.0);
assert_relative_eq!(proj.zfar(), -3.0, epsilon = 1.0e-6);
sourcepub fn set_left_and_right(&mut self, left: T, right: T)
pub fn set_left_and_right(&mut self, left: T, right: T)
Sets the view cuboid offsets along the x
axis.
§Example
let mut proj = Orthographic3::new(1.0, 10.0, 2.0, 20.0, 0.1, 1000.0);
proj.set_left_and_right(7.0, 70.0);
assert_relative_eq!(proj.left(), 7.0, epsilon = 1.0e-6);
assert_relative_eq!(proj.right(), 70.0, epsilon = 1.0e-6);
// It is also OK to have `left > right`.
proj.set_left_and_right(70.0, 7.0);
assert_relative_eq!(proj.left(), 70.0, epsilon = 1.0e-6);
assert_relative_eq!(proj.right(), 7.0, epsilon = 1.0e-6);
sourcepub fn set_bottom_and_top(&mut self, bottom: T, top: T)
pub fn set_bottom_and_top(&mut self, bottom: T, top: T)
Sets the view cuboid offsets along the y
axis.
§Example
let mut proj = Orthographic3::new(1.0, 10.0, 2.0, 20.0, 0.1, 1000.0);
proj.set_bottom_and_top(7.0, 70.0);
assert_relative_eq!(proj.bottom(), 7.0, epsilon = 1.0e-6);
assert_relative_eq!(proj.top(), 70.0, epsilon = 1.0e-6);
// It is also OK to have `bottom > top`.
proj.set_bottom_and_top(70.0, 7.0);
assert_relative_eq!(proj.bottom(), 70.0, epsilon = 1.0e-6);
assert_relative_eq!(proj.top(), 7.0, epsilon = 1.0e-6);
sourcepub fn set_znear_and_zfar(&mut self, znear: T, zfar: T)
pub fn set_znear_and_zfar(&mut self, znear: T, zfar: T)
Sets the near and far plane offsets of the view cuboid.
§Example
let mut proj = Orthographic3::new(1.0, 10.0, 2.0, 20.0, 0.1, 1000.0);
proj.set_znear_and_zfar(50.0, 5000.0);
assert_relative_eq!(proj.znear(), 50.0, epsilon = 1.0e-6);
assert_relative_eq!(proj.zfar(), 5000.0, epsilon = 1.0e-6);
// It is also OK to have `znear > zfar`.
proj.set_znear_and_zfar(5000.0, 0.5);
assert_relative_eq!(proj.znear(), 5000.0, epsilon = 1.0e-6);
assert_relative_eq!(proj.zfar(), 0.5, epsilon = 1.0e-6);
Trait Implementations§
source§impl<T> Clone for Orthographic3<T>where
T: Clone,
impl<T> Clone for Orthographic3<T>where
T: Clone,
source§fn clone(&self) -> Orthographic3<T>
fn clone(&self) -> Orthographic3<T>
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl<T> Debug for Orthographic3<T>where
T: RealField,
impl<T> Debug for Orthographic3<T>where
T: RealField,
source§impl<T> From<Orthographic3<T>> for Matrix<T, Const<4>, Const<4>, ArrayStorage<T, 4, 4>>where
T: RealField,
impl<T> From<Orthographic3<T>> for Matrix<T, Const<4>, Const<4>, ArrayStorage<T, 4, 4>>where
T: RealField,
source§fn from(
orth: Orthographic3<T>,
) -> Matrix<T, Const<4>, Const<4>, ArrayStorage<T, 4, 4>>
fn from( orth: Orthographic3<T>, ) -> Matrix<T, Const<4>, Const<4>, ArrayStorage<T, 4, 4>>
source§impl<T> PartialEq for Orthographic3<T>where
T: RealField,
impl<T> PartialEq for Orthographic3<T>where
T: RealField,
source§fn eq(&self, right: &Orthographic3<T>) -> bool
fn eq(&self, right: &Orthographic3<T>) -> bool
self
and other
values to be equal, and is used
by ==
.impl<T> Copy for Orthographic3<T>where
T: Copy,
Auto Trait Implementations§
impl<T> Freeze for Orthographic3<T>where
T: Freeze,
impl<T> RefUnwindSafe for Orthographic3<T>where
T: RefUnwindSafe,
impl<T> Send for Orthographic3<T>where
T: Send,
impl<T> Sync for Orthographic3<T>where
T: Sync,
impl<T> Unpin for Orthographic3<T>where
T: Unpin,
impl<T> UnwindSafe for Orthographic3<T>where
T: UnwindSafe,
Blanket Implementations§
§impl<T, U> AsBindGroupShaderType<U> for T
impl<T, U> AsBindGroupShaderType<U> for T
§fn as_bind_group_shader_type(&self, _images: &RenderAssets<Image>) -> U
fn as_bind_group_shader_type(&self, _images: &RenderAssets<Image>) -> U
T
[ShaderType
] for self
. When used in [AsBindGroup
]
derives, it is safe to assume that all images in self
exist.§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
source§impl<T> CloneToUninit for Twhere
T: Copy,
impl<T> CloneToUninit for Twhere
T: Copy,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)§impl<T> Conv for T
impl<T> Conv for T
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§impl<T> FmtForward for T
impl<T> FmtForward for T
§fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
self
to use its Binary
implementation when Debug
-formatted.§fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
self
to use its Display
implementation when
Debug
-formatted.§fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
self
to use its LowerExp
implementation when
Debug
-formatted.§fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
self
to use its LowerHex
implementation when
Debug
-formatted.§fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
self
to use its Octal
implementation when Debug
-formatted.§fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
self
to use its Pointer
implementation when
Debug
-formatted.§fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
self
to use its UpperExp
implementation when
Debug
-formatted.§fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
self
to use its UpperHex
implementation when
Debug
-formatted.§fn fmt_list(self) -> FmtList<Self>where
&'a Self: for<'a> IntoIterator,
fn fmt_list(self) -> FmtList<Self>where
&'a Self: for<'a> IntoIterator,
§impl<S> FromSample<S> for S
impl<S> FromSample<S> for S
fn from_sample_(s: S) -> S
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more§impl<F, T> IntoSample<T> for Fwhere
T: FromSample<F>,
impl<F, T> IntoSample<T> for Fwhere
T: FromSample<F>,
fn into_sample(self) -> T
§impl<T> Pipe for Twhere
T: ?Sized,
impl<T> Pipe for Twhere
T: ?Sized,
§fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
§fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
self
and passes that borrow into the pipe function. Read more§fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
self
and passes that borrow into the pipe function. Read more§fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
§fn pipe_borrow_mut<'a, B, R>(
&'a mut self,
func: impl FnOnce(&'a mut B) -> R,
) -> R
fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R, ) -> R
§fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
self
, then passes self.as_ref()
into the pipe function.§fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
self
, then passes self.as_mut()
into the pipe
function.§fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
self
, then passes self.deref()
into the pipe function.§impl<T> Pointable for T
impl<T> Pointable for T
§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self
from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self
is actually part of its subset T
(and can be converted to it).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset
but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self
to the equivalent element of its superset.§impl<T> Tap for T
impl<T> Tap for T
§fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
Borrow<B>
of a value. Read more§fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
BorrowMut<B>
of a value. Read more§fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
AsRef<R>
view of a value. Read more§fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
AsMut<R>
view of a value. Read more§fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
Deref::Target
of a value. Read more§fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
Deref::Target
of a value. Read more§fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
.tap()
only in debug builds, and is erased in release builds.§fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
.tap_mut()
only in debug builds, and is erased in release
builds.§fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
.tap_borrow()
only in debug builds, and is erased in release
builds.§fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
.tap_borrow_mut()
only in debug builds, and is erased in release
builds.§fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
.tap_ref()
only in debug builds, and is erased in release
builds.§fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
.tap_ref_mut()
only in debug builds, and is erased in release
builds.§fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
.tap_deref()
only in debug builds, and is erased in release
builds.