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