summaryrefslogtreecommitdiff
path: root/indra/llprimitive/llmodel.h
diff options
context:
space:
mode:
authorseth_productengine <none@none>2011-08-08 15:43:00 +0300
committerseth_productengine <none@none>2011-08-08 15:43:00 +0300
commitdf353a6746f6261ac238d29a418962bbab62ec5b (patch)
tree113a11702c5de5fa0e9097f3129927b249aa2781 /indra/llprimitive/llmodel.h
parentef6e51db22ad3aec42b19bcf3e077ff000ba8929 (diff)
parent575c7f85b20fca57fcd97a2a18bd7ad0c030a935 (diff)
Merge with 8582496d7733948e19396167df9b4d2d4cd35f0c
Diffstat (limited to 'indra/llprimitive/llmodel.h')
-rw-r--r--indra/llprimitive/llmodel.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/indra/llprimitive/llmodel.h b/indra/llprimitive/llmodel.h
index 35fdf3f3d6..9a7b9fa271 100644
--- a/indra/llprimitive/llmodel.h
+++ b/indra/llprimitive/llmodel.h
@@ -218,6 +218,19 @@ public:
}
};
+
+ //Are the doubles the same w/in epsilon specified tolerance
+ bool areEqual( double a, double b )
+ {
+ const float epsilon = 1e-5f;
+ return (fabs((a - b)) < epsilon) ? true : false ;
+ }
+ //Make sure that we return false for any values that are within the tolerance for equivalence
+ bool jointPositionalLookup( const LLVector3& a, const LLVector3& b )
+ {
+ return ( areEqual( a[0],b[0]) && areEqual( a[1],b[1] ) && areEqual( a[2],b[2]) ) ? true : false;
+ }
+
//copy of position array for this model -- mPosition[idx].mV[X,Y,Z]
std::vector<LLVector3> mPosition;