summaryrefslogtreecommitdiff
path: root/indra/llmath/llvolume.cpp
diff options
context:
space:
mode:
authorDave Parks <davep@lindenlab.com>2009-11-13 17:01:56 -0600
committerDave Parks <davep@lindenlab.com>2009-11-13 17:01:56 -0600
commitc02702f3871979cb7745b49aa502ac3c71f77681 (patch)
treef3bc57b17e276068ad68884c8087c30f97620817 /indra/llmath/llvolume.cpp
parent0c50236a944898502405a31aa1f0b6ae61ae38ae (diff)
CTS-7 Add hard edge threshold capability to normal generation.
Diffstat (limited to 'indra/llmath/llvolume.cpp')
-rw-r--r--indra/llmath/llvolume.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/indra/llmath/llvolume.cpp b/indra/llmath/llvolume.cpp
index 6286d1bcea..f252b2a232 100644
--- a/indra/llmath/llvolume.cpp
+++ b/indra/llmath/llvolume.cpp
@@ -1876,6 +1876,18 @@ bool LLVolumeFace::VertexData::operator==(const LLVolumeFace::VertexData& rhs)co
return true;
}
+bool LLVolumeFace::VertexData::compareNormal(const LLVolumeFace::VertexData& rhs, F32 angle_cutoff) const
+{
+ bool retval = false;
+ if (rhs.mPosition == mPosition && rhs.mTexCoord == mTexCoord)
+ {
+ F32 cur_angle = rhs.mNormal*mNormal;
+
+ retval = cur_angle > angle_cutoff;
+ }
+
+ return retval;
+}
BOOL LLVolume::createVolumeFacesFromFile(const std::string& file_name)
{