#include <CollisionMeshRayPicker.h>
Implements IRayPicker to provide ray intersection query against all collision mesh resources provided by the construction-injected ICollisionBvhProvider instance
bool Eegeo::Collision::CollisionMeshRayPicker::TryGetRayIntersection |
( |
const Eegeo::dv3 & |
rayOrigin, |
|
|
const Eegeo::dv3 & |
rayDirection, |
|
|
Eegeo::dv3 & |
out_ecefIntersectionPoint, |
|
|
double & |
out_param |
|
) |
| |
|
virtual |
Performs a ray intersection query against the triangles of all collision mesh resources obtained from a query to the constructor-provided ICollisionBvhProvider instance. If the ray intersects the mesh at multiple points, finds the first intersection (closest to rayOrigin). If an intersection is found, returns true, with intersection information passed in out parameters.
- Parameters
-
rayOrigin | start point of ray, in Ecef coordinates |
rayDirection | normalised direction of ray, in Ecef coordinates |
out_ecefIntersectionPoint | [out] closest point of intersection in Ecef coordinates if successful, else zero vector |
out_param | [out] distance in metres from rayOrigin to out_ecefIntersectionPoint if successful, else zero |
- Returns
- true if intersection found, else false
Implements Eegeo::Collision::IRayPicker.
The documentation for this class was generated from the following files: