add defaults for the several structs
This commit is contained in:
committed by
Sébastien Crozet
parent
1608a1323e
commit
536122e080
@@ -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 {
|
||||
|
||||
@@ -75,6 +75,7 @@ impl Default for MultibodyJointLink {
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Default)]
|
||||
/// A set of rigid bodies that can be handled by a physics pipeline.
|
||||
#[cfg_attr(feature = "serde-serialize", derive(Serialize, Deserialize))]
|
||||
#[derive(Clone)]
|
||||
|
||||
Reference in New Issue
Block a user