From aa61fe65e3ff0289ecab57b4053a3410cf6d4a87 Mon Sep 17 00:00:00 2001 From: Crozet Sébastien Date: Mon, 4 Jan 2021 15:14:25 +0100 Subject: Add support of 64-bits reals. --- src/dynamics/joint/ball_joint.rs | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'src/dynamics/joint/ball_joint.rs') diff --git a/src/dynamics/joint/ball_joint.rs b/src/dynamics/joint/ball_joint.rs index ec255d4..82e2a10 100644 --- a/src/dynamics/joint/ball_joint.rs +++ b/src/dynamics/joint/ball_joint.rs @@ -1,29 +1,29 @@ -use crate::math::{Point, Vector}; +use crate::math::{Point, Real, Vector}; #[derive(Copy, Clone)] #[cfg_attr(feature = "serde-serialize", derive(Serialize, Deserialize))] /// A joint that removes all relative linear motion between a pair of points on two bodies. pub struct BallJoint { /// Where the ball joint is attached on the first body, expressed in the first body local frame. - pub local_anchor1: Point, + pub local_anchor1: Point, /// Where the ball joint is attached on the first body, expressed in the first body local frame. - pub local_anchor2: Point, + pub local_anchor2: Point, /// The impulse applied by this joint on the first body. /// /// The impulse applied to the second body is given by `-impulse`. - pub impulse: Vector, + pub impulse: Vector, } impl BallJoint { /// Creates a new Ball joint from two anchors given on the local spaces of the respective bodies. - pub fn new(local_anchor1: Point, local_anchor2: Point) -> Self { + pub fn new(local_anchor1: Point, local_anchor2: Point) -> Self { Self::with_impulse(local_anchor1, local_anchor2, Vector::zeros()) } pub(crate) fn with_impulse( - local_anchor1: Point, - local_anchor2: Point, - impulse: Vector, + local_anchor1: Point, + local_anchor2: Point, + impulse: Vector, ) -> Self { Self { local_anchor1, -- cgit