[]Struct bevy::transform::components::GlobalTransform

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

Fields

translation: Vec3rotation: Quatscale: Vec3

Implementations

impl GlobalTransform

pub fn identity() -> GlobalTransform

pub fn from_matrix(matrix: Mat4) -> GlobalTransform

pub fn from_translation(translation: Vec3) -> GlobalTransform

pub fn from_rotation(rotation: Quat) -> GlobalTransform

pub fn from_scale(scale: Vec3) -> GlobalTransform

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

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) -> GlobalTransform

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 GlobalTransform

impl Copy for GlobalTransform

impl Debug for GlobalTransform

impl Default for GlobalTransform

impl From<GlobalTransform> for Transform

impl From<Transform> for GlobalTransform

impl GetTypeRegistration for GlobalTransform

impl Mul<GlobalTransform> for GlobalTransform

type Output = GlobalTransform

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 GlobalTransform

type Output = Vec3

The resulting type after applying the * operator.

impl PartialEq<GlobalTransform> for GlobalTransform

impl Reflect for GlobalTransform

impl RenderResource for GlobalTransform

impl RenderResources for GlobalTransform

impl Struct for GlobalTransform

impl StructuralPartialEq for GlobalTransform

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>,