summaryrefslogtreecommitdiff
path: root/indra/newview/llvoavatar.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llvoavatar.cpp')
-rwxr-xr-xindra/newview/llvoavatar.cpp37
1 files changed, 19 insertions, 18 deletions
diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp
index a0a2ce0caf..7909570883 100755
--- a/indra/newview/llvoavatar.cpp
+++ b/indra/newview/llvoavatar.cpp
@@ -1393,19 +1393,20 @@ void LLVOAvatar::renderCollisionVolumes()
if (mNameText.notNull())
{
- LLVector3 unused;
- mNameText->lineSegmentIntersect(LLVector3(0,0,0), LLVector3(0,0,1), unused, TRUE);
+ LLVector4a unused;
+
+ mNameText->lineSegmentIntersect(unused, unused, unused, TRUE);
}
}
-BOOL LLVOAvatar::lineSegmentIntersect(const LLVector3& start, const LLVector3& end,
+BOOL LLVOAvatar::lineSegmentIntersect(const LLVector4a& start, const LLVector4a& end,
S32 face,
BOOL pick_transparent,
S32* face_hit,
- LLVector3* intersection,
+ LLVector4a* intersection,
LLVector2* tex_coord,
- LLVector3* normal,
- LLVector3* bi_normal)
+ LLVector4a* normal,
+ LLVector4a* tangent)
{
if ((isSelf() && !gAgent.needsRenderAvatar()) || !LLPipeline::sPickAvatar)
{
@@ -1422,8 +1423,8 @@ BOOL LLVOAvatar::lineSegmentIntersect(const LLVector3& start, const LLVector3& e
glh::matrix4f inverse = mat.inverse();
glh::matrix4f norm_mat = inverse.transpose();
- glh::vec3f p1(start.mV);
- glh::vec3f p2(end.mV);
+ glh::vec3f p1(start.getF32ptr());
+ glh::vec3f p2(end.getF32ptr());
inverse.mult_matrix_vec(p1);
inverse.mult_matrix_vec(p2);
@@ -1442,12 +1443,12 @@ BOOL LLVOAvatar::lineSegmentIntersect(const LLVector3& start, const LLVector3& e
if (intersection)
{
- *intersection = LLVector3(res_pos.v);
+ intersection->load3(res_pos.v);
}
if (normal)
{
- *normal = LLVector3(res_norm.v);
+ normal->load3(res_norm.v);
}
return TRUE;
@@ -1483,7 +1484,7 @@ BOOL LLVOAvatar::lineSegmentIntersect(const LLVector3& start, const LLVector3& e
- LLVector3 position;
+ LLVector4a position;
if (mNameText.notNull() && mNameText->lineSegmentIntersect(start, end, position))
{
if (intersection)
@@ -1497,14 +1498,14 @@ BOOL LLVOAvatar::lineSegmentIntersect(const LLVector3& start, const LLVector3& e
return FALSE;
}
-LLViewerObject* LLVOAvatar::lineSegmentIntersectRiggedAttachments(const LLVector3& start, const LLVector3& end,
+LLViewerObject* LLVOAvatar::lineSegmentIntersectRiggedAttachments(const LLVector4a& start, const LLVector4a& end,
S32 face,
BOOL pick_transparent,
S32* face_hit,
- LLVector3* intersection,
+ LLVector4a* intersection,
LLVector2* tex_coord,
- LLVector3* normal,
- LLVector3* bi_normal)
+ LLVector4a* normal,
+ LLVector4a* tangent)
{
if (isSelf() && !gAgent.needsRenderAvatar())
{
@@ -1515,8 +1516,8 @@ LLViewerObject* LLVOAvatar::lineSegmentIntersectRiggedAttachments(const LLVector
if (lineSegmentBoundingBox(start, end))
{
- LLVector3 local_end = end;
- LLVector3 local_intersection;
+ LLVector4a local_end = end;
+ LLVector4a local_intersection;
for (attachment_map_t::iterator iter = mAttachmentPoints.begin();
iter != mAttachmentPoints.end();
@@ -1530,7 +1531,7 @@ LLViewerObject* LLVOAvatar::lineSegmentIntersectRiggedAttachments(const LLVector
{
LLViewerObject* attached_object = (*attachment_iter);
- if (attached_object->lineSegmentIntersect(start, local_end, face, pick_transparent, face_hit, &local_intersection, tex_coord, normal, bi_normal))
+ if (attached_object->lineSegmentIntersect(start, local_end, face, pick_transparent, face_hit, &local_intersection, tex_coord, normal, tangent))
{
local_end = local_intersection;
if (intersection)