Result of a shape cast test.  
 More...
#include <ShapeCast.h>
 | 
| JPH_OVERRIDE_NEW_DELETE  | ShapeCastResult ()=default | 
|   | Default constructor.  More...
  | 
|   | 
|   | ShapeCastResult (float inFraction, Vec3Arg inContactPoint1, Vec3Arg inContactPoint2, Vec3Arg inContactNormalOrPenetrationDepth, bool inBackFaceHit, const SubShapeID &inSubShapeID1, const SubShapeID &inSubShapeID2, const BodyID &inBodyID2) | 
|   | 
| float  | GetEarlyOutFraction () const | 
|   | Function required by the CollisionCollector. A smaller fraction is considered to be a 'better hit'. For rays/cast shapes we can just use the collision fraction. The fraction and penetration depth are combined in such a way that deeper hits at fraction 0 go first.  More...
  | 
|   | 
| ShapeCastResult  | Reversed (Vec3Arg inWorldSpaceCastDirection) const | 
|   | 
| JPH_OVERRIDE_NEW_DELETE  | CollideShapeResult ()=default | 
|   | Default constructor.  More...
  | 
|   | 
|   | CollideShapeResult (Vec3Arg inContactPointOn1, Vec3Arg inContactPointOn2, Vec3Arg inPenetrationAxis, float inPenetrationDepth, const SubShapeID &inSubShapeID1, const SubShapeID &inSubShapeID2, const BodyID &inBodyID2) | 
|   | Constructor.  More...
  | 
|   | 
| float  | GetEarlyOutFraction () const | 
|   | 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.  More...
  | 
|   | 
| CollideShapeResult  | Reversed () const | 
|   | Reverses the hit result, swapping contact point 1 with contact point 2 etc.  More...
  | 
|   | 
Result of a shape cast test. 
 
◆ ShapeCastResult() [1/2]
◆ ShapeCastResult() [2/2]
  
  
      
        
          | ShapeCastResult::ShapeCastResult  | 
          ( | 
          float  | 
          inFraction,  | 
         
        
           | 
           | 
          Vec3Arg  | 
          inContactPoint1,  | 
         
        
           | 
           | 
          Vec3Arg  | 
          inContactPoint2,  | 
         
        
           | 
           | 
          Vec3Arg  | 
          inContactNormalOrPenetrationDepth,  | 
         
        
           | 
           | 
          bool  | 
          inBackFaceHit,  | 
         
        
           | 
           | 
          const SubShapeID &  | 
          inSubShapeID1,  | 
         
        
           | 
           | 
          const SubShapeID &  | 
          inSubShapeID2,  | 
         
        
           | 
           | 
          const BodyID &  | 
          inBodyID2  | 
         
        
           | 
          ) | 
           |  | 
         
       
   | 
  
inline   | 
  
 
Constructor 
- Parameters
 - 
  
    | inFraction | Fraction at which the cast hit  | 
    | inContactPoint1 | Contact point on shape 1  | 
    | inContactPoint2 | Contact point on shape 2  | 
    | inContactNormalOrPenetrationDepth | Contact normal pointing from shape 1 to 2 or penetration depth vector when the objects are penetrating (also from 1 to 2)  | 
    | inBackFaceHit | If this hit was a back face hit  | 
    | inSubShapeID1 | Sub shape id for shape 1  | 
    | inSubShapeID2 | Sub shape id for shape 2  | 
    | inBodyID2 | BodyID that was hit  | 
  
   
 
 
◆ GetEarlyOutFraction()
  
  
      
        
          | float ShapeCastResult::GetEarlyOutFraction  | 
          ( | 
           | ) | 
           const | 
         
       
   | 
  
inline   | 
  
 
Function required by the CollisionCollector. A smaller fraction is considered to be a 'better hit'. For rays/cast shapes we can just use the collision fraction. The fraction and penetration depth are combined in such a way that deeper hits at fraction 0 go first. 
 
 
◆ Reversed()
Reverses the hit result, swapping contact point 1 with contact point 2 etc. 
- Parameters
 - 
  
    | inWorldSpaceCastDirection | Direction of the shape cast in world space  | 
  
   
 
 
◆ mFraction
      
        
          | float ShapeCastResult::mFraction | 
        
      
 
This is the fraction where the shape hit the other shape: CenterOfMassOnHit = Start + value * (End - Start) 
 
 
◆ mIsBackFaceHit
      
        
          | bool ShapeCastResult::mIsBackFaceHit | 
        
      
 
True if the shape was hit from the back side. 
 
 
The documentation for this class was generated from the following file: