diff options
author | Dave Parks <davep@lindenlab.com> | 2009-11-13 17:01:56 -0600 |
---|---|---|
committer | Dave Parks <davep@lindenlab.com> | 2009-11-13 17:01:56 -0600 |
commit | c02702f3871979cb7745b49aa502ac3c71f77681 (patch) | |
tree | f3bc57b17e276068ad68884c8087c30f97620817 /indra/llmath/llvolume.cpp | |
parent | 0c50236a944898502405a31aa1f0b6ae61ae38ae (diff) |
CTS-7 Add hard edge threshold capability to normal generation.
Diffstat (limited to 'indra/llmath/llvolume.cpp')
-rw-r--r-- | indra/llmath/llvolume.cpp | 12 |
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) { |