aboutsummaryrefslogtreecommitdiff
path: root/src/dynamics/joint/fixed_joint.rs
diff options
context:
space:
mode:
authorCrozet Sébastien <developer@crozet.re>2021-01-04 15:14:25 +0100
committerCrozet Sébastien <developer@crozet.re>2021-01-04 15:14:25 +0100
commitaa61fe65e3ff0289ecab57b4053a3410cf6d4a87 (patch)
treea2ab513f43d779e4eb1c0edcd2a6e734b3fa4470 /src/dynamics/joint/fixed_joint.rs
parenta1aa8855f76168d8af14244a54c9f28d15696342 (diff)
downloadrapier-aa61fe65e3ff0289ecab57b4053a3410cf6d4a87.tar.gz
rapier-aa61fe65e3ff0289ecab57b4053a3410cf6d4a87.tar.bz2
rapier-aa61fe65e3ff0289ecab57b4053a3410cf6d4a87.zip
Add support of 64-bits reals.
Diffstat (limited to 'src/dynamics/joint/fixed_joint.rs')
-rw-r--r--src/dynamics/joint/fixed_joint.rs10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/dynamics/joint/fixed_joint.rs b/src/dynamics/joint/fixed_joint.rs
index 0731cfb..359e14a 100644
--- a/src/dynamics/joint/fixed_joint.rs
+++ b/src/dynamics/joint/fixed_joint.rs
@@ -1,4 +1,4 @@
-use crate::math::{Isometry, SpacialVector};
+use crate::math::{Isometry, Real, SpacialVector};
#[derive(Copy, Clone)]
#[cfg_attr(feature = "serde-serialize", derive(Serialize, Deserialize))]
@@ -8,22 +8,22 @@ use crate::math::{Isometry, SpacialVector};
pub struct FixedJoint {
/// The frame of reference for the first body affected by this joint, expressed in the local frame
/// of the first body.
- pub local_anchor1: Isometry<f32>,
+ pub local_anchor1: Isometry<Real>,
/// The frame of reference for the second body affected by this joint, expressed in the local frame
/// of the first body.
- pub local_anchor2: Isometry<f32>,
+ pub local_anchor2: Isometry<Real>,
/// The impulse applied to the first body affected by this joint.
///
/// The impulse applied to the second body affected by this joint is given by `-impulse`.
/// This combines both linear and angular impulses:
/// - In 2D, `impulse.xy()` gives the linear impulse, and `impulse.z` the angular impulse.
/// - In 3D, `impulse.xyz()` gives the linear impulse, and `(impulse[3], impulse[4], impulse[5])` the angular impulse.
- pub impulse: SpacialVector<f32>,
+ pub impulse: SpacialVector<Real>,
}
impl FixedJoint {
/// Creates a new fixed joint from the frames of reference of both bodies.
- pub fn new(local_anchor1: Isometry<f32>, local_anchor2: Isometry<f32>) -> Self {
+ pub fn new(local_anchor1: Isometry<Real>, local_anchor2: Isometry<Real>) -> Self {
Self {
local_anchor1,
local_anchor2,