Fix 2D compilation.
This commit is contained in:
@@ -51,10 +51,10 @@ pub fn deserialize_hashmap_capacity<
|
||||
*/
|
||||
#[cfg(feature = "enhanced-determinism")]
|
||||
pub type FxHashMap32<K, V> = indexmap::IndexMap<K, V, std::hash::BuildHasherDefault<FxHasher32>>;
|
||||
#[cfg(not(feature = "enhanced-determinism"))]
|
||||
pub use rustc_hash::{Entry, FxHashMap as HashMap};
|
||||
#[cfg(feature = "enhanced-determinism")]
|
||||
pub use {self::FxHashMap32 as HashMap, indexmap::map::Entry};
|
||||
#[cfg(not(feature = "enhanced-determinism"))]
|
||||
pub use {rustc_hash::FxHashMap as HashMap, std::collections::hash_map::Entry};
|
||||
|
||||
const K: u32 = 0x9e3779b9;
|
||||
|
||||
|
||||
@@ -84,7 +84,7 @@ impl ContactPhase {
|
||||
let mut manifold_arr: ArrayVec<[&mut ContactManifold; SIMD_WIDTH]> =
|
||||
ArrayVec::new();
|
||||
let mut workspace_arr: ArrayVec<
|
||||
[Option<&mut (dyn Any + Send + Sync)>; SIMD_WIDTH],
|
||||
[Option<&mut (dyn MaybeSerializableData)>; SIMD_WIDTH],
|
||||
> = ArrayVec::new();
|
||||
|
||||
for (pair, solver_flags) in
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
use crate::data::MaybeSerializableData;
|
||||
#[cfg(feature = "dim3")]
|
||||
use crate::geometry::contact_generator::PfmPfmContactManifoldGeneratorWorkspace;
|
||||
use crate::geometry::contact_generator::{
|
||||
HeightFieldShapeContactGeneratorWorkspace, PfmPfmContactManifoldGeneratorWorkspace,
|
||||
TrimeshShapeContactGeneratorWorkspace, WorkspaceSerializationTag,
|
||||
HeightFieldShapeContactGeneratorWorkspace, TrimeshShapeContactGeneratorWorkspace,
|
||||
WorkspaceSerializationTag,
|
||||
};
|
||||
|
||||
// Note we have this newtype because it simplifies the serialization/deserialization code.
|
||||
@@ -76,6 +78,7 @@ impl<'de> serde::Deserialize<'de> for ContactGeneratorWorkspace {
|
||||
Some(WorkspaceSerializationTag::TrimeshShapeContactGeneratorWorkspace) => {
|
||||
deser::<A, TrimeshShapeContactGeneratorWorkspace>(&mut seq)?
|
||||
}
|
||||
#[cfg(feature = "dim3")]
|
||||
Some(WorkspaceSerializationTag::PfmPfmContactGeneratorWorkspace) => {
|
||||
deser::<A, PfmPfmContactManifoldGeneratorWorkspace>(&mut seq)?
|
||||
}
|
||||
|
||||
@@ -8,6 +8,7 @@ use crate::geometry::contact_generator::{
|
||||
use crate::geometry::Capsule;
|
||||
use crate::geometry::{Collider, ContactManifold, HeightField, Shape};
|
||||
use crate::ncollide::bounding_volume::BoundingVolume;
|
||||
#[cfg(feature = "serde-serialize")]
|
||||
use erased_serde::Serialize;
|
||||
|
||||
#[cfg_attr(feature = "serde-serialize", derive(Serialize, Deserialize))]
|
||||
|
||||
@@ -3,6 +3,7 @@ use num_derive::FromPrimitive;
|
||||
#[derive(Copy, Clone, Debug, FromPrimitive)]
|
||||
pub(super) enum WorkspaceSerializationTag {
|
||||
TrimeshShapeContactGeneratorWorkspace = 0,
|
||||
#[cfg(feature = "dim3")]
|
||||
PfmPfmContactGeneratorWorkspace,
|
||||
HeightfieldShapeContactGeneratorWorkspace,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user