Assignments
Assignments
|
#include <shapeList.h>
Static Public Member Functions | |
static bool | Compare (const ShapeBoundingBoxHit &v1, const ShapeBoundingBoxHit &v2) |
Public Attributes | |
double | t |
const Shape * | shape |
This class can be used for sorting shapes based on the intersections of their bounding volumes with a given ray.
|
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 std::sort.
const Shape* Ray::ShapeBoundingBoxHit::shape |
The shape that was intersected
double Ray::ShapeBoundingBoxHit::t |
The time along the ray to the point of intersection