pub struct GlobalTransform(pub Mat4);
Expand description
A component that stores the final, calculated, world-space transformation of an entity.
This component’s value is the result of combining the entity’s local Transform
with the GlobalTransform
of its Parent
, recursively up to the root of the scene.
It is intended to be read-only for most systems (like rendering and physics). It should only be written to by the dedicated transform propagation system. This acts as a cache to avoid re-calculating the full transform hierarchy every time it’s needed.
Tuple Fields§
§0: Mat4
Implementations§
Trait Implementations§
Source§impl Clone for GlobalTransform
impl Clone for GlobalTransform
Source§fn clone(&self) -> GlobalTransform
fn clone(&self) -> GlobalTransform
Returns a duplicate 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 Debug for GlobalTransform
impl Debug for GlobalTransform
Source§impl Default for GlobalTransform
impl Default for GlobalTransform
Source§impl PartialEq for GlobalTransform
impl PartialEq for GlobalTransform
impl Component for GlobalTransform
impl Copy for GlobalTransform
impl StructuralPartialEq for GlobalTransform
Auto Trait Implementations§
impl Freeze for GlobalTransform
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> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<C1> ComponentBundle for C1where
C1: Component,
impl<C1> ComponentBundle for C1where
C1: Component,
Source§fn type_ids() -> Vec<TypeId>
fn type_ids() -> Vec<TypeId>
Returns the sorted list of
TypeId
s for the components in this bundle. Read moreSource§fn create_columns() -> HashMap<TypeId, Box<dyn AnyVec>>
fn create_columns() -> HashMap<TypeId, Box<dyn AnyVec>>
Creates the set of empty, type-erased
Vec<T>
columns required to store
this bundle’s components. Read moreSource§fn update_metadata(
metadata: &mut EntityMetadata,
location: PageIndex,
registry: &ComponentRegistry,
)
fn update_metadata( metadata: &mut EntityMetadata, location: PageIndex, registry: &ComponentRegistry, )
Updates the appropriate fields in an
EntityMetadata
struct to point
to the location of this bundle’s data. Read moreSource§unsafe fn add_to_page(self, page: &mut ComponentPage)
unsafe fn add_to_page(self, page: &mut ComponentPage)
Adds the components from this bundle into the specified
ComponentPage
. Read more