summaryrefslogtreecommitdiff
path: root/indra/llmath/llvolume.h
diff options
context:
space:
mode:
authorKarl Steifvater <qarl@lindenlab.com>2008-07-23 21:20:19 +0000
committerKarl Steifvater <qarl@lindenlab.com>2008-07-23 21:20:19 +0000
commit52562e2e664c70dcd476291820ac02b893e489b8 (patch)
tree5137f49f194a6a28f290385c38f689d77656b2e0 /indra/llmath/llvolume.h
parentbc39ad916e8f23ffae12184eee675aa7c1be2ca9 (diff)
svn merge -r92720:92721 svn+ssh://svn.lindenlab.com/svn/linden/branches/uv-picking-merge
QAR-698 / DEV-9985 add touch "position" information to touch-events in LSL
Diffstat (limited to 'indra/llmath/llvolume.h')
-rw-r--r--indra/llmath/llvolume.h14
1 files changed, 13 insertions, 1 deletions
diff --git a/indra/llmath/llvolume.h b/indra/llmath/llvolume.h
index c395ed7378..0444a02825 100644
--- a/indra/llmath/llvolume.h
+++ b/indra/llmath/llvolume.h
@@ -906,7 +906,13 @@ public:
//get the face index of the face that intersects with the given line segment at the point
//closest to start. Moves end to the point of intersection. Returns -1 if no intersection.
//Line segment must be in volume space.
- S32 lineSegmentIntersect(const LLVector3& start, LLVector3& end) const;
+ S32 lineSegmentIntersect(const LLVector3& start, const LLVector3& end,
+ S32 face = -1, // which face to check, -1 = ALL_SIDES
+ LLVector3* intersection = NULL, // return the intersection point
+ LLVector2* tex_coord = NULL, // return the texture coordinates of the intersection point
+ LLVector3* normal = NULL, // return the surface normal at the intersection point
+ LLVector3* bi_normal = NULL // return the surface bi-normal at the intersection point
+ );
// The following cleans up vertices and triangles,
// getting rid of degenerate triangles and duplicate vertices,
@@ -967,4 +973,10 @@ LLVector3 calc_binormal_from_triangle(
const LLVector3& pos2,
const LLVector2& tex2);
+BOOL LLLineSegmentBoxIntersect(const LLVector3& start, const LLVector3& end, const LLVector3& center, const LLVector3& size);
+BOOL LLTriangleRayIntersect(const LLVector3& vert0, const LLVector3& vert1, const LLVector3& vert2, const LLVector3& orig, const LLVector3& dir,
+ F32* intersection_a, F32* intersection_b, F32* intersection_t, BOOL two_sided);
+
+
+
#endif