Quantum 3
3.1.0
A structure for containing all the result information from the collision between two shapes. More...
Public Member Functions | |
| Span< FPVector2 > | GetContactPoints () |
| Gets a span of the contact points in the collision. More... | |
| ref FPVector2 | GetPoint (Int32 contactPointIndex) |
| Gets a reference to the contact point at the given index. 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 | 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 | |
| FPVector2 | Normal |
| The contact normal. More... | |
| FP | Penetration |
| The collision penetration in the Normal direction. More... | |
Properties | |
| readonly int | ContactPointsCount [get] |
| The number of found contact points. More... | |
A structure for containing all the result information from the collision between two shapes.
|
inline |
Gets a span of the contact points in the collision.
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. |
|
inline |
Gets a reference to the contact point at the given index.
| contactPointIndex | Index of the contact point. |
| IndexOutOfRangeException | In case the contactPointIndex is out of the [0, ContactPointsCount) range. |
|
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.
|
get |
The number of found contact points.