use std::fmt::Debug;
pub mod rapier3d;
pub use rapier3d::{Rapier3DBackend, Rapier3DJointHandle, Rapier3DWorld};
#[derive(Debug, Clone, Copy, PartialEq)]
pub struct Pose {
pub position: [f32; 3],
pub orientation: [f32; 4],
}
#[derive(Debug, Clone, Copy, PartialEq)]
pub struct Twist {
pub linear: [f32; 3],
pub angular: [f32; 3],
}
pub trait LocomotionBackend: 'static {
type World: Debug;
type BodyHandle: Copy + Debug;
type JointHandle: Copy + Debug;
fn step(world: &mut Self::World);
fn get_pose(world: &Self::World, body: Self::BodyHandle) -> Pose;
fn get_vel(world: &Self::World, body: Self::BodyHandle) -> Twist;
fn apply_joint_torque(world: &mut Self::World, joint: Self::JointHandle, torque: f32);
fn contact_force(world: &Self::World, body: Self::BodyHandle) -> [f32; 6];
}