Class that contains all information of two colliding shapes.
More...
#include <CollideShape.h>
|
Vec3 | mContactPointOn1 |
| Contact point on the surface of shape 1 (in world space or relative to base offset)
|
|
Vec3 | mContactPointOn2 |
| Contact point on the surface of shape 2 (in world space or relative to base offset). If the penetration depth is 0, this will be the same as mContactPointOn1.
|
|
Vec3 | mPenetrationAxis |
| Direction to move shape 2 out of collision along the shortest path (magnitude is meaningless, in world space). You can use -mPenetrationAxis.Normalized() as contact normal.
|
|
float | mPenetrationDepth |
| Penetration depth (move shape 2 by this distance to resolve the collision)
|
|
SubShapeID | mSubShapeID1 |
| Sub shape ID that identifies the face on shape 1.
|
|
SubShapeID | mSubShapeID2 |
| Sub shape ID that identifies the face on shape 2.
|
|
BodyID | mBodyID2 |
| BodyID to which shape 2 belongs to.
|
|
Face | mShape1Face |
| Colliding face on shape 1 (optional result, in world space or relative to base offset)
|
|
Face | mShape2Face |
| Colliding face on shape 2 (optional result, in world space or relative to base offset)
|
|
Class that contains all information of two colliding shapes.
◆ Face
◆ CollideShapeResult() [1/2]
◆ CollideShapeResult() [2/2]
CollideShapeResult::CollideShapeResult |
( |
Vec3Arg |
inContactPointOn1, |
|
|
Vec3Arg |
inContactPointOn2, |
|
|
Vec3Arg |
inPenetrationAxis, |
|
|
float |
inPenetrationDepth, |
|
|
const SubShapeID & |
inSubShapeID1, |
|
|
const SubShapeID & |
inSubShapeID2, |
|
|
const BodyID & |
inBodyID2 |
|
) |
| |
|
inline |
◆ GetEarlyOutFraction()
float CollideShapeResult::GetEarlyOutFraction |
( |
| ) |
const |
|
inline |
Function required by the CollisionCollector. A smaller fraction is considered to be a 'better hit'. We use -penetration depth to get the hit with the biggest penetration depth.
◆ Reversed()
Reverses the hit result, swapping contact point 1 with contact point 2 etc.
◆ mBodyID2
BodyID CollideShapeResult::mBodyID2 |
BodyID to which shape 2 belongs to.
◆ mContactPointOn1
Vec3 CollideShapeResult::mContactPointOn1 |
Contact point on the surface of shape 1 (in world space or relative to base offset)
◆ mContactPointOn2
Vec3 CollideShapeResult::mContactPointOn2 |
Contact point on the surface of shape 2 (in world space or relative to base offset). If the penetration depth is 0, this will be the same as mContactPointOn1.
◆ mPenetrationAxis
Vec3 CollideShapeResult::mPenetrationAxis |
Direction to move shape 2 out of collision along the shortest path (magnitude is meaningless, in world space). You can use -mPenetrationAxis.Normalized() as contact normal.
◆ mPenetrationDepth
float CollideShapeResult::mPenetrationDepth |
Penetration depth (move shape 2 by this distance to resolve the collision)
◆ mShape1Face
Face CollideShapeResult::mShape1Face |
Colliding face on shape 1 (optional result, in world space or relative to base offset)
◆ mShape2Face
Face CollideShapeResult::mShape2Face |
Colliding face on shape 2 (optional result, in world space or relative to base offset)
◆ mSubShapeID1
Sub shape ID that identifies the face on shape 1.
◆ mSubShapeID2
Sub shape ID that identifies the face on shape 2.
The documentation for this class was generated from the following file: