diff options
| author | Crozet Sébastien <developer@crozet.re> | 2021-02-23 15:43:43 +0100 |
|---|---|---|
| committer | Crozet Sébastien <developer@crozet.re> | 2021-02-23 15:43:43 +0100 |
| commit | 4ca32a9546beca788104041134f0afbe96c5e871 (patch) | |
| tree | bc450c4ef7723c6e4fe7cf164455743ef397eec6 /src | |
| parent | 00706e8b360e132cb88a7b393dcedadf35403379 (diff) | |
| download | rapier-4ca32a9546beca788104041134f0afbe96c5e871.tar.gz rapier-4ca32a9546beca788104041134f0afbe96c5e871.tar.bz2 rapier-4ca32a9546beca788104041134f0afbe96c5e871.zip | |
Add one-way platform + conveyor belt demos.
Diffstat (limited to 'src')
| -rw-r--r-- | src/pipeline/physics_hooks.rs (renamed from src/geometry/pair_filter.rs) | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/geometry/pair_filter.rs b/src/pipeline/physics_hooks.rs index a30145e..12b658f 100644 --- a/src/geometry/pair_filter.rs +++ b/src/pipeline/physics_hooks.rs @@ -60,6 +60,9 @@ pub trait PhysicsHooks: Send + Sync { /// Applies the contact pair filter. /// + /// Note that this method will only be called if `self.active_hooks()` + /// contains the `PhysicsHooksFlags::FILTER_CONTACT_PAIR` flags. + /// /// User-defined filter for potential contact pairs detected by the broad-phase. /// This can be used to apply custom logic in order to decide whether two colliders /// should have their contact computed by the narrow-phase, and if these contact @@ -82,6 +85,9 @@ pub trait PhysicsHooks: Send + Sync { /// Applies the intersection pair filter. /// + /// Note that this method will only be called if `self.active_hooks()` + /// contains the `PhysicsHooksFlags::FILTER_INTERSECTION_PAIR` flags. + /// /// User-defined filter for potential intersection pairs detected by the broad-phase. /// /// This can be used to apply custom logic in order to decide whether two colliders @@ -100,6 +106,9 @@ pub trait PhysicsHooks: Send + Sync { /// Modifies the set of contacts seen by the constraints solver. /// + /// Note that this method will only be called if `self.active_hooks()` + /// contains the `PhysicsHooksFlags::MODIFY_SOLVER_CONTACTS` flags. + /// /// By default, the content of `solver_contacts` is computed from `manifold.points`. /// This method will be called on each contact manifold which have the flag `SolverFlags::MODIFY_CONTACTS` set. /// This method can be used to modify the set of solver contacts seen by the constraints solver: contacts @@ -121,7 +130,6 @@ pub trait PhysicsHooks: Send + Sync { } impl PhysicsHooks for () { - /// The sets of hooks that must be taken into account. fn active_hooks(&self) -> PhysicsHooksFlags { PhysicsHooksFlags::empty() } |
