Function physx_sys::PxRigidActorExt_createExclusiveShape
source · pub unsafe extern "C" fn PxRigidActorExt_createExclusiveShape(
actor: *mut PxRigidActor,
geometry: *const PxGeometry,
materials: *const *mut PxMaterial,
materialCount: u16,
shapeFlags: PxShapeFlags
) -> *mut PxShape
Expand description
Creates a new shape with default properties and a list of materials and adds it to the list of shapes of this actor.
This is equivalent to the following
// reference count is 1
PxShape* shape(...) = PxGetPhysics().createShape(...);
// increments reference count
actor->attachShape(shape);
// releases user reference, leaving reference count at 1
shape->release();
As a consequence, detachShape() will result in the release of the last reference, and the shape will be deleted.
The default shape flags to be set are: eVISUALIZATION, eSIMULATION_SHAPE, eSCENE_QUERY_SHAPE (see PxShapeFlag
).
Triangle mesh, heightfield or plane geometry shapes configured as eSIMULATION_SHAPE are not supported for
non-kinematic PxRigidDynamic instances.
Creating compounds with a very large number of shapes may adversely affect performance and stability.
Sleeping: Does NOT wake the actor up automatically.
The newly created shape.