|
@@ -1033,8 +1033,7 @@ void PhysicsSystem::ProcessBodyPair(ContactAllocator &ioContactAllocator, const
|
|
|
settings.mActiveEdgeMovementDirection = body1->GetLinearVelocity() - body2->GetLinearVelocity();
|
|
|
|
|
|
// Create shape filter
|
|
|
- SimShapeFilterWrapperUnion shape_filter_union(mSimShapeFilter, body1);
|
|
|
- SimShapeFilterWrapper &shape_filter = shape_filter_union.GetSimShapeFilterWrapper();
|
|
|
+ SimShapeFilterWrapper shape_filter(mSimShapeFilter, body1);
|
|
|
shape_filter.SetBody2(body2);
|
|
|
|
|
|
// Get transforms relative to body1
|
|
@@ -1156,7 +1155,7 @@ void PhysicsSystem::ProcessBodyPair(ContactAllocator &ioContactAllocator, const
|
|
|
ReductionCollideShapeCollector collector(this, body1, body2);
|
|
|
|
|
|
// Perform collision detection between the two shapes
|
|
|
- mSimCollideBodyVsBody(*body1, *body2, transform1, transform2, settings, collector, shape_filter);
|
|
|
+ mSimCollideBodyVsBody(*body1, *body2, transform1, transform2, settings, collector, shape_filter.GetFilter());
|
|
|
|
|
|
// Add the contacts
|
|
|
for (ContactManifold &manifold : collector.mManifolds)
|
|
@@ -1255,7 +1254,7 @@ void PhysicsSystem::ProcessBodyPair(ContactAllocator &ioContactAllocator, const
|
|
|
NonReductionCollideShapeCollector collector(this, ioContactAllocator, body1, body2, body_pair_handle);
|
|
|
|
|
|
// Perform collision detection between the two shapes
|
|
|
- mSimCollideBodyVsBody(*body1, *body2, transform1, transform2, settings, collector, shape_filter);
|
|
|
+ mSimCollideBodyVsBody(*body1, *body2, transform1, transform2, settings, collector, shape_filter.GetFilter());
|
|
|
|
|
|
constraint_created = collector.mConstraintCreated;
|
|
|
}
|
|
@@ -1908,7 +1907,7 @@ void PhysicsSystem::JobFindCCDContacts(const PhysicsUpdateContext *ioContext, Ph
|
|
|
|
|
|
// Do narrow phase collision check
|
|
|
RShapeCast relative_cast(mShapeCast.mShape, mShapeCast.mScale, mShapeCast.mCenterOfMassStart, direction, mShapeCast.mShapeWorldBounds);
|
|
|
- body2.GetTransformedShape().CastShape(relative_cast, mShapeCastSettings, mShapeCast.mCenterOfMassStart.GetTranslation(), mCollector, mShapeFilter);
|
|
|
+ body2.GetTransformedShape().CastShape(relative_cast, mShapeCastSettings, mShapeCast.mCenterOfMassStart.GetTranslation(), mCollector, mShapeFilter.GetFilter());
|
|
|
|
|
|
// Update early out fraction based on narrow phase collector
|
|
|
if (!mCollector.mRejectAll)
|
|
@@ -1928,8 +1927,7 @@ void PhysicsSystem::JobFindCCDContacts(const PhysicsUpdateContext *ioContext, Ph
|
|
|
};
|
|
|
|
|
|
// Create shape filter
|
|
|
- SimShapeFilterWrapperUnion shape_filter_union(mSimShapeFilter, &body);
|
|
|
- SimShapeFilterWrapper &shape_filter = shape_filter_union.GetSimShapeFilterWrapper();
|
|
|
+ SimShapeFilterWrapper shape_filter(mSimShapeFilter, &body);
|
|
|
|
|
|
// Check if we collide with any other body. Note that we use the non-locking interface as we know the broadphase cannot be modified at this point.
|
|
|
RShapeCast shape_cast(body.GetShape(), Vec3::sOne(), body.GetCenterOfMassTransform(), ccd_body.mDeltaPosition);
|