Don't serialize solver contacts + remove erased-serde dependency.

This commit is contained in:
Crozet Sébastien
2021-02-08 10:47:58 +01:00
parent a272f4ce9e
commit e24d73a255
7 changed files with 18 additions and 9 deletions

View File

@@ -1,7 +1,6 @@
//! Data structures modified with guaranteed deterministic behavior after deserialization.
pub use self::coarena::Coarena;
pub use parry::utils::MaybeSerializableData;
pub mod arena;
mod coarena;

View File

@@ -90,15 +90,19 @@ pub struct ContactManifoldData {
pub body_pair: BodyPair,
pub(crate) warmstart_multiplier: Real,
// The two following are set by the constraints solver.
#[cfg_attr(feature = "serde-serialize", serde(skip))]
pub(crate) constraint_index: usize,
#[cfg_attr(feature = "serde-serialize", serde(skip))]
pub(crate) position_constraint_index: usize,
// We put the following fields here to avoids reading the colliders inside of the
// contact preparation method.
/// Flags used to control some aspects of the constraints solver for this contact manifold.
pub solver_flags: SolverFlags,
/// The world-space contact normal shared by all the contact in this contact manifold.
#[cfg_attr(feature = "serde-serialize", serde(skip))]
pub normal: Vector<Real>,
/// The contacts that will be seen by the constraints solver for computing forces.
#[cfg_attr(feature = "serde-serialize", serde(skip))]
pub solver_contacts: Vec<SolverContact>,
}