Skip to main content

euv_engine/physics/
enum.rs

1use crate::*;
2
3/// Defines how a rigid body participates in the physics simulation.
4#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
5pub enum BodyType {
6    /// A static body that does not move under forces or collisions (e.g., walls, ground).
7    #[default]
8    Static,
9    /// A dynamic body that is fully simulated by forces, gravity, and collisions.
10    Dynamic,
11    /// A kinematic body that moves programmatically but is not affected by forces or gravity.
12    Kinematic,
13}
14
15/// Wraps the concrete collider shape data attached to a rigid body.
16#[derive(Clone, Copy, Debug, PartialEq)]
17pub enum BodyCollider {
18    /// An axis-aligned bounding box collider.
19    Aabb(AabbCollider),
20    /// A circle collider.
21    Circle(CircleCollider),
22}
23
24/// Wraps the concrete 3D collider shape data attached to a 3D rigid body.
25#[derive(Clone, Copy, Debug, PartialEq)]
26pub enum BodyCollider3D {
27    /// A 3D axis-aligned bounding box collider.
28    Aabb(AabbCollider3D),
29    /// A 3D sphere collider.
30    Sphere(SphereCollider3D),
31}