summaryrefslogtreecommitdiff
path: root/indra/llmath/v4math.h
diff options
context:
space:
mode:
authorRider Linden <rider@lindenlab.com>2017-09-26 09:19:20 -0700
committerRider Linden <rider@lindenlab.com>2017-09-26 09:19:20 -0700
commit0d414c1fb579dffc122c4d021a84cd126c612e54 (patch)
treef6b6ad0b93df9304f7d422e4d63dd32644db2a49 /indra/llmath/v4math.h
parent5d3599f5d155dc112c8f05197c8fc73397084e71 (diff)
Clouds still funky but better.
Diffstat (limited to 'indra/llmath/v4math.h')
-rw-r--r--indra/llmath/v4math.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/indra/llmath/v4math.h b/indra/llmath/v4math.h
index 293005a627..3f6d480ed9 100644
--- a/indra/llmath/v4math.h
+++ b/indra/llmath/v4math.h
@@ -30,6 +30,7 @@
#include "llerror.h"
#include "llmath.h"
#include "v3math.h"
+#include "v2math.h"
class LLMatrix3;
class LLMatrix4;
@@ -46,6 +47,8 @@ class LLVector4
LLVector4(); // Initializes LLVector4 to (0, 0, 0, 1)
explicit LLVector4(const F32 *vec); // Initializes LLVector4 to (vec[0]. vec[1], vec[2], vec[3])
explicit LLVector4(const F64 *vec); // Initialized LLVector4 to ((F32) vec[0], (F32) vec[1], (F32) vec[3], (F32) vec[4]);
+ explicit LLVector4(const LLVector2 &vec);
+ explicit LLVector4(const LLVector2 &vec, F32 z, F32 w);
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);
@@ -185,6 +188,22 @@ inline LLVector4::LLVector4(const F64 *vec)
mV[VW] = (F32) vec[VW];
}
+inline LLVector4::LLVector4(const LLVector2 &vec)
+{
+ mV[VX] = vec[VX];
+ mV[VY] = vec[VY];
+ mV[VZ] = 0.f;
+ mV[VW] = 0.f;
+}
+
+inline LLVector4::LLVector4(const LLVector2 &vec, F32 z, F32 w)
+{
+ mV[VX] = vec[VX];
+ mV[VY] = vec[VY];
+ mV[VZ] = z;
+ mV[VW] = w;
+}
+
inline LLVector4::LLVector4(const LLVector3 &vec)
{
mV[VX] = vec.mV[VX];