summaryrefslogtreecommitdiff
path: root/indra/llmath/v4math.h
diff options
context:
space:
mode:
authorRider Linden <rider@lindenlab.com>2017-09-19 15:50:30 -0700
committerRider Linden <rider@lindenlab.com>2017-09-19 15:50:30 -0700
commitc04ceedbc3e462098eceaa233cd26f6bed79b773 (patch)
treebd4deb87b3c14ba6413cb30ab40d47aae1517b5a /indra/llmath/v4math.h
parent2368c44a8e2b031e5a8ac199923a016915cfe96a (diff)
Baseline for settings changes
Diffstat (limited to 'indra/llmath/v4math.h')
-rw-r--r--indra/llmath/v4math.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/indra/llmath/v4math.h b/indra/llmath/v4math.h
index 623c8b2003..293005a627 100644
--- a/indra/llmath/v4math.h
+++ b/indra/llmath/v4math.h
@@ -48,6 +48,7 @@ class LLVector4
explicit LLVector4(const F64 *vec); // Initialized LLVector4 to ((F32) vec[0], (F32) vec[1], (F32) vec[3], (F32) vec[4]);
explicit LLVector4(const LLVector3 &vec); // Initializes LLVector4 to (vec, 1)
explicit LLVector4(const LLVector3 &vec, F32 w); // Initializes LLVector4 to (vec, w)
+ explicit LLVector4(const LLSD &sd);
LLVector4(F32 x, F32 y, F32 z); // Initializes LLVector4 to (x. y, z, 1)
LLVector4(F32 x, F32 y, F32 z, F32 w);
@@ -61,6 +62,15 @@ class LLVector4
return ret;
}
+ void setValue(const LLSD& sd)
+ {
+ mV[0] = sd[0].asReal();
+ mV[1] = sd[1].asReal();
+ mV[2] = sd[2].asReal();
+ mV[3] = sd[3].asReal();
+ }
+
+
inline BOOL isFinite() const; // checks to see if all values of LLVector3 are finite
inline void clear(); // Clears LLVector4 to (0, 0, 0, 1)
@@ -191,6 +201,11 @@ inline LLVector4::LLVector4(const LLVector3 &vec, F32 w)
mV[VW] = w;
}
+inline LLVector4::LLVector4(const LLSD &sd)
+{
+ setValue(sd);
+}
+
inline BOOL LLVector4::isFinite() const
{