summaryrefslogtreecommitdiff
path: root/indra/llmath
diff options
context:
space:
mode:
authorAndrew Meadows <andrew@lindenlab.com>2007-02-07 21:58:58 +0000
committerAndrew Meadows <andrew@lindenlab.com>2007-02-07 21:58:58 +0000
commitf27ef7c31a5128f2fd97b3f4b503a9b040d674f7 (patch)
tree604176c45d6d54cd20fb86b64ebfdb3f6763403a /indra/llmath
parentbd48685d3489e14e709673d79b4516fd980398d8 (diff)
Removed the #ifndef NO_RTTI hack.
Moved the LLSD related methods of LLVector3 to NOT be inline, as per MarkL's suggestion.
Diffstat (limited to 'indra/llmath')
-rw-r--r--indra/llmath/v3math.cpp27
-rw-r--r--indra/llmath/v3math.h43
2 files changed, 35 insertions, 35 deletions
diff --git a/indra/llmath/v3math.cpp b/indra/llmath/v3math.cpp
index f254f4112e..9e6084565e 100644
--- a/indra/llmath/v3math.cpp
+++ b/indra/llmath/v3math.cpp
@@ -179,6 +179,33 @@ LLVector3::LLVector3(const LLVector4 &vec)
mV[VZ] = (F32)vec.mV[VZ];
}
+LLVector3::LLVector3(const LLSD& sd)
+{
+ setValue(sd);
+}
+
+LLSD LLVector3::getValue() const
+{
+ LLSD ret;
+ ret[0] = mV[0];
+ ret[1] = mV[1];
+ ret[2] = mV[2];
+ return ret;
+}
+
+void LLVector3::setValue(const LLSD& sd)
+{
+ mV[0] = (F32) sd[0].asReal();
+ mV[1] = (F32) sd[1].asReal();
+ mV[2] = (F32) sd[2].asReal();
+}
+
+const LLVector3& LLVector3::operator=(const LLSD& sd)
+{
+ setValue(sd);
+ return *this;
+}
+
const LLVector3& operator*=(LLVector3 &a, const LLQuaternion &rot)
{
const F32 rw = - rot.mQ[VX] * a.mV[VX] - rot.mQ[VY] * a.mV[VY] - rot.mQ[VZ] * a.mV[VZ];
diff --git a/indra/llmath/v3math.h b/indra/llmath/v3math.h
index 8949ef0112..72372c07e9 100644
--- a/indra/llmath/v3math.h
+++ b/indra/llmath/v3math.h
@@ -12,11 +12,7 @@
#include "llerror.h"
#include "llmath.h"
-#ifndef NO_RTTI
-// LLSD includes LLString which is incompatible with some other
-// stuff (Havok) that requires -fno-rtti
-# include "llsd.h"
-#endif
+#include "llsd.h"
class LLVector4;
class LLMatrix3;
class LLVector3d;
@@ -45,36 +41,13 @@ class LLVector3
inline explicit LLVector3(const F32 *vec); // Initializes LLVector3 to (vec[0]. vec[1], vec[2])
explicit LLVector3(const LLVector3d &vec); // Initializes LLVector3 to (vec[0]. vec[1], vec[2])
explicit LLVector3(const LLVector4 &vec); // Initializes LLVector4 to (vec[0]. vec[1], vec[2])
-#ifndef NO_RTTI
-// LLSD includes LLString which is incompatible with some other
-// stuff (Havok) that requires -fno-rtti
- LLVector3(const LLSD& sd)
- {
- setValue(sd);
- }
-
- LLSD getValue() const
- {
- LLSD ret;
- ret[0] = mV[0];
- ret[1] = mV[1];
- ret[2] = mV[2];
- return ret;
- }
-
- void setValue(const LLSD& sd)
- {
- mV[0] = (F32) sd[0].asReal();
- mV[1] = (F32) sd[1].asReal();
- mV[2] = (F32) sd[2].asReal();
- }
-
- const LLVector3& operator=(const LLSD& sd)
- {
- setValue(sd);
- return *this;
- }
-#endif
+ LLVector3(const LLSD& sd);
+
+ LLSD getValue() const;
+
+ void setValue(const LLSD& sd);
+
+ const LLVector3& operator=(const LLSD& sd);
inline BOOL isFinite() const; // checks to see if all values of LLVector3 are finite
BOOL clamp(F32 min, F32 max); // Clamps all values to (min,max), returns TRUE if data changed