blob: f3f4f7c52943c25b9a5a11ac6c0db0e2349a77e8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
use crate::dynamics::{ImpulseJointHandle, JointData, RigidBodyHandle};
use crate::math::{Real, SpacialVector};
#[cfg_attr(feature = "serde-serialize", derive(Serialize, Deserialize))]
#[derive(Clone, Debug, PartialEq)]
/// A joint attached to two bodies.
pub struct ImpulseJoint {
/// Handle to the first body attached to this joint.
pub body1: RigidBodyHandle,
/// Handle to the second body attached to this joint.
pub body2: RigidBodyHandle,
pub data: JointData,
pub impulses: SpacialVector<Real>,
// A joint needs to know its handle to simplify its removal.
pub(crate) handle: ImpulseJointHandle,
#[cfg(feature = "parallel")]
pub(crate) constraint_index: usize,
}
|