[][src]Struct amethyst_core::transform::components::Parent

pub struct Parent {
    pub entity: Entity,
}

Component for defining a parent entity.

The entity with this component has a parent, rather than is a parent.

If the parent entity contains a transform, then the child's transform will be applied relative to the parent's transform. For example, if a parent rotates 45 degrees around the Z axis, then the child's coordinate system will start out also rotated by 45 degrees around the Z axis.

If the parent entity has its own parent (and so on) then the transforms will all be applied in order from the oldest ancestor to the child.

Fields

entity: Entity

The parent entity

Methods

impl Parent[src]

pub fn new(entity: Entity) -> Self[src]

Constructs a new Parent.

Trait Implementations

impl Eq for Parent[src]

impl Clone for Parent[src]

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl PartialOrd<Parent> for Parent[src]

impl PartialEq<Parent> for Parent[src]

impl Ord for Parent[src]

fn max(self, other: Self) -> Self1.21.0[src]

Compares and returns the maximum of two values. Read more

fn min(self, other: Self) -> Self1.21.0[src]

Compares and returns the minimum of two values. Read more

fn clamp(self, min: Self, max: Self) -> Self[src]

🔬 This is a nightly-only experimental API. (clamp)

Restrict a value to a certain interval. Read more

impl Debug for Parent[src]

impl Component for Parent[src]

type Storage = FlaggedStorage<Self, DenseVecStorage<Self>>

Associated storage type for this component.

impl Parent for Parent[src]

Auto Trait Implementations

impl Unpin for Parent

impl Sync for Parent

impl Send for Parent

impl UnwindSafe for Parent

impl RefUnwindSafe for Parent

Blanket Implementations

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

type Owned = T

The resulting type after obtaining ownership.

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

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

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> Borrow<T> for T where
    T: ?Sized
[src]

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

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

impl<SS, SP> SupersetOf<SS> for SP where
    SS: SubsetOf<SP>, 
[src]

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

type Output = T

Should always be Self

impl<T> Resource for T where
    T: Any + Send + Sync
[src]

impl<T> Event for T where
    T: Send + Sync + 'static, 
[src]

impl<T> Any for T where
    T: Any
[src]