1use phyz_math::SpatialInertia;
4
5#[derive(Debug, Clone)]
7pub struct Body {
8 pub name: String,
10 pub inertia: SpatialInertia,
12 pub parent: i32,
14 pub joint_idx: usize,
16 pub geometry: Option<Geometry>,
18}
19
20#[derive(Debug, Clone)]
22pub enum Geometry {
23 Sphere {
24 radius: f64,
25 },
26 Capsule {
27 radius: f64,
28 length: f64,
29 },
30 Box {
31 half_extents: phyz_math::Vec3,
32 },
33 Cylinder {
34 radius: f64,
35 height: f64,
36 },
37 Mesh {
38 vertices: Vec<phyz_math::Vec3>,
39 faces: Vec<[usize; 3]>,
40 },
41 Plane {
42 normal: phyz_math::Vec3,
43 },
44}