pub struct ProjectionMatrixBuilder {
pub yaw: f64,
pub pitch: f64,
pub scale: f64,
/* private fields */
}
Expand description
The helper struct to build a projection matrix
Fields§
§yaw: f64
§pitch: f64
§scale: f64
Implementations§
Source§impl ProjectionMatrixBuilder
impl ProjectionMatrixBuilder
pub fn new() -> Self
Sourcepub fn set_pivot(
&mut self,
before: (i32, i32, i32),
after: (i32, i32),
) -> &mut Self
pub fn set_pivot( &mut self, before: (i32, i32, i32), after: (i32, i32), ) -> &mut Self
Set the pivot point, which means the 3D coordinate “before” should be mapped into the 2D coordinatet “after”
Sourcepub fn into_matrix(self) -> ProjectionMatrix
pub fn into_matrix(self) -> ProjectionMatrix
Build the matrix based on the configuration
Trait Implementations§
Source§impl Clone for ProjectionMatrixBuilder
impl Clone for ProjectionMatrixBuilder
Source§fn clone(&self) -> ProjectionMatrixBuilder
fn clone(&self) -> ProjectionMatrixBuilder
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 moreimpl Copy for ProjectionMatrixBuilder
Auto Trait Implementations§
impl Freeze for ProjectionMatrixBuilder
impl RefUnwindSafe for ProjectionMatrixBuilder
impl Send for ProjectionMatrixBuilder
impl Sync for ProjectionMatrixBuilder
impl Unpin for ProjectionMatrixBuilder
impl UnwindSafe for ProjectionMatrixBuilder
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