KrisLibrary  1.0.0
Namespaces | Functions
AABB.h File Reference

Functions defining axis-aligned bounding boxes (AABBs). More...

#include "vector.h"
#include <KrisLibrary/errors.h>

Go to the source code of this file.

Namespaces

 Math
 Contains all definitions in the Math package.
 

Functions

void Math::AABBClamp (Vector &x, const Vector &bmin, const Vector &bmax, Real d=Zero)
 Clamps x to be contained in the AABB (bmin,bmax)
 
Real Math::AABBMargin (const Vector &x, const Vector &bmin, const Vector &bmax, int &index)
 
Real Math::AABBMargin (const Vector &x, const Vector &bmin, const Vector &bmax)
 
bool Math::AABBContains (const Vector &x, const Vector &bmin, const Vector &bmax, Real d=Zero)
 Returns true if the AABB (bmin,bmax) contains x.
 
int Math::AABBLineSearch (const Vector &x0, const Vector &dx, const Vector &bmin, const Vector &bmax, Real &t)
 
bool Math::AABBClipLine (const Vector &x0, const Vector &dx, const Vector &bmin, const Vector &bmax, Real &u0, Real &u1)
 

Detailed Description

Functions defining axis-aligned bounding boxes (AABBs).

An AABB consists of two Vectors (bmin,bmax), such that a Vector x is inside the AABB if $ bmin_i \leq x_i \leq bmax_i $ for all i.