add defaults for the several structs
This commit is contained in:
committed by
Sébastien Crozet
parent
1608a1323e
commit
536122e080
@@ -3,7 +3,7 @@ use na::{DVectorSlice, DVectorSliceMut};
|
||||
use na::{Scalar, SimdRealField};
|
||||
use std::ops::{AddAssign, Sub};
|
||||
|
||||
#[derive(Copy, Clone, Debug)]
|
||||
#[derive(Copy, Clone, Debug, Default)]
|
||||
#[repr(C)]
|
||||
//#[repr(align(64))]
|
||||
pub struct DeltaVel<N: Scalar + Copy> {
|
||||
|
||||
@@ -29,6 +29,12 @@ pub struct JointGenericVelocityConstraint {
|
||||
pub writeback_id: WritebackId,
|
||||
}
|
||||
|
||||
impl Default for JointGenericVelocityConstraint {
|
||||
fn default() -> Self {
|
||||
JointGenericVelocityConstraint::invalid()
|
||||
}
|
||||
}
|
||||
|
||||
impl JointGenericVelocityConstraint {
|
||||
pub fn invalid() -> Self {
|
||||
Self {
|
||||
@@ -313,6 +319,11 @@ pub struct JointGenericVelocityGroundConstraint {
|
||||
|
||||
pub writeback_id: WritebackId,
|
||||
}
|
||||
impl Default for JointGenericVelocityGroundConstraint{
|
||||
fn default() -> Self {
|
||||
JointGenericVelocityGroundConstraint::invalid()
|
||||
}
|
||||
}
|
||||
|
||||
impl JointGenericVelocityGroundConstraint {
|
||||
pub fn invalid() -> Self {
|
||||
|
||||
Reference in New Issue
Block a user