Struct shiv_transform::GlobalTransform
source · Expand description
A global transform representing an affine transformation.
This is the transform relative to the origin.
Fields§
§translation: Vec3
§matrix: Mat3
Implementations§
source§impl GlobalTransform
impl GlobalTransform
pub const IDENTITY: Self = _
pub const fn from_xyz(x: f32, y: f32, z: f32) -> Self
pub const fn from_translation(translation: Vec3) -> Self
pub fn from_rotation(rotation: Quat) -> Self
pub fn from_scale(scale: Vec3) -> Self
pub const fn from_matrix(matrix: Mat3) -> Self
pub const fn to_affine(self) -> Affine3A
pub fn local_x(&self) -> Vec3
pub fn local_y(&self) -> Vec3
pub fn local_z(&self) -> Vec3
pub fn left(&self) -> Vec3
pub fn right(&self) -> Vec3
pub fn up(&self) -> Vec3
pub fn down(&self) -> Vec3
pub fn forward(&self) -> Vec3
pub fn back(&self) -> Vec3
pub fn compute_matrix(&self) -> Mat4
Trait Implementations§
source§impl Clone for GlobalTransform
impl Clone for GlobalTransform
source§fn clone(&self) -> GlobalTransform
fn clone(&self) -> GlobalTransform
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Component for GlobalTransform
impl Component for GlobalTransform
type Storage = DenseStorage
source§impl Debug for GlobalTransform
impl Debug for GlobalTransform
source§impl Default for GlobalTransform
impl Default for GlobalTransform
source§impl From<&Transform> for GlobalTransform
impl From<&Transform> for GlobalTransform
source§impl From<Transform> for GlobalTransform
impl From<Transform> for GlobalTransform
source§impl Mul<GlobalTransform> for GlobalTransform
impl Mul<GlobalTransform> for GlobalTransform
§type Output = GlobalTransform
type Output = GlobalTransform
The resulting type after applying the
*
operator.source§impl Mul<Transform> for GlobalTransform
impl Mul<Transform> for GlobalTransform
source§impl Mul<Vec3> for GlobalTransform
impl Mul<Vec3> for GlobalTransform
source§impl MulAssign<GlobalTransform> for GlobalTransform
impl MulAssign<GlobalTransform> for GlobalTransform
source§fn mul_assign(&mut self, rhs: GlobalTransform)
fn mul_assign(&mut self, rhs: GlobalTransform)
Performs the
*=
operation. Read moresource§impl PartialEq<GlobalTransform> for GlobalTransform
impl PartialEq<GlobalTransform> for GlobalTransform
source§fn eq(&self, other: &GlobalTransform) -> bool
fn eq(&self, other: &GlobalTransform) -> bool
impl Copy for GlobalTransform
impl StructuralPartialEq for GlobalTransform
Auto Trait Implementations§
impl RefUnwindSafe for GlobalTransform
impl Send for GlobalTransform
impl Sync for GlobalTransform
impl Unpin for GlobalTransform
impl UnwindSafe for GlobalTransform
Blanket Implementations§
source§impl<T> Bundle for Twhere
T: Component,
impl<T> Bundle for Twhere
T: Component,
type Iter = Once<*mut u8>
fn components(components: &mut Components) -> Vec<ComponentId, Global>
unsafe fn get_components(bundle: *mut T) -> <T as Bundle>::Iter
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>
fn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>
Convert
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
. Read more§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
Convert
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
. Read more§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s. Read more§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s. Read more