#[repr(transparent)]pub struct Matrix { /* private fields */ }
Implementations§
source§impl Matrix
impl Matrix
pub fn decompose(&self) -> Option<(Vec3, Vec3, Quaternion, Vec3, Vec4)>
pub fn determinant(&self) -> f32
pub fn equal_fast(&self, b: &Matrix) -> bool
pub fn row(&self, index_: u32) -> Vec4
pub fn value(&self, row: u32, col: u32) -> f32
pub fn x_scale(&self) -> f32
pub fn x_translation(&self) -> f32
pub fn y_scale(&self) -> f32
pub fn y_translation(&self) -> f32
pub fn z_scale(&self) -> f32
pub fn z_translation(&self) -> f32
pub fn interpolate(&self, b: &Matrix, factor: f64) -> Matrix
pub fn inverse(&self) -> Option<Matrix>
pub fn is_2d(&self) -> bool
pub fn is_backface_visible(&self) -> bool
pub fn is_identity(&self) -> bool
pub fn is_singular(&self) -> bool
pub fn multiply(&self, b: &Matrix) -> Matrix
pub fn near(&self, b: &Matrix, epsilon: f32) -> bool
pub fn normalize(&self) -> Matrix
pub fn perspective(&self, depth: f32) -> Matrix
pub fn print(&self)
pub fn project_point(&self, p: &Point) -> Point
pub fn project_rect(&self, r: &Rect) -> Quad
pub fn project_rect_bounds(&self, r: &Rect) -> Rect
pub fn rotate(&mut self, angle: f32, axis: &Vec3)
pub fn rotate_euler(&mut self, e: &Euler)
pub fn rotate_quaternion(&mut self, q: &Quaternion)
pub fn rotate_x(&mut self, angle: f32)
pub fn rotate_y(&mut self, angle: f32)
pub fn rotate_z(&mut self, angle: f32)
pub fn scale(&mut self, factor_x: f32, factor_y: f32, factor_z: f32)
pub fn skew_xy(&mut self, factor: f32)
pub fn skew_xz(&mut self, factor: f32)
pub fn skew_yz(&mut self, factor: f32)
pub fn to_2d(&self) -> Option<(f64, f64, f64, f64, f64, f64)>
pub fn transform_bounds(&self, r: &Rect) -> Rect
pub fn transform_box(&self, b: &Box) -> Box
pub fn transform_point(&self, p: &Point) -> Point
pub fn transform_point3d(&self, p: &Point3D) -> Point3D
pub fn transform_ray(&self, r: &Ray) -> Ray
pub fn transform_rect(&self, r: &Rect) -> Quad
pub fn transform_sphere(&self, s: &Sphere) -> Sphere
pub fn transform_vec3(&self, v: &Vec3) -> Vec3
pub fn transform_vec4(&self, v: &Vec4) -> Vec4
pub fn translate(&mut self, pos: &Point3D)
pub fn transpose(&self) -> Matrix
pub fn unproject_point3d(&self, modelview: &Matrix, point: &Point3D) -> Point3D
pub fn untransform_bounds(&self, r: &Rect, bounds: &Rect) -> Rect
pub fn untransform_point(&self, p: &Point, bounds: &Rect) -> Option<Point>
source§impl Matrix
impl Matrix
pub fn from_2d(xx: f64, yx: f64, xy: f64, yy: f64, x_0: f64, y_0: f64) -> Self
pub fn from_float(v: [f32; 16]) -> Self
pub fn from_vec4(v0: &Vec4, v1: &Vec4, v2: &Vec4, v3: &Vec4) -> Self
pub fn new_frustum( left: f32, right: f32, bottom: f32, top: f32, z_near: f32, z_far: f32 ) -> Self
pub fn new_identity() -> Self
pub fn new_look_at(eye: &Vec3, center: &Vec3, up: &Vec3) -> Self
pub fn new_ortho( left: f32, right: f32, top: f32, bottom: f32, z_near: f32, z_far: f32 ) -> Self
pub fn new_perspective(fovy: f32, aspect: f32, z_near: f32, z_far: f32) -> Self
pub fn new_rotate(angle: f32, axis: &Vec3) -> Self
pub fn new_scale(x: f32, y: f32, z: f32) -> Self
pub fn new_skew(x_skew: f32, y_skew: f32) -> Self
pub fn new_translate(p: &Point3D) -> Self
pub fn to_float(&self) -> [f32; 16]
pub fn values(&self) -> &[[f32; 4]; 4]
Trait Implementations§
source§impl PartialEq<Matrix> for Matrix
impl PartialEq<Matrix> for Matrix
source§impl StaticType for Matrix
impl StaticType for Matrix
source§fn static_type() -> Type
fn static_type() -> Type
Returns the type identifier of
Self
.impl Copy for Matrix
impl Eq for Matrix
Auto Trait Implementations§
impl RefUnwindSafe for Matrix
impl Send for Matrix
impl Sync for Matrix
impl Unpin for Matrix
impl UnwindSafe for Matrix
Blanket Implementations§
source§impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GList> for Twhere T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
source§impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GPtrArray> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GPtrArray> for Twhere T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
source§impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GSList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GSList> for Twhere T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
source§impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GList> for Twhere T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
source§impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GPtrArray> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GPtrArray> for Twhere T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
source§impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GSList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GSList> for Twhere T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
source§impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GList> for Twhere T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
source§impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GPtrArray> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GPtrArray> for Twhere T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
source§impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GSList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GSList> for Twhere T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
source§impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GList> for Twhere T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
source§impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GPtrArray> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GPtrArray> for Twhere T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
source§impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GSList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GSList> for Twhere T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
source§impl<T> StaticTypeExt for Twhere
T: StaticType,
impl<T> StaticTypeExt for Twhere T: StaticType,
source§fn ensure_type()
fn ensure_type()
Ensures that the type has been registered with the type system.
source§impl<T> ToClosureReturnValue for Twhere
T: ToValue,
impl<T> ToClosureReturnValue for Twhere T: ToValue,
fn to_closure_return_value(&self) -> Option<Value>
source§impl<T> ToSendValue for Twhere
T: Send + ToValue + ?Sized,
impl<T> ToSendValue for Twhere T: Send + ToValue + ?Sized,
source§fn to_send_value(&self) -> SendValue
fn to_send_value(&self) -> SendValue
Returns a
SendValue
clone of self
.