summaryrefslogtreecommitdiff
path: root/indra/llmath
diff options
context:
space:
mode:
authorEuclid Linden <euclid@lindenlab.com>2022-06-08 20:46:33 +0000
committerEuclid Linden <euclid@lindenlab.com>2022-06-08 20:46:33 +0000
commit4ee387f971019fe4e2a5fce1578ba77387f1b7e1 (patch)
tree0dd38cb047775a639a9f6df264caf67287f004c7 /indra/llmath
parentd385c73b6e6df968a19a2bb7f0ec1e72bd01e8dc (diff)
parentd3219f57c12ec29025e5c9c68b2cf90d49258672 (diff)
Merged in euclid-gltf-17214 (pull request #1013)
Add tinygltf import library, and partial gltf loader implementation. Approved-by: Brad Kittenbrink
Diffstat (limited to 'indra/llmath')
-rw-r--r--indra/llmath/v4color.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/indra/llmath/v4color.h b/indra/llmath/v4color.h
index 175edf1471..f2863be531 100644
--- a/indra/llmath/v4color.h
+++ b/indra/llmath/v4color.h
@@ -88,7 +88,8 @@ class LLColor4
const LLColor4& set(const LLColor3 &vec); // Sets LLColor4 to LLColor3 vec (no change in alpha)
const LLColor4& set(const LLColor3 &vec, F32 a); // Sets LLColor4 to LLColor3 vec, with alpha specified
const LLColor4& set(const F32 *vec); // Sets LLColor4 to vec
- const LLColor4& set(const LLColor4U& color4u); // Sets LLColor4 to color4u, rescaled.
+ const LLColor4& set(const F64 *vec); // Sets LLColor4 to (double)vec
+ const LLColor4& set(const LLColor4U& color4u); // Sets LLColor4 to color4u, rescaled.
const LLColor4& setAlpha(F32 a);
@@ -334,6 +335,15 @@ inline const LLColor4& LLColor4::set(const F32 *vec)
return (*this);
}
+inline const LLColor4& LLColor4::set(const F64 *vec)
+{
+ mV[VX] = static_cast<F32>(vec[VX]);
+ mV[VY] = static_cast<F32>(vec[VY]);
+ mV[VZ] = static_cast<F32>(vec[VZ]);
+ mV[VW] = static_cast<F32>(vec[VW]);
+ return (*this);
+}
+
// deprecated
inline const LLColor4& LLColor4::setVec(F32 x, F32 y, F32 z)
{