All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Public Member Functions | List of all members
Eegeo::Collision::CollisionMeshRayPicker Class Reference

#include <CollisionMeshRayPicker.h>

Inheritance diagram for Eegeo::Collision::CollisionMeshRayPicker:
Eegeo::Collision::IRayPicker Eegeo::NonCopyable

Public Member Functions

 CollisionMeshRayPicker (const ICollisionBvhProvider &provider)
 
virtual bool TryGetRayIntersection (const Eegeo::dv3 &rayOrigin, const Eegeo::dv3 &rayDirection, Eegeo::dv3 &out_ecefIntersectionPoint, double &out_param)
 

Additional Inherited Members

- Protected Member Functions inherited from Eegeo::NonCopyable
 NonCopyable (const NonCopyable &)=delete
 
NonCopyableoperator= (const NonCopyable &)=delete
 

Detailed Description

Implements IRayPicker to provide ray intersection query against all collision mesh resources provided by the construction-injected ICollisionBvhProvider instance

Member Function Documentation

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
rayOriginstart point of ray, in Ecef coordinates
rayDirectionnormalised 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: