pub struct ChainDef {
pub user_data: u64,
pub points: Vec<Vec2>,
pub materials: Vec<SurfaceMaterial>,
pub filter: Filter,
pub is_loop: bool,
pub enable_sensor_events: bool,
pub internal_value: i32,
}Expand description
Used to create a chain of line segments. Must be initialized using
default_chain_def. (b2ChainDef)
The C struct uses points/count and materials/materialCount pointer +
length pairs; the Rust port carries owned Vecs whose lengths encode the
counts (the C notes these are cloned).
Fields§
§user_data: u64Application specific shape data.
points: Vec<Vec2>An array of at least 4 points.
materials: Vec<SurfaceMaterial>Surface materials. Must have length 1 (one material for all segments) or
points.len() (a unique material per segment).
filter: FilterContact filtering data.
is_loop: boolIndicates a closed chain formed by connecting the first and last points.
enable_sensor_events: boolEnable sensors to detect this chain. False by default.
internal_value: i32Used internally to detect a valid definition. DO NOT SET.
Trait Implementations§
impl StructuralPartialEq for ChainDef
Auto Trait Implementations§
impl Freeze for ChainDef
impl RefUnwindSafe for ChainDef
impl Send for ChainDef
impl Sync for ChainDef
impl Unpin for ChainDef
impl UnsafeUnpin for ChainDef
impl UnwindSafe for ChainDef
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more