Type Definition nalgebra::base::Matrix4[][src]

type Matrix4<T> = Matrix<T, U4, U4, ArrayStorage<T, 4, 4>>;
Expand description

A stack-allocated, column-major, 4x4 square matrix.

Because this is an alias, not all its methods are listed here. See the Matrix type too.

Implementations

impl<T: RealField> Matrix4<T>[src]

pub fn new_rotation(axisangle: Vector3<T>) -> Self[src]

Builds a 3D homogeneous rotation matrix from an axis and an angle (multiplied together).

Returns the identity matrix if the given argument is zero.

pub fn new_rotation_wrt_point(axisangle: Vector3<T>, pt: Point3<T>) -> Self[src]

Builds a 3D homogeneous rotation matrix from an axis and an angle (multiplied together).

Returns the identity matrix if the given argument is zero.

pub fn new_nonuniform_scaling_wrt_point(
    scaling: &Vector3<T>,
    pt: &Point3<T>
) -> Self
[src]

Creates a new homogeneous matrix that applies a scaling factor for each dimension with respect to point.

Can be used to implement “zoom_to” functionality.

pub fn from_scaled_axis(axisangle: Vector3<T>) -> Self[src]

Builds a 3D homogeneous rotation matrix from an axis and an angle (multiplied together).

Returns the identity matrix if the given argument is zero. This is identical to Self::new_rotation.

pub fn from_euler_angles(roll: T, pitch: T, yaw: T) -> Self[src]

Creates a new rotation from Euler angles.

The primitive rotations are applied in order: 1 roll − 2 pitch − 3 yaw.

pub fn from_axis_angle(axis: &Unit<Vector3<T>>, angle: T) -> Self[src]

Builds a 3D homogeneous rotation matrix from an axis and a rotation angle.

pub fn new_orthographic(
    left: T,
    right: T,
    bottom: T,
    top: T,
    znear: T,
    zfar: T
) -> Self
[src]

Creates a new homogeneous matrix for an orthographic projection.

pub fn new_perspective(aspect: T, fovy: T, znear: T, zfar: T) -> Self[src]

Creates a new homogeneous matrix for a perspective projection.

pub fn face_towards(
    eye: &Point3<T>,
    target: &Point3<T>,
    up: &Vector3<T>
) -> Self
[src]

Creates an isometry that corresponds to the local frame of an observer standing at the point eye and looking toward target.

It maps the view direction target - eye to the positive z axis and the origin to the eye.

pub fn new_observer_frame(
    eye: &Point3<T>,
    target: &Point3<T>,
    up: &Vector3<T>
) -> Self
[src]

👎 Deprecated:

renamed to face_towards

Deprecated: Use [Matrix4::face_towards] instead.

pub fn look_at_rh(eye: &Point3<T>, target: &Point3<T>, up: &Vector3<T>) -> Self[src]

Builds a right-handed look-at view matrix.

pub fn look_at_lh(eye: &Point3<T>, target: &Point3<T>, up: &Vector3<T>) -> Self[src]

Builds a left-handed look-at view matrix.

Trait Implementations

impl<T: RealField> From<Orthographic3<T>> for Matrix4<T>[src]

fn from(orth: Orthographic3<T>) -> Self[src]

Performs the conversion.

impl<T: RealField> From<Perspective3<T>> for Matrix4<T>[src]

fn from(pers: Perspective3<T>) -> Self[src]

Performs the conversion.

impl<T: RealField> From<Rotation<T, 3_usize>> for Matrix4<T>[src]

fn from(q: Rotation3<T>) -> Self[src]

Performs the conversion.

impl<T: SimdRealField + RealField> From<Unit<DualQuaternion<T>>> for Matrix4<T> where
    T::Element: SimdRealField
[src]

fn from(dq: UnitDualQuaternion<T>) -> Self[src]

Performs the conversion.

impl<T: SimdRealField> From<Unit<Quaternion<T>>> for Matrix4<T> where
    T::Element: SimdRealField
[src]

fn from(q: UnitQuaternion<T>) -> Self[src]

Performs the conversion.