aboutsummaryrefslogtreecommitdiff
path: root/src/dynamics/rigid_body_components.rs
diff options
context:
space:
mode:
authorCrozet Sébastien <developer@crozet.re>2021-06-01 17:59:07 +0200
committerCrozet Sébastien <developer@crozet.re>2021-06-01 17:59:07 +0200
commit7153eb7779a29853289df90f28efaac738620386 (patch)
tree561a81b65609b60c4429c134ea474a160d70d80e /src/dynamics/rigid_body_components.rs
parent1839f61d816af37c95889caf592b5a7cf8d89412 (diff)
downloadrapier-7153eb7779a29853289df90f28efaac738620386.tar.gz
rapier-7153eb7779a29853289df90f28efaac738620386.tar.bz2
rapier-7153eb7779a29853289df90f28efaac738620386.zip
Add ActiveCollisionTypes to easily enable collision-detection between two non-static rigid-body.
Diffstat (limited to 'src/dynamics/rigid_body_components.rs')
-rw-r--r--src/dynamics/rigid_body_components.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/dynamics/rigid_body_components.rs b/src/dynamics/rigid_body_components.rs
index d1a00ce..ec67b66 100644
--- a/src/dynamics/rigid_body_components.rs
+++ b/src/dynamics/rigid_body_components.rs
@@ -54,23 +54,23 @@ pub type BodyStatus = RigidBodyType;
/// The status of a body, governing the way it is affected by external forces.
pub enum RigidBodyType {
/// A `RigidBodyType::Dynamic` body can be affected by all external forces.
- Dynamic,
+ Dynamic = 0,
/// A `RigidBodyType::Static` body cannot be affected by external forces.
- Static,
+ Static = 1,
/// A `RigidBodyType::KinematicPositionBased` body cannot be affected by any external forces but can be controlled
/// by the user at the position level while keeping realistic one-way interaction with dynamic bodies.
///
/// One-way interaction means that a kinematic body can push a dynamic body, but a kinematic body
/// cannot be pushed by anything. In other words, the trajectory of a kinematic body can only be
/// modified by the user and is independent from any contact or joint it is involved in.
- KinematicPositionBased,
+ KinematicPositionBased = 2,
/// A `RigidBodyType::KinematicVelocityBased` body cannot be affected by any external forces but can be controlled
/// by the user at the velocity level while keeping realistic one-way interaction with dynamic bodies.
///
/// One-way interaction means that a kinematic body can push a dynamic body, but a kinematic body
/// cannot be pushed by anything. In other words, the trajectory of a kinematic body can only be
/// modified by the user and is independent from any contact or joint it is involved in.
- KinematicVelocityBased,
+ KinematicVelocityBased = 3,
// Semikinematic, // A kinematic that performs automatic CCD with the static environment to avoid traversing it?
// Disabled,
}