diff options
| author | Graham Linden <graham@lindenlab.com> | 2018-07-31 17:35:42 +0100 |
|---|---|---|
| committer | Graham Linden <graham@lindenlab.com> | 2018-07-31 17:35:42 +0100 |
| commit | d748dbce457dabf6bc46eb22c5c5315f50af159c (patch) | |
| tree | 804a416cf30511e82f12171370bd4da46a64213b /indra/newview/llselectmgr.cpp | |
| parent | 60d256e80f019e77afef941bc02eb65be6f9bc6d (diff) | |
MAINT-8909
Loosen precision when checking rotation and other false negatives when comparing
faces to see if they can be considered planar aligned. This was causing fields to
be marked tentative (grayed display) incorrectly.
Diffstat (limited to 'indra/newview/llselectmgr.cpp')
| -rw-r--r-- | indra/newview/llselectmgr.cpp | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/indra/newview/llselectmgr.cpp b/indra/newview/llselectmgr.cpp index 53f09ab62d..86b88e0a59 100644 --- a/indra/newview/llselectmgr.cpp +++ b/indra/newview/llselectmgr.cpp @@ -7936,3 +7936,43 @@ void LLSelectMgr::sendSelectionMove() //saveSelectedObjectTransform(SELECT_ACTION_TYPE_PICK); } + +bool LLCheckIdenticalFunctor<F32>::same(const F32& a, const F32& b, const F32& tolerance) +{ + F32 delta = (a - b); + F32 abs_delta = fabs(delta); + bool is_samish = abs_delta <= tolerance; + if (!is_samish) + { + int q = 0; + q++; + } + return is_samish; +} + +#define DEF_DUMMY_CHECK_FUNCTOR(T) \ +bool LLCheckIdenticalFunctor<T>::same(const T& a, const T& b, const T& tolerance) \ +{ \ + (void)tolerance; \ + return a == b; \ +} + +DEF_DUMMY_CHECK_FUNCTOR(LLUUID) +DEF_DUMMY_CHECK_FUNCTOR(LLGLenum) +DEF_DUMMY_CHECK_FUNCTOR(LLTextureEntry) +DEF_DUMMY_CHECK_FUNCTOR(LLTextureEntry::e_texgen) +DEF_DUMMY_CHECK_FUNCTOR(bool) +DEF_DUMMY_CHECK_FUNCTOR(U8) +DEF_DUMMY_CHECK_FUNCTOR(int) +DEF_DUMMY_CHECK_FUNCTOR(LLColor4) +DEF_DUMMY_CHECK_FUNCTOR(LLMediaEntry) +DEF_DUMMY_CHECK_FUNCTOR(LLPointer<LLMaterial>) +DEF_DUMMY_CHECK_FUNCTOR(std::string) +DEF_DUMMY_CHECK_FUNCTOR(std::vector<std::string>) + +bool LLCheckIdenticalFunctor<class LLFace *>::same(class LLFace* const & a, class LLFace* const & b, class LLFace* const & tolerance) \ +{ \ + (void)tolerance; \ + return a == b; \ +} + |
