Main Page | Class Hierarchy | Class List | Class Members

RayShapeHit Class Reference

List of all members.

Static Public Member Functions

static int Compare (const void *v1, const void *v2)

Public Attributes

float t
RayShapeshape

Detailed Description

This class can be used for sorting shapes based on the intersections of their bounding volumes with a given ray.


Member Function Documentation

int RayShapeHit::Compare const void *  v1,
const void *  v2
[static]
 

This is a static method for sorting the hits by the order in which they occured. For example after the bounding volumes have been intersected and the distance and shapes have been written into an array of RayShapes, the array can be sorted by calling:
qsort(hits,hitNum,sizeof(RayShapeHit),RayShapeHit::Compare);


Member Data Documentation

RayShape* RayShapeHit::shape
 

The shape that was intersected

float RayShapeHit::t
 

The distance along the ray to the point of intersection


Generated on Wed Feb 22 15:44:23 2006 for Assignment 2 by  doxygen 1.4.1