diff options
| author | Dave Parks <davep@lindenlab.com> | 2012-05-22 00:04:13 -0500 | 
|---|---|---|
| committer | Dave Parks <davep@lindenlab.com> | 2012-05-22 00:04:13 -0500 | 
| commit | b9606f57c32dc021fd967a40aebc1d2a44bea0bd (patch) | |
| tree | f02309fcf2de6a74575bacff9c9621d05d4c3051 /indra/newview | |
| parent | 6fe9b45db2e9fa8144882bc9dbc656c1b4ff7fad (diff) | |
MAINT-616 Minor raycasting optimization.
Diffstat (limited to 'indra/newview')
| -rw-r--r-- | indra/newview/llvovolume.cpp | 17 | 
1 files changed, 12 insertions, 5 deletions
| diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp index 6bb4e9e63b..ba117ed977 100644 --- a/indra/newview/llvovolume.cpp +++ b/indra/newview/llvovolume.cpp @@ -3516,9 +3516,12 @@ LLVector3 LLVOVolume::agentPositionToVolume(const LLVector3& pos) const  {  	LLVector3 ret = pos - getRenderPosition();  	ret = ret * ~getRenderRotation(); -	LLVector3 objScale = isVolumeGlobal() ? LLVector3(1,1,1) : getScale(); -	LLVector3 invObjScale(1.f / objScale.mV[VX], 1.f / objScale.mV[VY], 1.f / objScale.mV[VZ]); -	ret.scaleVec(invObjScale); +	if (!isVolumeGlobal()) +	{ +		LLVector3 objScale = getScale(); +		LLVector3 invObjScale(1.f / objScale.mV[VX], 1.f / objScale.mV[VY], 1.f / objScale.mV[VZ]); +		ret.scaleVec(invObjScale); +	}  	return ret;  } @@ -3536,8 +3539,12 @@ LLVector3 LLVOVolume::agentDirectionToVolume(const LLVector3& dir) const  LLVector3 LLVOVolume::volumePositionToAgent(const LLVector3& dir) const  {  	LLVector3 ret = dir; -	LLVector3 objScale = isVolumeGlobal() ? LLVector3(1,1,1) : getScale(); -	ret.scaleVec(objScale); +	if (!isVolumeGlobal()) +	{ +		LLVector3 objScale = getScale(); +		ret.scaleVec(objScale); +	} +  	ret = ret * getRenderRotation();  	ret += getRenderPosition(); | 
