igor::iIntersection Class Reference

#include <iIntersection.h>

Public Member Functions

template<typename T >
bool intersects (const iaSphere< T > &sphereA, const iaSphere< T > &sphereB)
 
template<typename T >
bool contains (const iaSphere< T > &sphereA, const iaSphere< T > &sphereB)
 
template<typename T >
bool inFrontOf (const iaSphere< T > &sphere, const iPlane< T > &plane)
 
template<typename T >
bool intersects (const iaSphere< T > &sphere, const iFrustum< T > &frustum)
 
template<typename T >
bool inFrontOf (const iAACube< T > &cube, const iPlane< T > &plane)
 
template<typename T >
bool intersects (const iAACube< T > &cube, const iaSphere< T > &sphere)
 
template<typename T >
bool intersects (const iAACube< T > &cube, const iFrustum< T > &frustum)
 
template<typename T >
bool intersects (const iaVector3< T > &vec, const iAACube< T > &cube)
 
template<typename T >
bool intersects (const iAACube< T > &cubeA, const iAACube< T > &cubeB)
 
template<typename T >
bool intersects (const iAABox< T > &boxA, const iAABox< T > &boxB)
 
template<typename T >
bool intersects (const iaVector2< T > &point, const iaRectangle< T > &rectangle)
 
template<typename T >
bool intersects (const iaRectangle< T > &rectangleA, const iaRectangle< T > &rectangleB)
 
template<typename T >
bool intersects (const iaCircle< T > &circle, const iaRectangle< T > &rectangle)
 
template<typename T >
bool contains (const iaRectangle< T > &rectangle, const iaCircle< T > &circle)
 
template<typename T >
bool intersects (const iaCircle< T > &circleA, const iaCircle< T > &circleB)
 
template<typename T >
bool intersects (const iaVector2< T > &point, const iaCircle< T > &circle)
 
template<typename T >
bool intersects (const iaVector3< T > &vec, const iAABox< T > &box)
 
template<typename T >
bool intersects (const iPlane< T > &plane, const iRay< T > &ray, iaVector3< T > &intersection)
 

Static Public Member Functions

template<typename T >
static bool intersects (const iaSphere< T > &sphereA, const iaSphere< T > &sphereB)
 
template<typename T >
static bool contains (const iaSphere< T > &sphereA, const iaSphere< T > &sphereB)
 
template<typename T >
static bool contains (const iaRectangle< T > &rectangle, const iaCircle< T > &circle)
 
template<typename T >
static bool inFrontOf (const iaSphere< T > &sphere, const iPlane< T > &plane)
 
template<typename T >
static bool intersects (const iaSphere< T > &sphere, const iFrustum< T > &frustum)
 
template<typename T >
static bool inFrontOf (const iAACube< T > &cube, const iPlane< T > &plane)
 
template<typename T >
static bool intersects (const iAACube< T > &cube, const iaSphere< T > &sphere)
 
template<typename T >
static bool intersects (const iAACube< T > &cube, const iFrustum< T > &frustum)
 
template<typename T >
static bool intersects (const iaVector3< T > &vec, const iAACube< T > &cube)
 
template<typename T >
static bool intersects (const iAACube< T > &cubeA, const iAACube< T > &cubeB)
 
template<typename T >
static bool intersects (const iAABox< T > &boxA, const iAABox< T > &boxB)
 
template<typename T >
static bool intersects (const iaVector3< T > &vec, const iAABox< T > &box)
 
template<typename T >
static bool intersects (const iaVector2< T > &point, const iaRectangle< T > &rectangle)
 
template<typename T >
static bool intersects (const iaCircle< T > &circle, const iaRectangle< T > &rectangle)
 
template<typename T >
static bool intersects (const iaRectangle< T > &rectangleA, const iaRectangle< T > &rectangleB)
 
template<typename T >
static bool intersects (const iaCircle< T > &circleA, const iaCircle< T > &circleB)
 
template<typename T >
static bool intersects (const iaVector2< T > &point, const iaCircle< T > &circle)
 
template<typename T >
static bool intersects (const iPlane< T > &plane, const iRay< T > &ray, iaVector3< T > &intersection)
 

Detailed Description

collection of intersection functions

good source of information http://noonat.github.io/intersect/

Member Function Documentation

◆ contains() [1/4]

template<typename T >
static bool igor::iIntersection::contains ( const iaRectangle< T > &  rectangle,
const iaCircle< T > &  circle 
)
static

