Quantum 3
3.0.11
A structure for containing all the result information from the collision between two shapes. More...
Static Public Member Functions | |
| static void | AddContactPoint (CollisionResultInfo2D *result, FPVector2 cp) |
| Adds to the buffer of contact points a new contact point. For a 2D collision, the maximum number of contact point is CollisionManifold2D.MAX_CONTACT_POINTS. More... | |
| static FPVector2 * | ContactPoints (CollisionResultInfo2D *CollisionResultInfo2D) |
| Gets a pointer from the contact points buffer. Use this pointer to get the other contact points in a for loop. More... | |
| static FPVector2 | GetAveragePoint (CollisionResultInfo2D *result) |
| Gets the average point between all the contact points computed. More... | |
| static FPVector2 | GetPoint (CollisionResultInfo2D *result) |
| static FPVector2 | GetPoint (CollisionResultInfo2D *result, Int32 contactPointIndex) |
| Get the contact point of the collision by some index. More... | |
| static Hit | UpdateHitWithResult (CollisionResultInfo2D *result, ref Hit hit) |
| Updates all the hit fields with the equivalent results of the collision. More... | |
Public Attributes | |
| readonly int | ContactPointsCount => _cpCount |
| The number of found contact points. More... | |
| FPVector2 | Normal |
| The contact normal. More... | |
| FP | Penetration |
| The collision penetration in the Normal direction. More... | |
A structure for containing all the result information from the collision between two shapes.
|
inlinestatic |
Gets a pointer from the contact points buffer. Use this pointer to get the other contact points in a for loop.
| CollisionResultInfo2D | The CollisionResultInfo2D reference. |
How to iterate over the contact points:
|
inlinestatic |
Get the contact point of the collision by some index.
| result | The CollisionResultInfo2D reference. |
| contactPointIndex | Index of the contact point. |
|
inlinestatic |
Adds to the buffer of contact points a new contact point. For a 2D collision, the maximum number of contact point is CollisionManifold2D.MAX_CONTACT_POINTS.
| result | The CollisionResultInfo2D reference. |
| cp | The contact point value. |
|
inlinestatic |
Gets the average point between all the contact points computed.
| result | The CollisionResultInfo2D reference. |
|
inlinestatic |
Updates all the hit fields with the equivalent results of the collision.
| result | The CollisionResultInfo2D reference. |
| hit | The Hit reference. |
| FP Quantum.Physics2D.CollisionResultInfo2D.Penetration |
The collision penetration in the Normal direction.
| FPVector2 Quantum.Physics2D.CollisionResultInfo2D.Normal |
The contact normal.
| readonly int Quantum.Physics2D.CollisionResultInfo2D.ContactPointsCount => _cpCount |
The number of found contact points.