[−][src]Struct bevy::prelude::LocalTransform
Implementations
impl LocalTransform
[src]
pub fn identity() -> LocalTransform
[src]
Methods from Deref<Target = Mat4>
pub fn to_cols_array(&self) -> [f32; 16]
[src]
Creates a [f32; 16]
storing data in column major order.
If you require data in row major order transpose
the matrix first.
pub fn to_cols_array_2d(&self) -> [[f32; 4]; 4]
[src]
Creates a [[f32; 4]; 4]
storing data in column major order.
If you require data in row major order transpose
the matrix first.
pub fn to_scale_rotation_translation(&self) -> (Vec3, Quat, Vec3)
[src]
Extracts scale
, rotation
and translation
from self
. The input matrix is expected to
be a 4x4 homogeneous transformation matrix otherwise the output will be invalid.
pub fn set_x_axis(&mut self, x: Vec4)
[src]
pub fn set_y_axis(&mut self, y: Vec4)
[src]
pub fn set_z_axis(&mut self, z: Vec4)
[src]
pub fn set_w_axis(&mut self, w: Vec4)
[src]
pub fn x_axis(&self) -> Vec4
[src]
pub fn y_axis(&self) -> Vec4
[src]
pub fn z_axis(&self) -> Vec4
[src]
pub fn w_axis(&self) -> Vec4
[src]
pub fn transpose(&self) -> Mat4
[src]
Returns the transpose of self
.
pub fn determinant(&self) -> f32
[src]
Returns the determinant of self
.
pub fn inverse(&self) -> Mat4
[src]
Returns the inverse of self
.
If the matrix is not invertible the returned matrix will be invalid.
pub fn mul_vec4(&self, other: Vec4) -> Vec4
[src]
pub fn mul_mat4(&self, other: &Mat4) -> Mat4
[src]
Multiplies two 4x4 matrices.
pub fn add_mat4(&self, other: &Mat4) -> Mat4
[src]
pub fn sub_mat4(&self, other: &Mat4) -> Mat4
[src]
pub fn mul_scalar(&self, other: f32) -> Mat4
[src]
pub fn transform_point3(&self, other: Vec3) -> Vec3
[src]
Transforms the given Vec3
as 3D point.
This is the equivalent of multiplying the Vec3
as a Vec4
where w
is 1.0
.
pub fn transform_vector3(&self, other: Vec3) -> Vec3
[src]
Transforms the give Vec3
as 3D vector.
This is the equivalent of multiplying the Vec3
as a Vec4
where w
is 0.0
.
pub fn abs_diff_eq(&self, other: Mat4, max_abs_diff: f32) -> bool
[src]
Returns true if the absolute difference of all elements between self
and other
is less than or equal to max_abs_diff
.
This can be used to compare if two Mat4
's contain similar elements. It
works best when comparing with a known value. The max_abs_diff
that
should be used used depends on the values being compared against.
For more on floating point comparisons see https://randomascii.wordpress.com/2012/02/25/comparing-floating-point-numbers-2012-edition/
Trait Implementations
impl Clone for LocalTransform
[src]
fn clone(&self) -> LocalTransform
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Copy for LocalTransform
[src]
impl Debug for LocalTransform
[src]
impl Default for LocalTransform
[src]
fn default() -> LocalTransform
[src]
impl Deref for LocalTransform
[src]
type Target = Mat4
The resulting type after dereferencing.
fn deref(&self) -> &<LocalTransform as Deref>::Target
[src]
impl DerefMut for LocalTransform
[src]
fn deref_mut(&mut self) -> &mut <LocalTransform as Deref>::Target
[src]
impl DeserializeProperty for LocalTransform
[src]
fn deserialize(
deserializer: &mut dyn Deserializer,
property_type_registry: &PropertyTypeRegistry
) -> Result<Box<dyn Property + 'static>, Error>
[src]
deserializer: &mut dyn Deserializer,
property_type_registry: &PropertyTypeRegistry
) -> Result<Box<dyn Property + 'static>, Error>
impl Display for LocalTransform
[src]
impl PartialEq<LocalTransform> for LocalTransform
[src]
fn eq(&self, other: &LocalTransform) -> bool
[src]
fn ne(&self, other: &LocalTransform) -> bool
[src]
impl Properties for LocalTransform
[src]
fn prop(&self, name: &str) -> Option<&(dyn Property + 'static)>
[src]
fn prop_mut(&mut self, name: &str) -> Option<&mut (dyn Property + 'static)>
[src]
fn prop_with_index(&self, index: usize) -> Option<&(dyn Property + 'static)>
[src]
fn prop_with_index_mut(
&mut self,
index: usize
) -> Option<&mut (dyn Property + 'static)>
[src]
&mut self,
index: usize
) -> Option<&mut (dyn Property + 'static)>
fn prop_name(&self, index: usize) -> Option<&str>
[src]
fn prop_len(&self) -> usize
[src]
fn iter_props(&self) -> PropertyIter
[src]
fn set_prop(&mut self, name: &str, value: &(dyn Property + 'static))
[src]
fn to_dynamic(&self) -> DynamicProperties
[src]
impl Property for LocalTransform
[src]
fn type_name(&self) -> &str
[src]
fn any(&self) -> &(dyn Any + 'static)
[src]
fn any_mut(&mut self) -> &mut (dyn Any + 'static)
[src]
fn clone_prop(&self) -> Box<dyn Property + 'static>
[src]
fn set(&mut self, value: &(dyn Property + 'static))
[src]
fn apply(&mut self, value: &(dyn Property + 'static))
[src]
fn as_properties(&self) -> Option<&(dyn Properties + 'static)>
[src]
fn serializable(
&'a self,
registry: &'a PropertyTypeRegistry
) -> Serializable<'a>
[src]
&'a self,
registry: &'a PropertyTypeRegistry
) -> Serializable<'a>
fn property_type(&self) -> PropertyType
[src]
Auto Trait Implementations
impl RefUnwindSafe for LocalTransform
impl Send for LocalTransform
impl Sync for LocalTransform
impl Unpin for LocalTransform
impl UnwindSafe for LocalTransform
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Any for T where
T: Any,
T: Any,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> CloneAny for T where
T: Clone + Any,
T: Clone + Any,
impl<T> Component for T where
T: 'static + Send + Sync,
T: 'static + Send + Sync,
impl<T> Downcast for T where
T: Any,
T: Any,
fn into_any(self: Box<T>) -> Box<dyn Any + 'static>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
fn as_any(&self) -> &(dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
impl<T> DowncastSync for T where
T: Send + Sync + Any,
T: Send + Sync + Any,
impl<T> From<T> for T
[src]
impl<T> FromResources for T where
T: Default,
[src]
T: Default,
fn from_resources(_resources: &Resources) -> T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<P> PropertiesVal for P where
P: Properties,
[src]
P: Properties,
fn prop_val<T>(&self, name: &str) -> Option<&T> where
T: 'static,
[src]
T: 'static,
fn set_prop_val<T>(&mut self, name: &str, value: T) where
T: 'static,
[src]
T: 'static,
impl<T> Resource for T where
T: 'static + Send + Sync,
[src]
T: 'static + Send + Sync,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,