Description
Classes
class | Geometry::Intersection::Slope |
Functions
bool | isBoxIntersectingTriangle(const Box_f & box, const Triangle_f & triangle) |
template< class box_t > | |
bool | isBoxIntersectingBox(const box_t & a, const box_t & b) |
template< class box_t > | |
box_t | getBoxBoxIntersection(const box_t & a, const box_t & b) |
template< typename value_t , typename line_t > | |
bool | getLineTriangleIntersection(const line_t & line, const Triangle < _Vec3 < value_t » & triangle, value_t & tLine, value_t & uTri, value_t & vTri) |
template< typename value_t > | |
void | _intersect(const _Vec3 < value_t > & v0, const _Vec3 < value_t > & v1, const _Vec3 < value_t > & v2, value_t pv0, value_t pv1, value_t pv2, float dv0, float dv1, float dv2, float * intersection1, float * intersection2, _Vec3 < value_t > & point1, _Vec3 < value_t > & point2) |
template< typename value_t > | |
bool | _computeIntersectionInterval(const Triangle < _Vec3 < value_t » & triangle, float pv0, float pv1, float pv2, float dv0, float dv1, float dv2, float dv0dv1, float dv0dv2, float * intersection1, float * intersection2, _Vec3 < value_t > & point1, _Vec3 < value_t > & point2) |
template< typename value_t > | |
int32_t | getTriangleTriangleIntersection(const Triangle < _Vec3 < value_t » & triangle1, const Triangle < _Vec3 < value_t » & triangle2, _Segment < _Vec3 < value_t » & tSegment) |
Documentation
function
Geometry::Intersection::isBoxIntersectingTriangle
public |
bool isBoxIntersectingTriangle( | const Box_f & | box, |
const Triangle_f & | triangle | |
) |
Check if a box intersect with a triangle.
See also: based on the following paper: {AkenineMoller01, author = “Tomas Akenine-M�ller”, title = “Fast 3D Triangle-Box Overlap Testing”, journal = “journal of graphics, gpu, and game tools”, volume = “6”, number = “1”, pages = “29-33”, year = “2001”, }
See also: original source code:http://jgt.akpeters.com/papers/AkenineMoller01/tribox.html
Defined in Geometry/BoxIntersection.h:44
function
Geometry::Intersection::isBoxIntersectingBox
public |
template< class box_t > | ||
bool isBoxIntersectingBox( | const box_t & | a, |
const box_t & | b | |
) |
Check if two boxes intersect.
Parameters
- a
- First box
- b
- Second box
Defined in Geometry/BoxIntersection.h:53
function
Geometry::Intersection::getBoxBoxIntersection
public |
template< class box_t > | ||
box_t getBoxBoxIntersection( | const box_t & | a, |
const box_t & | b | |
) |
Calculate the intersection of two boxes.
Parameters
- a
- First box
- b
- Second box
Returns
Intersection of the two boxes
Defined in Geometry/BoxIntersection.h:66
function
Geometry::Intersection::getLineTriangleIntersection
public |
template< typename value_t , typename line_t > | ||
bool getLineTriangleIntersection( | const line_t & | line, |
const Triangle < _Vec3 < value_t » & | triangle, | |
value_t & | tLine, | |
value_t & | uTri, | |
value_t & | vTri | |
) |
Calculate the intersection between a line and a triangle. Based on the article: Tomas Möller, Ben Trumbore: Fast, Minimum Storage Ray-Triangle Intersection . Journal of Graphics Tools 2, 1, pp. 21-28, 1997.
Parameters
Parameters
- line
- Line to test
- triangle
- Triangle to test
- tLine
- Line parameter of the intersection point between line and triangle. It is set only if there is an intersection.
- uTri
- First barycentric coordinate of the intersection point between line and triangle. It is set only if there is an intersection.
- vTri
- Second barycentric coordinate of the intersection point between line and triangle. It is set only if there is an intersection.
Returns
true
if the line and the triangle intersect,false
if there is no intersection
Author: Benjamin Eikel
Date: 2013-02-26
Defined in Geometry/LineTriangleIntersection.h:41
function
Geometry::Intersection::_intersect
public | inline |
template< typename value_t > | ||
void _intersect( | const _Vec3 < value_t > & | v0, |
const _Vec3 < value_t > & | v1, | |
const _Vec3 < value_t > & | v2, | |
value_t | pv0, | |
value_t | pv1, | |
value_t | pv2, | |
float | dv0, | |
float | dv1, | |
float | dv2, | |
float * | intersection1, | |
float * | intersection2, | |
_Vec3 < value_t > & | point1, | |
_Vec3 < value_t > & | point2 | |
) |
Defined in Geometry/TriangleTriangleIntersection.h:79
function
Geometry::Intersection::_computeIntersectionInterval
public | inline |
template< typename value_t > | ||
bool _computeIntersectionInterval( | const Triangle < _Vec3 < value_t » & | triangle, |
float | pv0, | |
float | pv1, | |
float | pv2, | |
float | dv0, | |
float | dv1, | |
float | dv2, | |
float | dv0dv1, | |
float | dv0dv2, | |
float * | intersection1, | |
float * | intersection2, | |
_Vec3 < value_t > & | point1, | |
_Vec3 < value_t > & | point2 | |
) |
Defined in Geometry/TriangleTriangleIntersection.h:91
function
Geometry::Intersection::getTriangleTriangleIntersection
public |
template< typename value_t > | ||
int32_t getTriangleTriangleIntersection( | const Triangle < _Vec3 < value_t » & | triangle1, |
const Triangle < _Vec3 < value_t » & | triangle2, | |
_Segment < _Vec3 < value_t » & | tSegment | |
) |
Calculate the intersection between a triangle and a triangle. Based on the article: Tomas Möller: A Fast Triangle-Triangle Intersection Test. Journal of Graphics Tools 2, 2, pp. 25-30, 1997.
Parameters
- value_t
- Either
float
ordouble
Parameters
- triangle1
- First triangle to test
- triangle2
- Second triangle to test
- tSegment
- Line segment of the intersection between the triangles. It is set only if there is an intersection.
Returns
1
if the triangles intersect,-1
if there is no intersection,0
if the triangles are coplanar
Author: Sascha Brandt
Date: 2015-02-26
Defined in Geometry/TriangleTriangleIntersection.h:137