ReactPhysics3D  v0.10.1
C++ Physics engine library
reactphysics3d::RaycastInfo Struct Reference

This structure contains the information about a raycast hit. More...

#include <include/reactphysics3d/collision/RaycastInfo.h>

Public Member Functions

 RaycastInfo ()
 Constructor.
 
 ~RaycastInfo ()=default
 Destructor.
 
 RaycastInfo (const RaycastInfo &raycastInfo)=delete
 Deleted copy constructor.
 
RaycastInfooperator= (const RaycastInfo &raycastInfo)=delete
 Deleted assignment operator.
 

Public Attributes

Vector3 worldPoint
 Hit point in world-space coordinates.
 
Vector3 worldNormal
 Surface normal at hit point in world-space coordinates.
 
decimal hitFraction
 Fraction distance of the hit point between point1 and point2 of the ray The hit point "p" is such that p = point1 + hitFraction * (point2 - point1)
 
int triangleIndex
 Hit triangle index (only used for triangles mesh and -1 otherwise)
 
Bodybody
 Pointer to the hit collision body.
 
Collidercollider
 Pointer to the hit collider.
 

Detailed Description

This structure contains the information about a raycast hit.


The documentation for this struct was generated from the following file: