aboutsummaryrefslogtreecommitdiff
path: root/src/dynamics/rigid_body_components.rs
diff options
context:
space:
mode:
authorSébastien Crozet <developer@crozet.re>2022-01-08 21:09:11 +0100
committerSébastien Crozet <developer@crozet.re>2022-01-08 21:09:11 +0100
commit87ec0ced4031633e9084ee2f60d47c4cd57f7f7b (patch)
tree50a37237833b6fa9bcfec2c1b34f28f92fcce96a /src/dynamics/rigid_body_components.rs
parent9726738cd2558bc23ff48b1d5835eff8b0e59c83 (diff)
downloadrapier-87ec0ced4031633e9084ee2f60d47c4cd57f7f7b.tar.gz
rapier-87ec0ced4031633e9084ee2f60d47c4cd57f7f7b.tar.bz2
rapier-87ec0ced4031633e9084ee2f60d47c4cd57f7f7b.zip
Address issues with the genral-case for multibody joints
Diffstat (limited to 'src/dynamics/rigid_body_components.rs')
-rw-r--r--src/dynamics/rigid_body_components.rs27
1 files changed, 1 insertions, 26 deletions
diff --git a/src/dynamics/rigid_body_components.rs b/src/dynamics/rigid_body_components.rs
index e24cb57..23ff7a8 100644
--- a/src/dynamics/rigid_body_components.rs
+++ b/src/dynamics/rigid_body_components.rs
@@ -389,19 +389,6 @@ impl RigidBodyVelocity {
}
}
- #[cfg(feature = "dim2")]
- pub(crate) fn from_vectors(linvel: Vector<Real>, angvel: na::Vector1<Real>) -> Self {
- Self {
- linvel,
- angvel: angvel.x,
- }
- }
-
- #[cfg(feature = "dim3")]
- pub(crate) fn from_vectors(linvel: Vector<Real>, angvel: Vector<Real>) -> Self {
- Self { linvel, angvel }
- }
-
/// Velocities set to zero.
#[must_use]
pub fn zero() -> Self {
@@ -463,21 +450,9 @@ impl RigidBodyVelocity {
unsafe { std::mem::transmute(self) }
}
- /// Return `self` transformed by `transform`.
- #[must_use]
- pub fn transformed(self, transform: &Isometry<Real>) -> Self {
- Self {
- linvel: transform * self.linvel,
- #[cfg(feature = "dim2")]
- angvel: self.angvel,
- #[cfg(feature = "dim3")]
- angvel: transform * self.angvel,
- }
- }
-
/// Return `self` rotated by `rotation`.
#[must_use]
- pub fn rotated(self, rotation: &Rotation<Real>) -> Self {
+ pub fn transformed(self, rotation: &Rotation<Real>) -> Self {
Self {
linvel: rotation * self.linvel,
#[cfg(feature = "dim2")]