|
Rapier C — 2D / f64 0.36.0+c.0
|
Optional C++ ownership helpers. More...
Data Structures | |
| struct | Deleter |
| Deleter for an owned pointer; Free must succeed at destruction time. More... | |
Typedefs | |
| template<class T, R2Status(*)(T *) Free> | |
| using | Owner = std::unique_ptr<T, Deleter<T, Free>> |
| Unique owner of a native pointer; never wrap a borrowed pointer. | |
| using | World = Owner< R2World , r2FreeWorld > |
| Own a native World using its matching Free function. | |
| using | Shape = Owner< R2SharedShape , r2FreeSharedShape > |
| Own a native Shape using its matching Free function. | |
| using | EventCollector = Owner< R2EventCollector , r2FreeEventCollector > |
| Own a native EventCollector using its matching Free function. | |
| using | Snapshot = Owner< R2Bytes , r2FreeBytes > |
| Own a native Snapshot using its matching Free function. | |
| using | SoftBodyTearEvent = Owner< R2SoftBodyTearEvent , r2FreeSoftBodyTearEvent > |
| Own a native SoftBodyTearEvent using its matching Free function. | |
| using | ShapeMesh = Owner< R2ShapeMesh , r2FreeShapeMesh > |
| Own a native ShapeMesh using its matching Free function. | |
| using | KinematicCharacterController |
| Own a native KinematicCharacterController using its matching Free function. | |
| using | PidController = Owner< R2PidController , r2FreePidController > |
| Own a native PidController using its matching Free function. | |
Functions | |
| void | check (R2Status status) |
| Throw std::runtime_error with LastError when status is not OK. | |
| R2RigidBodyDesc | rigid_body (uint32_t kind=R2_DYNAMIC) |
| Return a POD rigid-body description with the selected body type. | |
| R2ColliderDesc | ball (R2Real radius) |
| Return a POD ball collider description. | |
| R2ColliderDesc | cuboid (R2Vector half_extents) |
| Return a POD cuboid collider description. | |
| R2SoftBodyDesc | soft_body () |
| Return native soft-body description defaults. | |
| R2JointDesc | joint (uint8_t locked_axes=0) |
| Return a joint description with the selected locked-axis mask. | |
| R2QueryOptions | queryOptions () |
| Return query defaults with no callback or exclusions. | |
| World | make_world () |
| Check the ABI and create an owned world; throw on failure. | |
Optional C++ ownership helpers.
| using rapier::EventCollector = Owner< R2EventCollector , r2FreeEventCollector > |
Own a native EventCollector using its matching Free function.
Own a native KinematicCharacterController using its matching Free function.
| using rapier::Owner = std::unique_ptr<T, Deleter<T, Free>> |
Unique owner of a native pointer; never wrap a borrowed pointer.
| using rapier::PidController = Owner< R2PidController , r2FreePidController > |
Own a native PidController using its matching Free function.
| using rapier::Shape = Owner< R2SharedShape , r2FreeSharedShape > |
Own a native Shape using its matching Free function.
| using rapier::ShapeMesh = Owner< R2ShapeMesh , r2FreeShapeMesh > |
Own a native ShapeMesh using its matching Free function.
| using rapier::Snapshot = Owner< R2Bytes , r2FreeBytes > |
Own a native Snapshot using its matching Free function.
Own a native SoftBodyTearEvent using its matching Free function.
| using rapier::World = Owner< R2World , r2FreeWorld > |
Own a native World using its matching Free function.
|
inline |
Return a POD ball collider description.
|
inline |
Throw std::runtime_error with LastError when status is not OK.
|
inline |
Return a POD cuboid collider description.
|
inline |
Return a joint description with the selected locked-axis mask.
|
inline |
Check the ABI and create an owned world; throw on failure.
|
inline |
Return query defaults with no callback or exclusions.
|
inline |
Return a POD rigid-body description with the selected body type.
|
inline |
Return native soft-body description defaults.