Struct euclid::matrix4d::TypedMatrix4D [] [src]

pub struct TypedMatrix4D<T, Src, Dst> {
    pub m11: T,
    pub m12: T,
    pub m13: T,
    pub m14: T,
    pub m21: T,
    pub m22: T,
    pub m23: T,
    pub m24: T,
    pub m31: T,
    pub m32: T,
    pub m33: T,
    pub m34: T,
    pub m41: T,
    pub m42: T,
    pub m43: T,
    pub m44: T,
    // some fields omitted
}

Fields

m11: T m12: T m13: T m14: T m21: T m22: T m23: T m24: T m31: T m32: T m33: T m34: T m41: T m42: T m43: T m44: T

Methods

impl<T, Src, Dst> TypedMatrix4D<T, Src, Dst>
[src]

fn new(m11: T, m12: T, m13: T, m14: T, m21: T, m22: T, m23: T, m24: T, m31: T, m32: T, m33: T, m34: T, m41: T, m42: T, m43: T, m44: T) -> TypedMatrix4D<T, Src, Dst>

impl<T, Src, Dst> TypedMatrix4D<T, Src, Dst> where T: Copy + Clone + Add<T, Output=T> + Sub<T, Output=T> + Mul<T, Output=T> + Div<T, Output=T> + Neg<Output=T> + ApproxEq<T> + PartialOrd + Trig + One + Zero
[src]

fn new_2d(m11: T, m12: T, m21: T, m22: T, m41: T, m42: T) -> TypedMatrix4D<T, Src, Dst>

fn ortho(left: T, right: T, bottom: T, top: T, near: T, far: T) -> TypedMatrix4D<T, Src, Dst>

fn identity() -> TypedMatrix4D<T, Src, Dst>

fn is_2d(&self) -> bool

fn to_2d(&self) -> TypedMatrix2D<T, Src, Dst>

fn approx_eq(&self, other: &TypedMatrix4D<T, Src, Dst>) -> bool

fn to<Destination>(&self) -> TypedMatrix4D<T, Src, Destination>

fn mul<NewSrc>(&self, mat: &TypedMatrix4D<T, NewSrc, Src>) -> TypedMatrix4D<T, NewSrc, Dst>

fn invert(&self) -> TypedMatrix4D<T, Dst, Src>

fn determinant(&self) -> T

fn mul_s(&self, x: T) -> TypedMatrix4D<T, Src, Dst>

fn from_scale_factor(scale: ScaleFactor<T, Src, Dst>) -> TypedMatrix4D<T, Src, Dst>

fn scale(&self, x: T, y: T, z: T) -> TypedMatrix4D<T, Src, Dst>

fn transform_point(&self, p: &TypedPoint2D<T, Src>) -> TypedPoint2D<T, Dst>

Returns the given point transformed by this matrix.

fn transform_point4d(&self, p: &TypedPoint4D<T, Src>) -> TypedPoint4D<T, Dst>

fn translate(&self, x: T, y: T, z: T) -> TypedMatrix4D<T, Src, Dst>

fn create_translation(x: T, y: T, z: T) -> TypedMatrix4D<T, Src, Dst>

Create a 3d translation matrix

fn create_scale(x: T, y: T, z: T) -> TypedMatrix4D<T, Src, Dst>

Create a 3d scale matrix

fn create_rotation(x: T, y: T, z: T, theta: T) -> TypedMatrix4D<T, Src, Dst>

Create a 3d rotation matrix from an angle / axis. The supplied axis must be normalized.

fn create_skew(alpha: T, beta: T) -> TypedMatrix4D<T, Src, Dst>

fn create_perspective(d: T) -> TypedMatrix4D<T, Src, Dst>

Create a simple perspective projection matrix

impl<T: Copy, Src, Dst> TypedMatrix4D<T, Src, Dst>
[src]

fn to_array(&self) -> [T; 16]

Trait Implementations

impl<T: HeapSizeOf, Src, Dst> HeapSizeOf for TypedMatrix4D<T, Src, Dst>
[src]

fn heap_size_of_children(&self) -> usize

Measure the size of any heap-allocated structures that hang off this value, but not the space taken up by the value itself (i.e. what size_of:: measures, more or less); that space is handled by the implementation of HeapSizeOf for Box below. Read more

impl<T: Clone + Deserialize, Src, Dst> Deserialize for TypedMatrix4D<T, Src, Dst>
[src]

fn deserialize<D>(deserializer: &mut D) -> Result<Self, D::Error> where D: Deserializer

Deserialize this value given this Deserializer.

impl<T: Serialize, Src, Dst> Serialize for TypedMatrix4D<T, Src, Dst>
[src]

fn serialize<S>(&self, serializer: &mut S) -> Result<(), S::Error> where S: Serializer

Serializes this value into this serializer.

impl<T: Copy, Src, Dst> Copy for TypedMatrix4D<T, Src, Dst>
[src]

impl<T: Copy, Src, Dst> Clone for TypedMatrix4D<T, Src, Dst>
[src]

fn clone(&self) -> Self

Returns a copy of the value. Read more

fn clone_from(&mut self, source: &Self)
1.0.0

Performs copy-assignment from source. Read more

impl<T: Copy + Debug, Src, Dst> Debug for TypedMatrix4D<T, Src, Dst>
[src]

fn fmt(&self, f: &mut Formatter) -> Result

Formats the value using the given formatter.

impl<T: PartialEq, Src, Dst> PartialEq for TypedMatrix4D<T, Src, Dst>
[src]

fn eq(&self, other: &Self) -> bool

This method tests for self and other values to be equal, and is used by ==. Read more

fn ne(&self, other: &Rhs) -> bool
1.0.0

This method tests for !=.