Go to the SVN repository for this file.
1 #ifndef GUI_MATH___INTERSECT__HPP 2 #define GUI_MATH___INTERSECT__HPP 68 template<
classData>
76 boolcull_test =
false)
86Data determinant = edge1.
Dot(pvec);
101Data u = tvec.
Dot(pvec);
102 if(u < 0.0 || u > determinant) {
108Data v = dir.
Dot(qvec);
109 if(v < 0.0 || u + v > determinant) {
114Data
t= edge2.
Dot(qvec);
115intersect_pt =
origin+ dir *
t;
138 template<
classData>
147 boolcull_test =
false)
152intersect_pt, cull_test);
158intersect_pt, cull_test);
CVect3< T > Cross(const CVect3< T > &) const
T Dot(const CVect3< T > &) const
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define END_SCOPE(ns)
End the previously defined scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
#define BEGIN_SCOPE(ns)
Define a new scope.
static const GLdouble origin[]
EIntersectResult IntersectRayTriangle(const CVect3< Data > &origin, const CVect3< Data > &dir, const CVect3< Data > &vert0, const CVect3< Data > &vert1, const CVect3< Data > &vert2, CVect3< Data > &intersect_pt, bool cull_test=false)
IntersectRayTriangle() computes the intersection point of a ray collided with a triangle.
EIntersectResult
enum describing the sorts of expected results from a hit test
@ eIntersects
intersection found
@ eNoIntersection
no intersection found
@ eCritical
data are critical; intersection can't be determined
EIntersectResult IntersectRayQuad(const CVect3< Data > &origin, const CVect3< Data > &dir, const CVect3< Data > &vert0, const CVect3< Data > &vert1, const CVect3< Data > &vert2, const CVect3< Data > &vert3, CVect3< Data > &intersect_pt, bool cull_test=false)
IntersectRayQuad() computes the intersection point of a ray collided with a quad.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4