|
AGX Dynamics
2.37.3.2
|
The geometry collider is responsible for finding contacts between two geometries. More...
#include <GeometryCollider.h>
Static Public Member Functions | |
| static void | calculateContacts (Geometry *geom1, Geometry *geom2, LocalGeometryContact &result, const bool useContactAreaApproach=false, const agx::Bool &contactReductionEnable=false, const agx::UInt &contactReductionThreshold=12, const agx::UInt &contactReductionBinResolution=3) |
| Calculates two geometries against each other. More... | |
| static LocalGeometryContact | calculateContacts (Geometry *geom1, Geometry *geom2, const bool useContactAreaApproach=false, const agx::Bool &contactReductionEnable=false, const agx::UInt &contactReductionThreshold=12, const agx::UInt &contactReductionBinResolution=3) |
| Calculates two geometries against each other. More... | |
The geometry collider is responsible for finding contacts between two geometries.
Each geometry may be composed of multiple shapes, so the geometry collider tests the individual shape bounds against each other and use shape colliders to test overlapping primitives.
This class is not used in the standard pipeline anymore, but can be used for manual collision detection.
Definition at line 40 of file GeometryCollider.h.
|
static |
Calculates two geometries against each other.
Note that contact normals will point from the second to the first geometry. Contact reduction and explicit contact area computation are only done if enabled in the parameters. If the GeometryCollider is used to replicate the behavior of the default collision detection pipeline, it might be advisable to check if these parameters are available in the contact material for the two geometries. The material, hasInnerMaterial and solveImpact-properties of the LocalGeometryContact are not modified.
| geom1 | The first geometry |
| geom2 | The second geometry |
| result | The resulting contact. Will be cleared before computation. |
| useContactAreaApproach | If true, will try to calculate the contact area and distribute it evenly over the points. If false, will distribute unit area over the contact points. |
| contactReductionEnable | Should contacts be reduced? |
| contactReductionThreshold | At which number of contact points should we start reducing? |
| contactReductionBinResolution | The bin resolution for contact reduction (check agxCollide::ContactReducer for details). |
|
static |
Calculates two geometries against each other.
Note that contact normals will point from the second to the first geometry. Contact reduction and explicit contact area computation are only done if enabled in the parameters. If the GeometryCollider is used to replicate the behavior of the default collision detection pipeline, it might be advisable to check if these parameters are available in the contact material for the two geometries. The material, hasInnerMaterial and solveImpact-properties of the LocalGeometryContact are not modified.
| geom1 | The first geometry |
| geom2 | The second geometry |
| result | The resulting contact. |
| useContactAreaApproach | If true, will try to calculate the contact area and distribute it evenly over the points. If false, will distribute unit area over the contact points. |
| contactReductionEnable | Should contacts be reduced? |
| contactReductionThreshold | At which number of contact points should we start reducing? |
| contactReductionBinResolution | The bin resolution for contact reduction (check agxCollide::ContactReducer for details). |