containment test circle in rectangle

Parameters
circlethe circle to test
rectanglethe rectangle to test
Returns
true if circle is within rectangle boundaries

◆ contains() [2/4]

template<typename T >
bool igor::iIntersection::contains ( const iaRectangle< T > &  rectangle,
const iaCircle< T > &  circle 
)

◆ contains() [3/4]

template<typename T >
static bool igor::iIntersection::contains ( const iaSphere< T > &  sphereA,
const iaSphere< T > &  sphereB 
)
static

containment test sphere in spehre

Parameters
sphereAthe sphere A
sphereBthe sphere B
Returns
true if sphere A contains sphere B

◆ contains() [4/4]

template<typename T >
bool igor::iIntersection::contains ( const iaSphere< T > &  sphereA,
const iaSphere< T > &  sphereB 
)

◆ inFrontOf() [1/4]

template<typename T >
static bool igor::iIntersection::inFrontOf ( const iAACube< T > &  cube,
const iPlane< T > &  plane 
)
static

tests if cube is in front of a plane

Parameters
cubethe cube to test
planethe plane to test with
Returns
true if the cube is in front of the plane

◆ inFrontOf() [2/4]

template<typename T >
bool igor::iIntersection::inFrontOf ( const iAACube< T > &  cube,
const iPlane< T > &  plane 
)

◆ inFrontOf() [3/4]

template<typename T >
static bool igor::iIntersection::inFrontOf ( const iaSphere< T > &  sphere,
const iPlane< T > &  plane 
)
static

tests if sphere is in front of plane

Parameters
spherethe sphere to test
planethe plane to test
Returns
true if sphere is partially or fully in front of plane

◆ inFrontOf() [4/4]

template<typename T >
bool igor::iIntersection::inFrontOf ( const iaSphere< T > &  sphere,
const iPlane< T > &  plane 
)

◆ intersects() [1/28]

template<typename T >
static bool igor::iIntersection::intersects ( const iAABox< T > &  boxA,
const iAABox< T > &  boxB 
)
static

tests if two axis aligned boxes are intersecting

Parameters
boxAthe first box to test with
boxBthe second box to test with
Returns
true if the boxes intersect with each other

◆ intersects() [2/28]

template<typename T >
bool igor::iIntersection::intersects ( const iAABox< T > &  boxA,
const iAABox< T > &  boxB 
)

◆ intersects() [3/28]

template<typename T >
static bool igor::iIntersection::intersects ( const iAACube< T > &  cube,
const iaSphere< T > &  sphere 
)
static

tests if a cube intersects with a sphere

Parameters
cubethe cube to test with
spherethe sphere to test with
Returns
true if cube and sphere intersecting

◆ intersects() [4/28]

template<typename T >
bool igor::iIntersection::intersects ( const iAACube< T > &  cube,
const iaSphere< T > &  sphere 
)

◆ intersects() [5/28]

template<typename T >
static bool igor::iIntersection::intersects ( const iAACube< T > &  cube,
const iFrustum< T > &  frustum 
)
static

tests if a cube intersects with a frustum

Parameters
cubethe cube to test with
frustumthe frustum to test with
Returns
true if cube and frustum intersecting

◆ intersects() [6/28]

template<typename T >
bool igor::iIntersection::intersects ( const iAACube< T > &  cube,
const iFrustum< T > &  frustum 
)

◆ intersects() [7/28]

template<typename T >
static bool igor::iIntersection::intersects ( const iAACube< T > &  cubeA,
const iAACube< T > &  cubeB 
)
static

tests if two axis aligned cubes are intersecting

Parameters
cubeAthe first cube to test with
cubeBthe second cube to test with
Returns
true if the cubes intersect with each other

◆ intersects() [8/28]

template<typename T >
bool igor::iIntersection::intersects ( const iAACube< T > &  cubeA,
const iAACube< T > &  cubeB 
)

◆ intersects() [9/28]

template<typename T >
static bool igor::iIntersection::intersects ( const iaCircle< T > &  circle,
const iaRectangle< T > &  rectangle 
)
static

intersection test between rectangle and circle

Parameters
circlethe circle to test
rectanglethe rectangle to test
Returns
true if intersecting

◆ intersects() [10/28]

template<typename T >
bool igor::iIntersection::intersects ( const iaCircle< T > &  circle,
const iaRectangle< T > &  rectangle 
)

◆ intersects() [11/28]

