![]() |
Jolt Physics
A multi core friendly Game Physics Engine
|
#include <InternalEdgeRemovingCollector.h>
Public Member Functions | |
| InternalEdgeRemovingCollector (CollideShapeCollector &inChainedCollector) | |
| Constructor, configures a collector to be called with all the results that do not hit internal edges. | |
| virtual void | Reset () override |
| If you want to reuse this collector, call Reset(). | |
| virtual void | OnBody (const Body &inBody) override |
| virtual void | AddHit (const CollideShapeResult &inResult) override |
| This function will be called for every hit found, it's up to the application to decide how to store the hit. | |
| void | Flush () |
| After all hits have been added, call this function to process the delayed results. | |
| virtual void | OnBodyEnd () override |
| When running a query through the NarrowPhaseQuery class, this will be called after all AddHit calls have been made for a particular body. | |
| Public Member Functions inherited from CollisionCollector< CollideShapeResult, CollisionCollectorTraitsCollideShape > | |
| CollisionCollector ()=default | |
| Default constructor. | |
| CollisionCollector (const CollisionCollector< ResultTypeArg2, CollisionCollectorTraitsCollideShape > &inRHS) | |
| Constructor to initialize from another collector. | |
| CollisionCollector (const CollisionCollector< CollideShapeResult, CollisionCollectorTraitsCollideShape > &inRHS)=default | |
| virtual | ~CollisionCollector ()=default |
| Destructor. | |
| void | SetContext (const TransformedShape *inContext) |
| const TransformedShape * | GetContext () const |
| virtual void | SetUserData (uint64 inUserData) |
| This function can be used to set some user data on the collision collector. | |
| void | UpdateEarlyOutFraction (float inFraction) |
| Update the early out fraction (should be lower than before). | |
| void | ResetEarlyOutFraction (float inFraction=CollisionCollectorTraitsCollideShape::InitialEarlyOutFraction) |
| Reset the early out fraction to a specific value. | |
| void | ForceEarlyOut () |
| Force the collision detection algorithm to terminate as soon as possible. Call this from the AddHit function when a satisfying hit is found. | |
| bool | ShouldEarlyOut () const |
| When true, the collector will no longer accept any additional hits and the collision detection routine should early out as soon as possible. | |
| float | GetEarlyOutFraction () const |
| Get the current early out value. | |
| float | GetPositiveEarlyOutFraction () const |
| Get the current early out value but make sure it's bigger than zero, this is used for shape casting as negative values are used for penetration. | |
Static Public Member Functions | |
| static void | sCollideShapeVsShape (const Shape *inShape1, const Shape *inShape2, Vec3Arg inScale1, Vec3Arg inScale2, Mat44Arg inCenterOfMassTransform1, Mat44Arg inCenterOfMassTransform2, const SubShapeIDCreator &inSubShapeIDCreator1, const SubShapeIDCreator &inSubShapeIDCreator2, const CollideShapeSettings &inCollideShapeSettings, CollideShapeCollector &ioCollector, const ShapeFilter &inShapeFilter={ }) |
| Version of CollisionDispatch::sCollideShapeVsShape that removes internal edges. | |
Additional Inherited Members | |
| Public Types inherited from CollisionCollector< CollideShapeResult, CollisionCollectorTraitsCollideShape > | |
| using | ResultType |
| Declare ResultType so that derived classes can use it. | |
Removes internal edges from collision results. Can be used to filter out 'ghost collisions'. Based on: Contact generation for meshes - Pierre Terdiman (https://www.codercorner.com/MeshContacts.pdf)
Note that this class requires that CollideSettingsBase::mActiveEdgeMode == EActiveEdgeMode::CollideWithAll and CollideSettingsBase::mCollectFacesMode == ECollectFacesMode::CollectFaces.
|
inlineexplicit |
Constructor, configures a collector to be called with all the results that do not hit internal edges.
|
inlineoverridevirtual |
This function will be called for every hit found, it's up to the application to decide how to store the hit.
Implements CollisionCollector< CollideShapeResult, CollisionCollectorTraitsCollideShape >.
|
inline |
After all hits have been added, call this function to process the delayed results.
|
inlineoverridevirtual |
When running a query through the NarrowPhaseQuery class, this will be called for every body that is potentially colliding. It allows collecting additional information needed by the collision collector implementation from the body under lock protection before AddHit is called (e.g. the user data pointer or the velocity of the body).
Reimplemented from CollisionCollector< CollideShapeResult, CollisionCollectorTraitsCollideShape >.
|
inlineoverridevirtual |
When running a query through the NarrowPhaseQuery class, this will be called after all AddHit calls have been made for a particular body.
Reimplemented from CollisionCollector< CollideShapeResult, CollisionCollectorTraitsCollideShape >.
|
inlineoverridevirtual |
If you want to reuse this collector, call Reset().
Reimplemented from CollisionCollector< CollideShapeResult, CollisionCollectorTraitsCollideShape >.
|
inlinestatic |
Version of CollisionDispatch::sCollideShapeVsShape that removes internal edges.