|
JSim 2026.06.01-p(1)
|
3D rigid-body style ball simulator with drag, Magnus lift, and ground contact. More...
#include <ball_physics.hpp>
Classes | |
| struct | Config |
| Runtime physics environment parameters. More... | |
| struct | BallProperties |
| Physical parameters for the ball body. More... | |
| struct | BallState |
| Dynamic state advanced by step(). More... | |
| struct | PickupRequest |
| Request payload used to capture a ball into a carrier. More... | |
Public Member Functions | |
| BallPhysicsSim3D ()=default | |
| BallPhysicsSim3D (const Config &config) | |
| BallPhysicsSim3D (const Config &config, const BallProperties &ball_properties) | |
| const Config & | config () const |
| Returns active, sanitized configuration. | |
| void | setConfig (const Config &config) |
| Replaces configuration after value sanitization and clamping. | |
| const BallProperties & | ballProperties () const |
| Returns active, sanitized ball properties. | |
| void | setBallProperties (const BallProperties &props) |
| Replaces ball properties after sanitization. | |
| const BallState & | state () const |
| Returns current ball state. | |
| void | setState (const BallState &state) |
| Replaces state and sanitizes non-finite values. | |
| void | setCarrierPose (const Vector3 &carrier_position_m, const Vector3 &carrier_velocity_mps=Vector3::zero()) |
| Updates carrier pose used when the ball is in held mode. | |
| bool | requestPickup (const PickupRequest &pickup_request) |
| Attempts to pick up and hold the ball. | |
| void | release () |
| Releases the ball from held mode without changing velocity. | |
| void | shoot (const Vector3 &muzzle_position_m, const Vector3 &muzzle_velocity_mps, const Vector3 &muzzle_spin_radps=Vector3::zero()) |
| Places the ball at a muzzle pose and sets launch velocity/spin. | |
| void | step (double dt_s) |
| Advances simulation by dt seconds. | |
3D rigid-body style ball simulator with drag, Magnus lift, and ground contact.
Units are SI: meters, seconds, kilograms, radians.
|
default |
|
inlineexplicit |
|
inline |
|
inline |
Returns active, sanitized ball properties.
|
inline |
Returns active, sanitized configuration.
|
inline |
Releases the ball from held mode without changing velocity.
|
inline |
Attempts to pick up and hold the ball.
| pickup_request | Capture request parameters. |
|
inline |
Replaces ball properties after sanitization.
| props | New ball properties. |
|
inline |
Updates carrier pose used when the ball is in held mode.
| carrier_position_m | Carrier reference position in world frame. |
| carrier_velocity_mps | Carrier linear velocity in world frame. |
|
inline |
Replaces configuration after value sanitization and clamping.
| config | New config input. |
|
inline |
Replaces state and sanitizes non-finite values.
| state | New state value. |
|
inline |
Places the ball at a muzzle pose and sets launch velocity/spin.
| muzzle_position_m | Muzzle world position. |
| muzzle_velocity_mps | Launch velocity in world frame. |
| muzzle_spin_radps | Launch spin in world frame. |
|
inline |
Returns current ball state.
|
inline |
Advances simulation by dt seconds.
| dt_s | Simulation timestep in seconds. |