[][src]Struct myelin_engine::object::ObjectDescription

#[non_exhaustive]
pub struct ObjectDescription<T> { pub shape: Polygon, pub location: Point, pub rotation: Radians, pub mobility: Mobility, pub passable: bool, pub associated_data: T, }

The behaviourless description of an object that has been placed inside a Simulation.

Fields (Non-exhaustive)

Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.
shape: Polygon

The vertices defining the shape of the object in relation to its position

location: Point

The global location of the center of the object

rotation: Radians

The object's rotation

mobility: Mobility

The current velocity of the object, defined as a two dimensional vector relative to the objects center

passable: bool

Whether the object is passable or not

associated_data: T

Arbitrary data associated with this object

Trait Implementations

impl<T: Clone> Clone for ObjectDescription<T>[src]

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

Performs copy-assignment from source. Read more

impl<T: PartialEq> PartialEq<ObjectDescription<T>> for ObjectDescription<T>[src]

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

impl<T: Debug> Debug for ObjectDescription<T>[src]

impl<T> Serialize for ObjectDescription<T> where
    T: Serialize
[src]

impl<'de, T> Deserialize<'de> for ObjectDescription<T> where
    T: Deserialize<'de>, 
[src]

Auto Trait Implementations

impl<T> Send for ObjectDescription<T> where
    T: Send

impl<T> Sync for ObjectDescription<T> where
    T: Sync

Blanket Implementations

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

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

type Owned = T

The resulting type after obtaining ownership.

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

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

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

impl<T> DeserializeOwned for T where
    T: Deserialize<'de>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

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

impl<T> Downcast for T where
    T: Any

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