pub struct Shape {Show 22 fields
pub id: i32,
pub body_id: i32,
pub prev_shape_id: i32,
pub next_shape_id: i32,
pub sensor_index: i32,
pub material: SurfaceMaterial,
pub density: f32,
pub aabb_margin: f32,
pub aabb: Aabb,
pub fat_aabb: Aabb,
pub local_centroid: Vec2,
pub proxy_key: i32,
pub filter: Filter,
pub user_data: u64,
pub geometry: ShapeGeometry,
pub generation: u16,
pub enable_sensor_events: bool,
pub enable_contact_events: bool,
pub enable_custom_filtering: bool,
pub enable_hit_events: bool,
pub enable_pre_solve_events: bool,
pub enlarged_aabb: bool,
}Expand description
Internal shape. (b2Shape)
The C struct stores a b2ShapeType type tag plus a union of the concrete
geometries; the Rust port stores the tagged ShapeGeometry enum, and
Shape::shape_type recovers the tag.
Fields§
§id: i32§body_id: i32§prev_shape_id: i32§next_shape_id: i32§sensor_index: i32§material: SurfaceMaterial§density: f32§aabb_margin: f32§aabb: Aabb§fat_aabb: Aabb§local_centroid: Vec2§proxy_key: i32§filter: Filter§user_data: u64§geometry: ShapeGeometryThe shape geometry (C: type tag + union).
generation: u16§enable_sensor_events: bool§enable_contact_events: bool§enable_custom_filtering: bool§enable_hit_events: bool§enable_pre_solve_events: bool§enlarged_aabb: boolImplementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Shape
impl RefUnwindSafe for Shape
impl Send for Shape
impl Sync for Shape
impl Unpin for Shape
impl UnsafeUnpin for Shape
impl UnwindSafe for Shape
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