impl more traits for components

This commit is contained in:
Waridley
2021-07-10 12:18:21 -05:00
committed by Sébastien Crozet
parent 3b0d256464
commit 9233a855f0
8 changed files with 38 additions and 26 deletions

View File

@@ -1,7 +1,7 @@
use crate::dynamics::SpringModel;
use crate::math::{Point, Real, Rotation, Vector};
#[derive(Copy, Clone)]
#[derive(Copy, Clone, PartialEq)]
#[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 {

View File

@@ -1,6 +1,6 @@
use crate::math::{Isometry, Real, SpacialVector};
#[derive(Copy, Clone)]
#[derive(Copy, Clone, PartialEq)]
#[cfg_attr(feature = "serde-serialize", derive(Serialize, Deserialize))]
/// A joint that prevents all relative movement between two bodies.
///

View File

@@ -2,7 +2,7 @@ use crate::dynamics::{BallJoint, FixedJoint, PrismaticJoint, RevoluteJoint};
use crate::math::{Isometry, Real, SpacialVector};
use crate::na::{Rotation3, UnitQuaternion};
#[derive(Copy, Clone, Debug)]
#[derive(Copy, Clone, Debug, PartialEq)]
#[cfg_attr(feature = "serde-serialize", derive(Serialize, Deserialize))]
/// A joint that prevents all relative movement between two bodies.
///

View File

@@ -2,7 +2,7 @@
use crate::dynamics::RevoluteJoint;
use crate::dynamics::{BallJoint, FixedJoint, JointHandle, PrismaticJoint, RigidBodyHandle};
#[derive(Copy, Clone)]
#[derive(Copy, Clone, PartialEq)]
#[cfg_attr(feature = "serde-serialize", derive(Serialize, Deserialize))]
/// An enum grouping all possible types of joints.
pub enum JointParams {

View File

@@ -7,7 +7,7 @@ use na::Vector2;
#[cfg(feature = "dim3")]
use na::Vector5;
#[derive(Copy, Clone)]
#[derive(Copy, Clone, PartialEq)]
#[cfg_attr(feature = "serde-serialize", derive(Serialize, Deserialize))]
/// A joint that removes all relative motion between two bodies, except for the translations along one axis.
pub struct PrismaticJoint {

View File

@@ -3,7 +3,7 @@ use crate::math::{Isometry, Point, Real, Vector};
use crate::utils::WBasis;
use na::{RealField, Unit, Vector5};
#[derive(Copy, Clone)]
#[derive(Copy, Clone, PartialEq)]
#[cfg_attr(feature = "serde-serialize", derive(Serialize, Deserialize))]
/// A joint that removes all relative motion between two bodies, except for the rotations along one axis.
pub struct RevoluteJoint {