aboutsummaryrefslogtreecommitdiff
path: root/src/dynamics/joint/multibody_joint/multibody.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/dynamics/joint/multibody_joint/multibody.rs')
-rw-r--r--src/dynamics/joint/multibody_joint/multibody.rs8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/dynamics/joint/multibody_joint/multibody.rs b/src/dynamics/joint/multibody_joint/multibody.rs
index e31a333..5779b3e 100644
--- a/src/dynamics/joint/multibody_joint/multibody.rs
+++ b/src/dynamics/joint/multibody_joint/multibody.rs
@@ -18,7 +18,7 @@ use na::{
};
#[repr(C)]
-#[derive(Copy, Clone, Debug)]
+#[derive(Copy, Clone, Debug,Default)]
struct Force {
linear: Vector<Real>,
angular: AngVector<Real>,
@@ -91,7 +91,11 @@ pub struct Multibody {
coriolis_w: Vec<OMatrix<Real, AngDim, Dynamic>>,
i_coriolis_dt: Jacobian<Real>,
}
-
+impl Default for Multibody{
+ fn default() -> Self {
+ Multibody::new()
+ }
+}
impl Multibody {
/// Creates a new multibody with no link.
pub fn new() -> Self {