Struct brickadia::save::Brick[][src]

pub struct Brick {
Show 13 fields pub asset_name_index: u32, pub size: Size, pub position: (i32, i32, i32), pub direction: Direction, pub rotation: Rotation, pub collision: Collision, pub visibility: bool, pub material_index: u32, pub physical_index: u32, pub material_intensity: u32, pub color: BrickColor, pub owner_index: u32, pub components: HashMap<String, HashMap<String, UnrealType>>,
}
Expand description

A brick.

Fields

asset_name_index: u32

The asset name index of the brick, referring to Header2’s brick_assets.

size: Size

The size of the brick. Bricks that are not procedural should have this set to Size::Empty.

position: (i32, i32, i32)

The position of the brick.

direction: Direction

The direction of the brick.

rotation: Rotation

The rotation of the brick.

collision: Collision

The collision flags of the brick.

visibility: bool

Whether or not the brick is visible.

material_index: u32

The material index of the brick.

physical_index: u32

The physical index of the brick.

material_intensity: u32

The material intensity of the brick.

color: BrickColor

The color of the brick. When referring to an index from the colors array in Header2, use BrickColor::Index. Otherwise, use BrickColor::Unique(Color).

owner_index: u32

The owner index of the brick. When 0, this brick’s owner is PUBLIC. Otherwise, it refers to Header2’s brick_owners, 1-indexed.

components: HashMap<String, HashMap<String, UnrealType>>

The components on this brick.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Returns the “default value” for a type. Read more

Feeds this value into the given Hasher. Read more

Feeds a slice of this type into the given Hasher. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

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

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.