Trait avian3d::collision::PhysicsLayer

source ·
pub trait PhysicsLayer: Sized {
    // Required methods
    fn to_bits(&self) -> u32;
    fn all_bits() -> u32;
}
Expand description

A layer used for determining which entities should interact with each other. Physics layers are used heavily by CollisionLayers.

This trait can be derived for enums with #[derive(PhysicsLayer)].

Required Methods§

source

fn to_bits(&self) -> u32

Converts the layer to a bitmask.

source

fn all_bits() -> u32

Creates a layer bitmask with all bits set to 1.

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl<L: PhysicsLayer> PhysicsLayer for &L

Implementors§