Joint API and joint motors improvements
This commit is contained in:
committed by
Sébastien Crozet
parent
e740493b98
commit
fb20d72ee2
@@ -1,4 +1,4 @@
|
||||
use crate::dynamics::{ImpulseJointHandle, JointData, RigidBodyHandle};
|
||||
use crate::dynamics::{GenericJoint, ImpulseJointHandle, RigidBodyHandle};
|
||||
use crate::math::{Real, SpacialVector};
|
||||
|
||||
#[cfg_attr(feature = "serde-serialize", derive(Serialize, Deserialize))]
|
||||
@@ -10,7 +10,7 @@ pub struct ImpulseJoint {
|
||||
/// Handle to the second body attached to this joint.
|
||||
pub body2: RigidBodyHandle,
|
||||
|
||||
pub data: JointData,
|
||||
pub data: GenericJoint,
|
||||
pub impulses: SpacialVector<Real>,
|
||||
|
||||
// A joint needs to know its handle to simplify its removal.
|
||||
|
||||
@@ -3,8 +3,8 @@ use crate::geometry::{InteractionGraph, RigidBodyGraphIndex, TemporaryInteractio
|
||||
|
||||
use crate::data::arena::Arena;
|
||||
use crate::data::{BundleSet, Coarena, ComponentSet, ComponentSetMut};
|
||||
use crate::dynamics::{GenericJoint, RigidBodyHandle};
|
||||
use crate::dynamics::{IslandManager, RigidBodyActivation, RigidBodyIds, RigidBodyType};
|
||||
use crate::dynamics::{JointData, RigidBodyHandle};
|
||||
|
||||
/// The unique identifier of a joint added to the joint set.
|
||||
/// The unique identifier of a collider added to a collider set.
|
||||
@@ -177,7 +177,7 @@ impl ImpulseJointSet {
|
||||
&mut self,
|
||||
body1: RigidBodyHandle,
|
||||
body2: RigidBodyHandle,
|
||||
data: impl Into<JointData>,
|
||||
data: impl Into<GenericJoint>,
|
||||
) -> ImpulseJointHandle {
|
||||
let data = data.into();
|
||||
let handle = self.joint_ids.insert(0.into());
|
||||
|
||||
Reference in New Issue
Block a user