feat: add Collider::heightfield_with_flags
This commit is contained in:
committed by
Sébastien Crozet
parent
9964007269
commit
7cbbb8e87b
@@ -80,6 +80,7 @@ impl CollisionPipeline {
|
||||
narrow_phase.register_pairs(None, colliders, bodies, &self.broad_phase_events, events);
|
||||
narrow_phase.compute_contacts(
|
||||
prediction_distance,
|
||||
0.0,
|
||||
bodies,
|
||||
colliders,
|
||||
&ImpulseJointSet::new(),
|
||||
|
||||
@@ -6,8 +6,8 @@ use crate::math::{Isometry, Point, Real, Vector};
|
||||
use crate::{dynamics::RigidBodySet, geometry::ColliderSet};
|
||||
use parry::partitioning::{QbvhDataGenerator, QbvhUpdateWorkspace};
|
||||
use parry::query::details::{
|
||||
NonlinearTOICompositeShapeShapeBestFirstVisitor, PointCompositeShapeProjBestFirstVisitor,
|
||||
PointCompositeShapeProjWithFeatureBestFirstVisitor,
|
||||
NonlinearTOICompositeShapeShapeBestFirstVisitor, NormalConstraints,
|
||||
PointCompositeShapeProjBestFirstVisitor, PointCompositeShapeProjWithFeatureBestFirstVisitor,
|
||||
RayCompositeShapeToiAndNormalBestFirstVisitor, RayCompositeShapeToiBestFirstVisitor,
|
||||
TOICompositeShapeShapeBestFirstVisitor,
|
||||
};
|
||||
@@ -246,17 +246,22 @@ pub enum QueryPipelineMode {
|
||||
|
||||
impl<'a> TypedSimdCompositeShape for QueryPipelineAsCompositeShape<'a> {
|
||||
type PartShape = dyn Shape;
|
||||
type PartNormalConstraints = dyn NormalConstraints;
|
||||
type PartId = ColliderHandle;
|
||||
type QbvhStorage = DefaultStorage;
|
||||
|
||||
fn map_typed_part_at(
|
||||
&self,
|
||||
shape_id: Self::PartId,
|
||||
mut f: impl FnMut(Option<&Isometry<Real>>, &Self::PartShape),
|
||||
mut f: impl FnMut(
|
||||
Option<&Isometry<Real>>,
|
||||
&Self::PartShape,
|
||||
Option<&Self::PartNormalConstraints>,
|
||||
),
|
||||
) {
|
||||
if let Some(co) = self.colliders.get(shape_id) {
|
||||
if self.filter.test(self.bodies, shape_id, co) {
|
||||
f(Some(&co.pos), &*co.shape)
|
||||
f(Some(&co.pos), &*co.shape, None)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -264,7 +269,7 @@ impl<'a> TypedSimdCompositeShape for QueryPipelineAsCompositeShape<'a> {
|
||||
fn map_untyped_part_at(
|
||||
&self,
|
||||
shape_id: Self::PartId,
|
||||
f: impl FnMut(Option<&Isometry<Real>>, &Self::PartShape),
|
||||
f: impl FnMut(Option<&Isometry<Real>>, &Self::PartShape, Option<&dyn NormalConstraints>),
|
||||
) {
|
||||
self.map_typed_part_at(shape_id, f);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user