Assignments Assignments

Static Public Member Functions | Public Attributes | List of all members
Ray::ShapeBoundingBoxHit Class Reference

`#include <shapeList.h>`

## Static Public Member Functions
static bool | Compare (const ShapeBoundingBoxHit &v1, const ShapeBoundingBoxHit &v2)

## Public Attributes
double | t
const Shape * | shape

## 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

## ◆ Compare()

bool ShapeBoundingBoxHit::Compare | ( | const ShapeBoundingBoxHit & | v1,
|  | const ShapeBoundingBoxHit & | 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 std::sort.

## Member Data Documentation

## ◆ shape

const Shape* Ray::ShapeBoundingBoxHit::shape

The shape that was intersected

## ◆ t

double Ray::ShapeBoundingBoxHit::t

The time along the ray to the point of intersection

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

- Assignments/Ray/shapeList.h
- Assignments/Ray/shapeList.cpp