Jolt Physics
A multi core friendly Game Physics Engine
Loading...
Searching...
No Matches
SimShapeFilter.h
Go to the documentation of this file.
1// Jolt Physics Library (https://github.com/jrouwe/JoltPhysics)
2// SPDX-FileCopyrightText: 2024 Jorrit Rouwe
3// SPDX-License-Identifier: MIT
4
5#pragma once
6
8
10
11class Body;
12class Shape;
13class SubShapeID;
14
17{
18public:
20 virtual ~SimShapeFilter() = default;
21
33 virtual bool ShouldCollide([[maybe_unused]] const Body &inBody1, [[maybe_unused]] const Shape *inShape1, [[maybe_unused]] const SubShapeID &inSubShapeIDOfShape1,
34 [[maybe_unused]] const Body &inBody2, [[maybe_unused]] const Shape *inShape2, [[maybe_unused]] const SubShapeID &inSubShapeIDOfShape2) const
35 {
36 return true;
37 }
38};
39
#define JPH_NAMESPACE_END
Definition Core.h:418
#define JPH_NAMESPACE_BEGIN
Definition Core.h:412
Definition Body.h:39
Class that makes another class non-copyable. Usage: Inherit from NonCopyable.
Definition NonCopyable.h:11
Base class for all shapes (collision volume of a body). Defines a virtual interface for collision det...
Definition Shape.h:186
Filter class used during the simulation (PhysicsSystem::Update) to filter out collisions at shape lev...
Definition SimShapeFilter.h:17
virtual ~SimShapeFilter()=default
Destructor.
virtual bool ShouldCollide(const Body &inBody1, const Shape *inShape1, const SubShapeID &inSubShapeIDOfShape1, const Body &inBody2, const Shape *inShape2, const SubShapeID &inSubShapeIDOfShape2) const
Definition SimShapeFilter.h:33
A sub shape id contains a path to an element (usually a triangle or other primitive type) of a compou...
Definition SubShapeID.h:23