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
Specifies the yaw of the 3D coordinate system
pitch: f64
Specifies the pitch of the 3D coordinate system
scale: f64
Specifies the scale of the 3D coordinate system
Implementations§
Source§impl ProjectionMatrixBuilder
impl ProjectionMatrixBuilder
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 moreSource§impl Default for ProjectionMatrixBuilder
impl Default for ProjectionMatrixBuilder
impl 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...)
attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 48 bytes