diff options
author | Dave Parks <davep@lindenlab.com> | 2010-08-06 11:57:40 -0500 |
---|---|---|
committer | Dave Parks <davep@lindenlab.com> | 2010-08-06 11:57:40 -0500 |
commit | 531a732f43818a2ec8c18f8136c4748ab5f291f9 (patch) | |
tree | 9bcb342cffdb4b895303c064f4247687f141e604 /indra | |
parent | 3cf9a103859a2d1a083a14ae321c32d552a2ef39 (diff) | |
parent | 129e31373eaef9cbd74451bfeb4ad62b64d17250 (diff) |
merge
Diffstat (limited to 'indra')
-rw-r--r-- | indra/llmath/llvolume.cpp | 40 |
1 files changed, 33 insertions, 7 deletions
diff --git a/indra/llmath/llvolume.cpp b/indra/llmath/llvolume.cpp index 0976487cbd..bba0a6d089 100644 --- a/indra/llmath/llvolume.cpp +++ b/indra/llmath/llvolume.cpp @@ -2055,22 +2055,48 @@ void LLVolumeFace::VertexData::setNormal(const LLVector4a& norm) bool LLVolumeFace::VertexData::operator<(const LLVolumeFace::VertexData& rhs)const { - if (mData[POSITION].notEqual3(rhs.getPosition())) + const F32* lp = this->getPosition().getF32(); + const F32* rp = rhs.getPosition().getF32(); + + if (lp[0] != rp[0]) + { + return lp[0] < rp[0]; + } + + if (rp[1] != lp[1]) + { + return lp[1] < rp[1]; + } + + if (rp[2] != lp[2]) + { + return lp[2] < rp[2]; + } + + lp = getNormal().getF32(); + rp = rhs.getNormal().getF32(); + + if (lp[0] != rp[0]) + { + return lp[0] < rp[0]; + } + + if (rp[1] != lp[1]) { - return mData[POSITION].less3(rhs.getPosition()); + return lp[1] < rp[1]; } - if (mData[NORMAL].notEqual3(rhs.getNormal())) + if (rp[2] != lp[2]) { - return mData[NORMAL].less3(rhs.getNormal()); + return lp[2] < rp[2]; } - if (mTexCoord != rhs.mTexCoord) + if (mTexCoord.mV[0] != rhs.mTexCoord.mV[0]) { - return mTexCoord < rhs.mTexCoord; + return mTexCoord.mV[0] < rhs.mTexCoord.mV[0]; } - return false; + return mTexCoord.mV[1] < rhs.mTexCoord.mV[1]; } bool LLVolumeFace::VertexData::operator==(const LLVolumeFace::VertexData& rhs)const |