pub struct ShapeDef {Show 16 fields
pub name: String,
pub user_data: u64,
pub materials: Vec<SurfaceMaterial>,
pub base_material: SurfaceMaterial,
pub density: f32,
pub explosion_scale: f32,
pub filter: Filter,
pub enable_custom_filtering: bool,
pub is_sensor: bool,
pub enable_sensor_events: bool,
pub enable_contact_events: bool,
pub enable_hit_events: bool,
pub enable_pre_solve_events: bool,
pub invoke_contact_creation: bool,
pub update_body_mass: bool,
pub internal_value: i32,
}Expand description
Used to create a shape. (b3ShapeDef)
Fields§
§name: StringOptional shape name for debugging.
user_data: u64Application-specific shape data.
materials: Vec<SurfaceMaterial>Per-triangle materials for meshes. Empty means use Self::base_material.
Ignored for convex shapes and compounds.
base_material: SurfaceMaterialThe base surface material. Ignored for compound shapes.
density: f32The density, usually in kg/m^3.
explosion_scale: f32Explosion scale for World::explode. Non-dimensional.
filter: FilterContact filtering data.
enable_custom_filtering: boolEnable custom filtering. Only one of the two shapes needs to enable it.
is_sensor: boolA sensor shape generates overlap events but never a collision response.
enable_sensor_events: boolEnable sensor events for this shape. False by default, even for sensors.
enable_contact_events: boolEnable contact events. Only kinematic/dynamic; ignored for sensors.
enable_hit_events: boolEnable hit events. Only kinematic/dynamic; ignored for sensors.
enable_pre_solve_events: boolEnable pre-solve contact events. Only dynamic; ignored for sensors.
invoke_contact_creation: boolWhen true, static shapes scan for contacts on the next step.
update_body_mass: boolShould the body update mass properties when this shape is created.
internal_value: i32Used internally to detect a valid definition. DO NOT SET.