azalea_physics::collision

Trait BlockWithShape

Source
pub trait BlockWithShape {
    // Required methods
    fn shape(&self) -> &'static VoxelShape;
    fn is_shape_empty(&self) -> bool;
    fn is_shape_full(&self) -> bool;
}

Required Methods§

Source

fn shape(&self) -> &'static VoxelShape

Source

fn is_shape_empty(&self) -> bool

Tells you whether the block has an empty shape.

This is slightly more efficient than calling shape() and comparing against EMPTY_SHAPE.

Source

fn is_shape_full(&self) -> bool

Implementations on Foreign Types§

Source§

impl BlockWithShape for BlockState

Source§

fn shape(&self) -> &'static VoxelShape

Source§

fn is_shape_empty(&self) -> bool

Source§

fn is_shape_full(&self) -> bool

Implementors§