template<typename T >
static bool igor::iIntersection::intersects ( const iaCircle< T > &  circleA,
const iaCircle< T > &  circleB 
)
static

intersection test between two circles

Parameters
circleAthe circle A to test
circleBthe circle B to test
Returns
true if intersecting

◆ intersects() [12/28]

template<typename T >
bool igor::iIntersection::intersects ( const iaCircle< T > &  circleA,
const iaCircle< T > &  circleB 
)

◆ intersects() [13/28]

template<typename T >
static bool igor::iIntersection::intersects ( const iaRectangle< T > &  rectangleA,
const iaRectangle< T > &  rectangleB 
)
static

intersection test between rectangle and rectangle

Parameters
rectangleAthe rectangle A to test
rectangleBthe rectangle B to test
Returns
true if intersecting

◆ intersects() [14/28]

template<typename T >
bool igor::iIntersection::intersects ( const iaRectangle< T > &  rectangleA,
const iaRectangle< T > &  rectangleB 
)

◆ intersects() [15/28]

template<typename T >
static bool igor::iIntersection::intersects ( const iaSphere< T > &  sphere,
const iFrustum< T > &  frustum 
)
static

tests if sphere intersects with frustum

Parameters
spehrethe sphere to test
frustumthe frustum to test with
Returns
true if sphere intersects with frustum

◆ intersects() [16/28]

template<typename T >
bool igor::iIntersection::intersects ( const iaSphere< T > &  sphere,
const iFrustum< T > &  frustum 
)

◆ intersects() [17/28]

template<typename T >
static bool igor::iIntersection::intersects ( const iaSphere< T > &  sphereA,
const iaSphere< T > &  sphereB 
)
static

intersection test sphere with spehre

Parameters
sphereAfirst sphere
sphereBsecond sphere
Returns
true if spheres collide

◆ intersects() [18/28]

template<typename T >
bool igor::iIntersection::intersects ( const iaSphere< T > &  sphereA,
const iaSphere< T > &  sphereB 
)

◆ intersects() [19/28]

template<typename T >
static bool igor::iIntersection::intersects ( const iaVector2< T > &  point,
const iaCircle< T > &  circle 
)
static

intersection test between two circles

Parameters
pointthe point to test
circlethe circle to test
Returns
true if intersecting

◆ intersects() [20/28]

template<typename T >
bool igor::iIntersection::intersects ( const iaVector2< T > &  point,
const iaCircle< T > &  circle 
)

◆ intersects() [21/28]

template<typename T >
static bool igor::iIntersection::intersects ( const iaVector2< T > &  point,
const iaRectangle< T > &  rectangle 
)
static

intersection test between rectangle and point

Parameters
pointthe point to test
rectanglethe rectangle to test
Returns
true if intersecting

◆ intersects() [22/28]

template<typename T >
bool igor::iIntersection::intersects ( const iaVector2< T > &  point,
const iaRectangle< T > &  rectangle 
)

◆ intersects() [23/28]

template<typename T >
static bool igor::iIntersection::intersects ( const iaVector3< T > &  vec,
const iAABox< T > &  box 
)
static

tests if a vector intersects with a axis aligned box

Parameters
vecthe vector to test with
boxthe box to test with
Returns
true if the vector intersects with the box

◆ intersects() [24/28]

template<typename T >
bool igor::iIntersection::intersects ( const iaVector3< T > &  vec,
const iAABox< T > &  box 
)

◆ intersects() [25/28]

template<typename T >
static bool igor::iIntersection::intersects ( const iaVector3< T > &  vec,
const iAACube< T > &  cube 
)
static

tests if a vector intersects with a cube

Parameters
vecthe vector to test with
cubethe cube to test with
Returns
true if the vector intersects with the cube

◆ intersects() [26/28]

template<typename T >
bool igor::iIntersection::intersects ( const iaVector3< T > &  vec,
const iAACube< T > &  cube 
)

◆ intersects() [27/28]

template<typename T >
static bool igor::iIntersection::intersects ( const iPlane< T > &  plane,
const iRay< T > &  ray,
iaVector3< T > &  intersection 
)
static

intersection test between plane and ray

Parameters
planethe plane to test with
raythe plane to test with
[out]intersectionthe calculated intersection point
Returns
true if intersecting

◆ intersects() [28/28]

template<typename T >
bool igor::iIntersection::intersects ( const iPlane< T > &  plane,
const iRay< T > &  ray,
iaVector3< T > &  intersection 
)

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