RayCastHit Class Reference

Raycast intersection class. More...

Public Attributes

real distance
 The distance from start at which the ray intersects the object. More...
 
wVector normal
 The normal at the hit point in the global frame of reference. More...
 
PhyObjectobject
 Object intersected by the ray. More...
 
wVector position
 The actual point at which the ray intersects the object in the global frame of reference. More...
 

Detailed Description

Raycast intersection class.

Motivation
an helper class with information about a raycast hit
Description
a list of objects of this type is returned by the World::worldRayCast() function. This class contains information about a RayCast hit: the object intersecting the ray, the distance from the ray start (normalized between 0 and 1), the actual point at which the ray hits the object and the normal at contact point

Definition at line 195 of file world.h.

Member Data Documentation

real distance

The distance from start at which the ray intersects the object.

This is in the range [0; 1]: 0 means the ray start point, 1 the ray end point. Intermediate values correspond to values along the ray

Definition at line 202 of file world.h.

Referenced by SingleIR::set(), SingleIR::SingleIR(), and SingleIR::update().

wVector normal

The normal at the hit point in the global frame of reference.

Definition at line 207 of file world.h.

PhyObject* object

Object intersected by the ray.

Definition at line 198 of file world.h.

Referenced by SingleIR::set(), SingleIR::SingleIR(), and SingleIR::update().

wVector position

The actual point at which the ray intersects the object in the global frame of reference.

Definition at line 205 of file world.h.


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