#[repr(C)]pub struct b3ShapeDef {Show 16 fields
pub userData: *mut c_void,
pub materials: *mut b3SurfaceMaterial,
pub materialCount: c_int,
pub baseMaterial: b3SurfaceMaterial,
pub density: f32,
pub explosionScale: f32,
pub filter: b3Filter,
pub enableCustomFiltering: bool,
pub isSensor: bool,
pub enableSensorEvents: bool,
pub enableContactEvents: bool,
pub enableHitEvents: bool,
pub enablePreSolveEvents: bool,
pub invokeContactCreation: bool,
pub updateBodyMass: bool,
pub internalValue: c_int,
}Expand description
Used to create a shape @ingroup shape
Fields§
§userData: *mut c_voidUse this to store application specific shape data.
materials: *mut b3SurfaceMaterialSurface material used on mesh shapes per triangle. Ignored for convex shapes. Ignored for compound shapes.
materialCount: c_intSurface material count.
baseMaterial: b3SurfaceMaterialThe base surface material. Ignored for compound shapes.
density: f32The density, usually in kg/m^3.
explosionScale: f32Explosion scale for b3World_Explode. non-dimensional
filter: b3FilterContact filtering data.
enableCustomFiltering: boolEnable custom filtering. Only one of the two shapes needs to enable custom filtering. See b3WorldDef.
isSensor: boolA sensor shape generates overlap events but never generates a collision response. Sensors do not have continuous collision. Instead, use a ray or shape cast for those scenarios. Sensors still contribute to the body mass if they have non-zero density. @note Sensor events are disabled by default. @see enableSensorEvents
enableSensorEvents: boolEnable sensor events for this shape. This applies to sensors and non-sensors. False by default, even for sensors.
enableContactEvents: boolEnable contact events for this shape. Only applies to kinematic and dynamic bodies. Ignored for sensors. False by default.
enableHitEvents: boolEnable hit events for this shape. Only applies to kinematic and dynamic bodies. Ignored for sensors. False by default.
enablePreSolveEvents: boolEnable pre-solve contact events for this shape. Only applies to dynamic bodies. These are expensive and must be carefully handled due to multithreading. Ignored for sensors.
invokeContactCreation: boolWhen shapes are created they will scan the environment for collision the next time step. This can significantly slow down static body creation when there are many static shapes. This is flag is ignored for dynamic and kinematic shapes which always invoke contact creation.
updateBodyMass: boolShould the body update the mass properties when this shape is created. Default is true.
internalValue: c_intUsed internally to detect a valid definition. DO NOT SET.
Trait Implementations§
Source§impl Clone for b3ShapeDef
impl Clone for b3ShapeDef
Source§fn clone(&self) -> b3ShapeDef
fn clone(&self) -> b3ShapeDef
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more