TinyRaytracer 0.1
A simple C++ raytracer
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
Interval Class Reference

Public Member Functions

 Interval (double min, double max)
 
double size () const
 
bool contains (double x) const
 Returns if the value is within, border value returns true. More...
 
bool surrounds (double x) const
 Returns if the value is within, border value returns false. More...
 
Interval expand (double delta) const
 Expand the interval by delta on both ends. More...
 

Public Attributes

double min
 
double max
 

Member Function Documentation

◆ contains()

bool Interval::contains ( double  x) const
inline

Returns if the value is within, border value returns true.

Parameters
xThe value to be checked.
Returns
true
false

◆ expand()

Interval Interval::expand ( double  delta) const
inline

Expand the interval by delta on both ends.

Parameters
deltaThe value to expand on both ends.
Returns
Interval The expanded interval.

This function is used for the bounding box creation for triangles

◆ surrounds()

bool Interval::surrounds ( double  x) const
inline

Returns if the value is within, border value returns false.

Parameters
xThe value to be checked.
Returns
true
false

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