Isometry3A

Struct Isometry3A 

Source
#[repr(C)]
pub struct Isometry3A { pub translation: Vec3A, pub rotation: Quat, }

Fields§

§translation: Vec3A§rotation: Quat

Implementations§

Source§

impl Isometry3A

Source

pub const ZERO: Self

The degenerate zero isometry.

This isometrys any finite vector and point to zero. The zero isometry is non-invertible.

Source

pub const IDENTITY: Self

The identity isometry.

Multiplying a vector with this returns the same vector.

Source

pub const NAN: Self

All NAN:s.

Source

pub fn new(translation: Vec3, rotation: Quat) -> Self

Creates a new isometry.

Source

pub fn from_quat(rotation: Quat) -> Self

Creates a isometry isometry from the given rotation quaternion.

Source

pub fn from_axis_angle(axis: Vec3, angle: f32) -> Self

Creates a isometry isometry containing a 3D rotation around a normalized rotation axis of angle (in radians).

Source

pub fn from_rotation_x(angle: f32) -> Self

Creates a isometry isometry containing a 3D rotation around the x axis of angle (in radians).

Source

pub fn from_rotation_y(angle: f32) -> Self

Creates a isometry isometry containing a 3D rotation around the y axis of angle (in radians).

Source

pub fn from_rotation_z(angle: f32) -> Self

Creates a isometry isometry containing a 3D rotation around the z axis of angle (in radians).

Source

pub fn from_translation(translation: Vec3) -> Self

Creates a isometry isometryation from the given 3D translation.

Source

pub fn from_rotation_translation(rotation: Quat, translation: Vec3) -> Self

Creates a isometry from the given 3D rotation and translation.

Source

pub fn from_mat3(mat3: Mat3) -> Self

Creates a isometry from a 3x3 matrix (expressing scale and rotation)

Source

pub fn from_mat3_translation(mat3: Mat3, translation: Vec3) -> Self

Creates a isometry from a 3x3 matrix (expressing scale and rotation)

Source

pub fn from_mat4(mat4: Mat4) -> Self

Creates a isometry from a 4x4 matrix.

Source

pub fn to_rotation_translation(&self) -> (Quat, Vec3)

Extracts scale, rotation and translation from self.

Source

pub fn transform_point3(&self, rhs: Vec3) -> Vec3

Transforms the given 3D points, applying rotation and translation.

Source

pub fn transform_vector3(&self, rhs: Vec3) -> Vec3

Transforms the given 3D vector, applying rotation (but NOT translation).

Source

pub fn transform_point3a(&self, rhs: Vec3A) -> Vec3A

Transforms the given Vec3A, applying rotation and translation.

Source

pub fn transform_vector3a(&self, rhs: Vec3A) -> Vec3A

Transforms the given Vec3A, applying rotation (but NOT translation).

Source

pub fn is_finite(&self) -> bool

Returns true if, and only if, all elements are finite.

If any element is either NaN, positive or negative infinity, this will return false.

Source

pub fn is_nan(&self) -> bool

Returns true if any elements are NaN.

Source

pub fn abs_diff_eq(self, rhs: Self, max_abs_diff: f32) -> bool

Returns true if the absolute difference of all elements between self and rhs is less than or equal to max_abs_diff.

Source

pub fn inverse(&self) -> Self

Return the inverse of this isometry.

Note that if the isometry is not invertible the result will be invalid.

Trait Implementations§

Source§

impl AbsDiffEq for Isometry3A

Available on crate feature approx only.
Source§

type Epsilon = <f32 as AbsDiffEq>::Epsilon

Used for specifying relative comparisons.
Source§

fn default_epsilon() -> Self::Epsilon

The default tolerance to use when testing values that are close together. Read more
Source§

fn abs_diff_eq(&self, other: &Self, epsilon: Self::Epsilon) -> bool

A test for equality that uses the absolute difference to compute the approximate equality of two numbers.
Source§

fn abs_diff_ne(&self, other: &Rhs, epsilon: Self::Epsilon) -> bool

The inverse of AbsDiffEq::abs_diff_eq.
Source§

impl Clone for Isometry3A

Source§

fn clone(&self) -> Isometry3A

Returns a duplicate of the value. Read more
1.0.0 · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Debug for Isometry3A

Source§

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

Formats the value using the given formatter. Read more
Source§

impl Default for Isometry3A

Source§

fn default() -> Isometry3A

Returns the “default value” for a type. Read more
Source§

impl From<Isometry3A> for Affine3A

Source§

fn from(i: Isometry3A) -> Affine3A

Converts to this type from the input type.
Source§

impl From<Isometry3A> for Mat4

Source§

fn from(i: Isometry3A) -> Mat4

Converts to this type from the input type.
Source§

impl Mul<Isometry3A> for Mat4

Source§

type Output = Mat4

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: Isometry3A) -> Self::Output

Performs the * operation. Read more
Source§

impl Mul<Mat4> for Isometry3A

Source§

type Output = Mat4

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: Mat4) -> Self::Output

Performs the * operation. Read more
Source§

impl Mul for Isometry3A

Source§

type Output = Isometry3A

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: Isometry3A) -> Self::Output

Performs the * operation. Read more
Source§

impl MulAssign for Isometry3A

Source§

fn mul_assign(&mut self, rhs: Isometry3A)

Performs the *= operation. Read more
Source§

impl PartialEq for Isometry3A

Source§

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

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

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

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl RelativeEq for Isometry3A

Available on crate feature approx only.
Source§

fn default_max_relative() -> Self::Epsilon

The default relative tolerance for testing values that are far-apart. Read more
Source§

fn relative_eq( &self, other: &Self, epsilon: Self::Epsilon, max_relative: Self::Epsilon, ) -> bool

A test for equality that uses a relative comparison if the values are far apart.
Source§

fn relative_ne( &self, other: &Rhs, epsilon: Self::Epsilon, max_relative: Self::Epsilon, ) -> bool

The inverse of RelativeEq::relative_eq.
Source§

impl UlpsEq for Isometry3A

Available on crate feature approx only.
Source§

fn default_max_ulps() -> u32

The default ULPs to tolerate when testing values that are far-apart. Read more
Source§

fn ulps_eq(&self, other: &Self, epsilon: Self::Epsilon, max_ulps: u32) -> bool

A test for equality that uses units in the last place (ULP) if the values are far apart.
Source§

fn ulps_ne(&self, other: &Rhs, epsilon: Self::Epsilon, max_ulps: u32) -> bool

The inverse of UlpsEq::ulps_eq.
Source§

impl Copy for Isometry3A

Source§

impl StructuralPartialEq for Isometry3A

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.