diff options
| -rwxr-xr-x | indra/newview/llviewerwindow.cpp | 8 | ||||
| -rwxr-xr-x | indra/newview/llviewerwindow.h | 2 | ||||
| -rwxr-xr-x | indra/newview/llvopartgroup.cpp | 27 | ||||
| -rwxr-xr-x | indra/newview/llvopartgroup.h | 8 | ||||
| -rwxr-xr-x | indra/newview/pipeline.cpp | 10 | ||||
| -rwxr-xr-x | indra/newview/pipeline.h | 4 | 
6 files changed, 30 insertions, 29 deletions
diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index 19426090a2..87ae224655 100755 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -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)  	{ diff --git a/indra/newview/llviewerwindow.h b/indra/newview/llviewerwindow.h index e764adbd35..c16b80b214 100755 --- a/indra/newview/llviewerwindow.h +++ b/indra/newview/llviewerwindow.h @@ -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; diff --git a/indra/newview/llvopartgroup.cpp b/indra/newview/llvopartgroup.cpp index e8cfafc784..d3c035ecdc 100755 --- a/indra/newview/llvopartgroup.cpp +++ b/indra/newview/llvopartgroup.cpp @@ -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);  				}  			}  		} diff --git a/indra/newview/llvopartgroup.h b/indra/newview/llvopartgroup.h index ce05a0282e..2befb01823 100755 --- a/indra/newview/llvopartgroup.h +++ b/indra/newview/llvopartgroup.h @@ -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(); diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index 7bab06c868..9afb74bb52 100755 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -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 diff --git a/indra/newview/pipeline.h b/indra/newview/pipeline.h index 1e9d54e7ac..0f2a807f7a 100755 --- a/indra/newview/pipeline.h +++ b/indra/newview/pipeline.h @@ -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  | 
