Merge cleanup

meow-7.2.2
Dave Parks 2013-06-20 16:56:10 -05:00
parent 9ea2d90a0d
commit 1e3060f6d5
6 changed files with 30 additions and 29 deletions

View File

@ -231,7 +231,7 @@ BOOL gShowOverlayTitle = FALSE;
LLViewerObject* gDebugRaycastObject = NULL;
LLVOPartGroup* gDebugRaycastParticle = NULL;
LLVector4a gDebugRaycastIntersection;
LLVector3 gDebugRaycastParticleIntersection;
LLVector4a gDebugRaycastParticleIntersection;
LLVector2 gDebugRaycastTexCoord;
LLVector4a gDebugRaycastNormal;
LLVector4a gDebugRaycastTangent;
@ -5180,9 +5180,9 @@ void LLPickInfo::fetchResults()
LLVector4a origin;
origin.load3(LLViewerCamera::getInstance()->getOrigin().mV);
F32 icon_dist = 0.f;
LLVector3 start;
LLVector3 end;
LLVector3 particle_end;
LLVector4a start;
LLVector4a end;
LLVector4a particle_end;
if (hit_icon)
{

View File

@ -507,7 +507,7 @@ extern LLFrameTimer gAwayTriggerTimer; // how long the avatar has been away
extern LLViewerObject* gDebugRaycastObject;
extern LLVector4a gDebugRaycastIntersection;
extern LLVOPartGroup* gDebugRaycastParticle;
extern LLVector3 gDebugRaycastParticleIntersection;
extern LLVector4a gDebugRaycastParticleIntersection;
extern LLVector2 gDebugRaycastTexCoord;
extern LLVector4a gDebugRaycastNormal;
extern LLVector4a gDebugRaycastTangent;

View File

@ -193,8 +193,14 @@ void LLVOPartGroup::updateSpatialExtents(LLVector4a& newMin, LLVector4a& newMax)
const LLVector3& pos_agent = getPositionAgent();
newMin.load3( (pos_agent - mScale).mV);
newMax.load3( (pos_agent + mScale).mV);
llassert(newMin.isFinite3());
llassert(newMax.isFinite3());
LLVector4a pos;
pos.load3(pos_agent.mV);
llassert(pos.isFinite3());
mDrawable->setPositionGroup(pos);
}
@ -419,21 +425,17 @@ BOOL LLVOPartGroup::updateGeometry(LLDrawable *drawable)
}
BOOL LLVOPartGroup::lineSegmentIntersect(const LLVector3& start, const LLVector3& end,
BOOL LLVOPartGroup::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* bi_normal)
{
LLVector4a starta, enda;
starta.load3(start.mV);
enda.load3(end.mV);
LLVector4a dir;
dir.setSub(enda, starta);
dir.setSub(end, start);
F32 closest_t = 2.f;
BOOL ret = FALSE;
@ -449,8 +451,8 @@ BOOL LLVOPartGroup::lineSegmentIntersect(const LLVector3& start, const LLVector3
getGeometry(part, verticesp);
F32 a,b,t;
if (LLTriangleRayIntersect(v[0], v[1], v[2], starta, dir, a,b,t) ||
LLTriangleRayIntersect(v[1], v[3], v[2], starta, dir, a,b,t))
if (LLTriangleRayIntersect(v[0], v[1], v[2], start, dir, a,b,t) ||
LLTriangleRayIntersect(v[1], v[3], v[2], start, dir, a,b,t))
{
if (t >= 0.f &&
t <= 1.f &&
@ -467,8 +469,7 @@ BOOL LLVOPartGroup::lineSegmentIntersect(const LLVector3& start, const LLVector3
{
LLVector4a intersect = dir;
intersect.mul(closest_t);
intersect.add(starta);
intersection->set(intersect.getF32ptr());
intersection->setAdd(intersect, start);
}
}
}

View File

@ -69,14 +69,14 @@ public:
virtual void updateSpatialExtents(LLVector4a& newMin, LLVector4a& newMax);
virtual U32 getPartitionType() const;
/*virtual*/ BOOL lineSegmentIntersect(const LLVector3& start, const LLVector3& end,
/*virtual*/ BOOL 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);
/*virtual*/ void setPixelAreaAndAngle(LLAgent &agent);
/*virtual*/ void updateTextures();

View File

@ -5210,7 +5210,7 @@ void LLPipeline::renderDebug()
gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
LLVector3 center = gDebugRaycastParticleIntersection;
LLVector3 center(gDebugRaycastParticleIntersection.getF32ptr());
LLVector3 size(0.1f, 0.1f, 0.1f);
LLVector3 p[6];
@ -6916,12 +6916,12 @@ void LLPipeline::setRenderHighlightTextureChannel(LLRender::eTexIndex channel)
sRenderHighlightTextureChannel = channel;
}
LLVOPartGroup* LLPipeline::lineSegmentIntersectParticle(const LLVector3& start, const LLVector3& end, LLVector3* intersection,
LLVOPartGroup* LLPipeline::lineSegmentIntersectParticle(const LLVector4a& start, const LLVector4a& end, LLVector4a* intersection,
S32* face_hit)
{
LLVector3 local_end = end;
LLVector4a local_end = end;
LLVector3 position;
LLVector4a position;
LLDrawable* drawable = NULL;
@ -6958,7 +6958,7 @@ LLVOPartGroup* LLPipeline::lineSegmentIntersectParticle(const LLVector3& start,
return ret;
}
LLViewerObject* LLPipeline::lineSegmentIntersectInWorld(const LLVector3& start, const LLVector3& end,
LLViewerObject* LLPipeline::lineSegmentIntersectInWorld(const LLVector4a& start, const LLVector4a& end,
BOOL pick_transparent,
S32* face_hit,
LLVector4a* intersection, // return the intersection point

View File

@ -199,11 +199,11 @@ public:
);
//get the closest particle to start between start and end, returns the LLVOPartGroup and particle index
LLVOPartGroup* lineSegmentIntersectParticle(const LLVector3& start, const LLVector3& end, LLVector3* intersection,
LLVOPartGroup* lineSegmentIntersectParticle(const LLVector4a& start, const LLVector4a& end, LLVector4a* intersection,
S32* face_hit);
LLViewerObject* lineSegmentIntersectInHUD(const LLVector3& start, const LLVector3& end,
LLViewerObject* lineSegmentIntersectInHUD(const LLVector4a& start, const LLVector4a& end,
BOOL pick_transparent,
S32* face_hit, // return the face hit
LLVector4a* intersection = NULL, // return the intersection point