[][src]Struct genie_scx::ScenarioObject

pub struct ScenarioObject {
    pub position: (f32, f32, f32),
    pub id: i32,
    pub object_type: UnitTypeID,
    pub state: u8,
    pub angle: f32,
    pub frame: i16,
    pub garrisoned_in: Option<i32>,
}

An object placed in the scenario.

Fields

position: (f32, f32, f32)

Position (x, y, z) of this object.

id: i32

This object's unique ID.

object_type: UnitTypeID

The type ID of this object.

state: u8

State value.

angle: f32

Radian angle this unit is facing.

frame: i16

Current animation frame.

garrisoned_in: Option<i32>

ID of the object this object is garrisoned in, or -1 when not garrisoned.

Implementations

impl ScenarioObject[src]

pub fn read_from(input: impl Read, version: SCXVersion) -> Result<Self>[src]

pub fn write_to(&self, output: impl Write, version: SCXVersion) -> Result<()>[src]

Trait Implementations

impl Clone for ScenarioObject[src]

impl Debug for ScenarioObject[src]

impl Default for ScenarioObject[src]

Auto Trait Implementations

Blanket Implementations

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

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

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

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

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

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.