[]Struct bevy::transform::components::Transform

pub struct Transform {
    pub translation: Vec3,
    pub rotation: Quat,
    pub scale: Vec3,
}

Fields

translation: Vec3rotation: Quatscale: Vec3

Implementations

impl Transform

pub fn identity() -> Transform

pub fn from_matrix(matrix: Mat4) -> Transform

pub fn from_translation(translation: Vec3) -> Transform

pub fn from_rotation(rotation: Quat) -> Transform

pub fn from_scale(scale: Vec3) -> Transform

pub fn looking_at(self, target: Vec3, up: Vec3) -> Transform

Returns transform with the same translation and scale, but rotation so that transform.forward() points at target

pub fn compute_matrix(&self) -> Mat4

pub fn forward(&self) -> Vec3

pub fn rotate(&mut self, rotation: Quat)

Rotate the transform by the given rotation

pub fn mul_transform(&self, transform: Transform) -> Transform

pub fn mul_vec3(&self, value: Vec3) -> Vec3

pub fn apply_non_uniform_scale(&mut self, scale: Vec3)

pub fn look_at(&mut self, target: Vec3, up: Vec3)

Trait Implementations

impl Clone for Transform

impl Copy for Transform

impl Debug for Transform

impl Default for Transform

impl From<GlobalTransform> for Transform

impl From<Transform> for GlobalTransform

impl GetTypeRegistration for Transform

impl Mul<Transform> for Transform

type Output = Transform

The resulting type after applying the * operator.

impl Mul<Transform> for GlobalTransform

type Output = GlobalTransform

The resulting type after applying the * operator.

impl Mul<Vec3> for Transform

type Output = Vec3

The resulting type after applying the * operator.

impl PartialEq<Transform> for Transform

impl Reflect for Transform

impl Struct for Transform

impl StructuralPartialEq for Transform

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Any for T where
    T: Any

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> CloneAny for T where
    T: Clone + Any

impl<T> Component for T where
    T: 'static + Send + Sync

impl<T> Downcast for T where
    T: Any

impl<T> DowncastSync for T where
    T: Send + Sync + Any

impl<T> From<T> for T[src]

impl<T> FromResources for T where
    T: Default

impl<S> GetField for S where
    S: Struct

impl<T> GetPath for T where
    T: Reflect

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Resource for T where
    T: 'static + Send + Sync

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

impl<T> TypeData for T where
    T: 'static + Send + Sync + Clone

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,