Namespaces | Functions

Intersection.h File Reference

#include <algorithm>
#include <limits>
#include <gmtl/AABox.h>
#include <gmtl/Point.h>
#include <gmtl/Sphere.h>
#include <gmtl/Vec.h>
#include <gmtl/Plane.h>
#include <gmtl/VecOps.h>
#include <gmtl/Math.h>
#include <gmtl/Ray.h>
#include <gmtl/LineSeg.h>
#include <gmtl/Tri.h>
#include <gmtl/PlaneOps.h>
Include dependency graph for Intersection.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  gmtl
 

Meta programming classes.


Functions

template<class DATA_TYPE >
bool gmtl::intersect (const AABox< DATA_TYPE > &box1, const AABox< DATA_TYPE > &box2)
 Tests if the given AABoxes intersect with each other.
template<class DATA_TYPE >
bool gmtl::intersect (const AABox< DATA_TYPE > &box, const Point< DATA_TYPE, 3 > &point)
 Tests if the given AABox and point intersect with each other.
template<class DATA_TYPE >
bool gmtl::intersect (const AABox< DATA_TYPE > &box1, const Vec< DATA_TYPE, 3 > &path1, const AABox< DATA_TYPE > &box2, const Vec< DATA_TYPE, 3 > &path2, DATA_TYPE &firstContact, DATA_TYPE &secondContact)
 Tests if the given AABoxes intersect if moved along the given paths.
template<class DATA_TYPE >
bool gmtl::intersectAABoxRay (const AABox< DATA_TYPE > &box, const Ray< DATA_TYPE > &ray, DATA_TYPE &tIn, DATA_TYPE &tOut)
 Given an axis-aligned bounding box and a ray (or subclass thereof), returns whether the ray intersects the box, and if so, tIn and tOut are set to the parametric terms on the ray where the segment enters and exits the box respectively.
template<class DATA_TYPE >
bool gmtl::intersect (const AABox< DATA_TYPE > &box, const LineSeg< DATA_TYPE > &seg, unsigned int &numHits, DATA_TYPE &tIn, DATA_TYPE &tOut)
 Given a line segment and an axis-aligned bounding box, returns whether the line intersects the box, and if so, tIn and tOut are set to the parametric terms on the line segment where the segment enters and exits the box respectively.
template<class DATA_TYPE >
bool gmtl::intersect (const LineSeg< DATA_TYPE > &seg, const AABox< DATA_TYPE > &box, unsigned int &numHits, DATA_TYPE &tIn, DATA_TYPE &tOut)
 Given a line segment and an axis-aligned bounding box, returns whether the line intersects the box, and if so, tIn and tOut are set to the parametric terms on the line segment where the segment enters and exits the box respectively.
template<class DATA_TYPE >
bool gmtl::intersect (const AABox< DATA_TYPE > &box, const Ray< DATA_TYPE > &ray, unsigned int &numHits, DATA_TYPE &tIn, DATA_TYPE &tOut)
 Given a ray and an axis-aligned bounding box, returns whether the ray intersects the box, and if so, tIn and tOut are set to the parametric terms on the ray where it enters and exits the box respectively.
template<class DATA_TYPE >
bool gmtl::intersect (const Ray< DATA_TYPE > &ray, const AABox< DATA_TYPE > &box, unsigned int &numHits, DATA_TYPE &tIn, DATA_TYPE &tOut)
 Given a ray and an axis-aligned bounding box, returns whether the ray intersects the box, and if so, tIn and tOut are set to the parametric terms on the ray where it enters and exits the box respectively.
template<class DATA_TYPE >
bool gmtl::intersect (const Sphere< DATA_TYPE > &sph1, const Vec< DATA_TYPE, 3 > &path1, const Sphere< DATA_TYPE > &sph2, const Vec< DATA_TYPE, 3 > &path2, DATA_TYPE &firstContact, DATA_TYPE &secondContact)
 Tests if the given Spheres intersect if moved along the given paths.
template<class DATA_TYPE >
bool gmtl::intersect (const AABox< DATA_TYPE > &box, const Sphere< DATA_TYPE > &sph)
 Tests if the given AABox and Sphere intersect with each other.
template<class DATA_TYPE >
bool gmtl::intersect (const Sphere< DATA_TYPE > &sph, const AABox< DATA_TYPE > &box)
 Tests if the given AABox and Sphere intersect with each other.
template<class DATA_TYPE >
bool gmtl::intersect (const Sphere< DATA_TYPE > &sphere, const Point< DATA_TYPE, 3 > &point)
 intersect point/sphere.
template<typename T >
bool gmtl::intersect (const Sphere< T > &sphere, const Ray< T > &ray, int &numhits, T &t0, T &t1)
 intersect ray/sphere-shell (not volume).
template<typename T >
bool gmtl::intersect (const Sphere< T > &sphere, const LineSeg< T > &lineseg, int &numhits, T &t0, T &t1)
 intersect LineSeg/Sphere-shell (not volume).
template<typename T >
bool gmtl::intersectVolume (const Sphere< T > &sphere, const LineSeg< T > &ray, int &numhits, T &t0, T &t1)
 intersect lineseg/sphere-volume.
template<typename T >
bool gmtl::intersectVolume (const Sphere< T > &sphere, const Ray< T > &ray, int &numhits, T &t0, T &t1)
 intersect ray/sphere-volume.
template<class DATA_TYPE >
bool gmtl::intersect (const Plane< DATA_TYPE > &plane, const Ray< DATA_TYPE > &ray, DATA_TYPE &t)
 Tests if the given plane and ray intersect with each other.
template<class DATA_TYPE >
bool gmtl::intersect (const Plane< DATA_TYPE > &plane, const LineSeg< DATA_TYPE > &seg, DATA_TYPE &t)
 Tests if the given plane and lineseg intersect with each other.
template<class DATA_TYPE >
bool gmtl::intersect (const Tri< DATA_TYPE > &tri, const Ray< DATA_TYPE > &ray, float &u, float &v, float &t)
 Tests if the given triangle and ray intersect with each other.
template<class DATA_TYPE >
bool gmtl::intersectDoubleSided (const Tri< DATA_TYPE > &tri, const Ray< DATA_TYPE > &ray, DATA_TYPE &u, DATA_TYPE &v, DATA_TYPE &t)
 Tests if the given triangle intersects with the given ray, from both sides.
template<class DATA_TYPE >
bool gmtl::intersect (const Tri< DATA_TYPE > &tri, const LineSeg< DATA_TYPE > &lineseg, DATA_TYPE &u, DATA_TYPE &v, DATA_TYPE &t)
 Tests if the given triangle and line segment intersect with each other.