[][src]Struct brs::Brick

pub struct Brick {
    pub asset_name_index: u32,
    pub size: (u32, u32, u32),
    pub position: (i32, i32, i32),
    pub direction: Direction,
    pub rotation: Rotation,
    pub collision: bool,
    pub visibility: bool,
    pub material_index: u32,
    pub color: ColorMode,
    pub owner_index: u32,
}

A single brick in a save file.

asset_name_index, material_index, owner_index and the Set variant of color target the lookup tables in either WriteData or the headers, when reading.

size is used for procedural bricks. For fixed size brick assets, it's more efficient to use (0, 0, 0) (the file will be smaller).

Fields

asset_name_index: u32size: (u32, u32, u32)position: (i32, i32, i32)direction: Directionrotation: Rotationcollision: boolvisibility: boolmaterial_index: u32color: ColorModeowner_index: u32

Trait Implementations

impl PartialEq<Brick> for Brick[src]

impl Clone for Brick[src]

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

Performs copy-assignment from source. Read more

impl Debug for Brick[src]

Auto Trait Implementations

impl Send for Brick

impl Sync for Brick

Blanket Implementations

impl<T, U> Into 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> From for T[src]

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

type Error = Infallible

The type returned in the event of a conversion error.

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

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

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

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.