Rapier C — 2D / f32 0.36.0+c.0
Loading...
Searching...
No Matches
R2ColliderDesc Struct Reference

Copyable collider construction data. More...

#include <rapier.h>

Data Fields

struct R2ShapeDesc shape
 Non-owning shape description; build/insert consumes its views synchronously.
struct R2Pose position
 Pose relative to the parent body; world-space for a collider without a parent.
uint32_t massMode
 R2_MASS_DENSITY, R2_MASS_TOTAL, or R2_MASS_PROPERTIES.
R2Real density
 Nonnegative mass per unit volume.
R2Real mass
 Mass; nonnegative when supplied as input.
struct R2MassProperties massProperties
 Explicit local mass and inertia when massMode selects them.
R2Real friction
 Nonnegative friction coefficient.
R2Real restitution
 Nonnegative restitution coefficient.
uint32_t frictionCombineRule
 R2_COMBINE_AVERAGE, MIN, MULTIPLY, MAX, CLAMPED_SUM, or GEOMETRIC_MEAN.
uint32_t restitutionCombineRule
 R2_COMBINE_AVERAGE, MIN, MULTIPLY, MAX, CLAMPED_SUM, or GEOMETRIC_MEAN.
R2Bool isSensor
 1 detects intersections without generating contact forces.
R2Bool enabled
 Whether this setting/object is enabled (0 or 1).
struct R2InteractionGroups collisionGroups
 Groups controlling collision detection.
struct R2InteractionGroups solverGroups
 Groups controlling contact-force solving.
uint16_t activeCollisionTypes
 Bitmask of body-type pairs allowed to collide.
uint32_t activeHooks
 Hook flags enabling pair filtering/contact modification.
uint32_t activeEvents
 R2_COLLISION_EVENTS and/or R2_CONTACT_FORCE_EVENTS.
R2Real contactForceEventThreshold
 Nonnegative force threshold for force events.
R2Real contactSkin
 Nonnegative extra separation distance around the collider.
struct R2UserData userData
 Application data; Rapier does not own pointers encoded in it.

Detailed Description

Copyable collider construction data.

Shape inputs are borrowed, never owned.

Field Documentation

◆ activeCollisionTypes

uint16_t R2ColliderDesc::activeCollisionTypes

Bitmask of body-type pairs allowed to collide.

◆ activeEvents

uint32_t R2ColliderDesc::activeEvents

R2_COLLISION_EVENTS and/or R2_CONTACT_FORCE_EVENTS.

◆ activeHooks

uint32_t R2ColliderDesc::activeHooks

Hook flags enabling pair filtering/contact modification.

◆ collisionGroups

struct R2InteractionGroups R2ColliderDesc::collisionGroups

Groups controlling collision detection.

◆ contactForceEventThreshold

R2Real R2ColliderDesc::contactForceEventThreshold

Nonnegative force threshold for force events.

◆ contactSkin

R2Real R2ColliderDesc::contactSkin

Nonnegative extra separation distance around the collider.

◆ density

R2Real R2ColliderDesc::density

Nonnegative mass per unit volume.

◆ enabled

R2Bool R2ColliderDesc::enabled

Whether this setting/object is enabled (0 or 1).

◆ friction

R2Real R2ColliderDesc::friction

Nonnegative friction coefficient.

◆ frictionCombineRule

uint32_t R2ColliderDesc::frictionCombineRule

R2_COMBINE_AVERAGE, MIN, MULTIPLY, MAX, CLAMPED_SUM, or GEOMETRIC_MEAN.

◆ isSensor

R2Bool R2ColliderDesc::isSensor

1 detects intersections without generating contact forces.

◆ mass

R2Real R2ColliderDesc::mass

Mass; nonnegative when supplied as input.

◆ massMode

uint32_t R2ColliderDesc::massMode

R2_MASS_DENSITY, R2_MASS_TOTAL, or R2_MASS_PROPERTIES.

◆ massProperties

struct R2MassProperties R2ColliderDesc::massProperties

Explicit local mass and inertia when massMode selects them.

◆ position

struct R2Pose R2ColliderDesc::position

Pose relative to the parent body; world-space for a collider without a parent.

◆ restitution

R2Real R2ColliderDesc::restitution

Nonnegative restitution coefficient.

◆ restitutionCombineRule

uint32_t R2ColliderDesc::restitutionCombineRule

R2_COMBINE_AVERAGE, MIN, MULTIPLY, MAX, CLAMPED_SUM, or GEOMETRIC_MEAN.

◆ shape

struct R2ShapeDesc R2ColliderDesc::shape

Non-owning shape description; build/insert consumes its views synchronously.

◆ solverGroups

struct R2InteractionGroups R2ColliderDesc::solverGroups

Groups controlling contact-force solving.

◆ userData

struct R2UserData R2ColliderDesc::userData

Application data; Rapier does not own pointers encoded in it.


The documentation for this struct was generated from the following file: