Rapier C — 3D / f32 0.36.0+c.0
Loading...
Searching...
No Matches
rapier Namespace Reference

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, R3Status(*)(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< R3World , r3FreeWorld >
 Own a native World using its matching Free function.
using Shape = Owner< R3SharedShape , r3FreeSharedShape >
 Own a native Shape using its matching Free function.
using EventCollector = Owner< R3EventCollector , r3FreeEventCollector >
 Own a native EventCollector using its matching Free function.
using Snapshot = Owner< R3Bytes , r3FreeBytes >
 Own a native Snapshot using its matching Free function.
using SoftBodyTearEvent = Owner< R3SoftBodyTearEvent , r3FreeSoftBodyTearEvent >
 Own a native SoftBodyTearEvent using its matching Free function.
using ShapeMesh = Owner< R3ShapeMesh , r3FreeShapeMesh >
 Own a native ShapeMesh using its matching Free function.
using KinematicCharacterController
 Own a native KinematicCharacterController using its matching Free function.
using PidController = Owner< R3PidController , r3FreePidController >
 Own a native PidController using its matching Free function.
using DynamicRayCastVehicleController
 Own a native DynamicRayCastVehicleController using its matching Free function.
using TriMeshData = Owner< R3TriMeshData , r3FreeTriMeshData >
 Own a native TriMeshData using its matching Free function.
using UrdfRobot = Owner< R3UrdfRobot , r3FreeUrdfRobot >
 Own a native UrdfRobot using its matching Free function.
using UrdfRobotHandles = Owner< R3UrdfRobotHandles , r3FreeUrdfRobotHandles >
 Own a native UrdfRobotHandles using its matching Free function.
using MjcfRobot = Owner< R3MjcfRobot , r3FreeMjcfRobot >
 Own a native MjcfRobot using its matching Free function.
using MjcfRobotHandles = Owner< R3MjcfRobotHandles , r3FreeMjcfRobotHandles >
 Own a native MjcfRobotHandles using its matching Free function.

Functions

void check (R3Status status)
 Throw std::runtime_error with LastError when status is not OK.
R3RigidBodyDesc rigid_body (uint32_t kind=R3_DYNAMIC)
 Return a POD rigid-body description with the selected body type.
R3ColliderDesc ball (R3Real radius)
 Return a POD ball collider description.
R3ColliderDesc cuboid (R3Vector half_extents)
 Return a POD cuboid collider description.
R3SoftBodyDesc soft_body ()
 Return native soft-body description defaults.
R3JointDesc joint (uint8_t locked_axes=0)
 Return a joint description with the selected locked-axis mask.
R3QueryOptions queryOptions ()
 Return query defaults with no callback or exclusions.
World make_world ()
 Check the ABI and create an owned world; throw on failure.

Detailed Description

Optional C++ ownership helpers.

Typedef Documentation

◆ DynamicRayCastVehicleController

Initial value:
R3Status r3FreeDynamicRayCastVehicleController(struct R3DynamicRayCastVehicleController *controller)
Release an owned dynamic ray cast vehicle controller.
struct R3DynamicRayCastVehicleController R3DynamicRayCastVehicleController
Vehicle controller borrowing its chassis world.
Definition rapier.h:12036
std::unique_ptr< T, Deleter< T, Free > > Owner
Unique owner of a native pointer; never wrap a borrowed pointer.
Definition rapier.hpp:31

Own a native DynamicRayCastVehicleController using its matching Free function.

◆ EventCollector

Own a native EventCollector using its matching Free function.

◆ KinematicCharacterController

◆ MjcfRobot

Own a native MjcfRobot using its matching Free function.

◆ MjcfRobotHandles

Own a native MjcfRobotHandles using its matching Free function.

◆ Owner

template<class T, R3Status(*)(T *) Free>
using rapier::Owner = std::unique_ptr<T, Deleter<T, Free>>

Unique owner of a native pointer; never wrap a borrowed pointer.

◆ PidController

Own a native PidController using its matching Free function.

◆ Shape

Own a native Shape using its matching Free function.

◆ ShapeMesh

Own a native ShapeMesh using its matching Free function.

◆ Snapshot

Own a native Snapshot using its matching Free function.

◆ SoftBodyTearEvent

Own a native SoftBodyTearEvent using its matching Free function.

◆ TriMeshData

Own a native TriMeshData using its matching Free function.

◆ UrdfRobot

Own a native UrdfRobot using its matching Free function.

◆ UrdfRobotHandles

Own a native UrdfRobotHandles using its matching Free function.

◆ World

Own a native World using its matching Free function.

Function Documentation

◆ ball()

R3ColliderDesc rapier::ball ( R3Real radius)
inline

Return a POD ball collider description.

◆ check()

void rapier::check ( R3Status status)
inline

Throw std::runtime_error with LastError when status is not OK.

◆ cuboid()

R3ColliderDesc rapier::cuboid ( R3Vector half_extents)
inline

Return a POD cuboid collider description.

◆ joint()

R3JointDesc rapier::joint ( uint8_t locked_axes = 0)
inline

Return a joint description with the selected locked-axis mask.

◆ make_world()

World rapier::make_world ( )
inline

Check the ABI and create an owned world; throw on failure.

◆ queryOptions()

R3QueryOptions rapier::queryOptions ( )
inline

Return query defaults with no callback or exclusions.

◆ rigid_body()

R3RigidBodyDesc rapier::rigid_body ( uint32_t kind = R3_DYNAMIC)
inline

Return a POD rigid-body description with the selected body type.

◆ soft_body()

R3SoftBodyDesc rapier::soft_body ( )
inline

Return native soft-body description defaults.