From c6a7e2c7714698e9401d5d12a81266b27babb1bc Mon Sep 17 00:00:00 2001 From: fallenoak Date: Sun, 25 Dec 2022 22:36:29 -0600 Subject: [PATCH] feat(vector): add C3Vector constructor for CImVector --- tempest/vector/C3Vector.hpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tempest/vector/C3Vector.hpp b/tempest/vector/C3Vector.hpp index c66c01f..ea9c34b 100644 --- a/tempest/vector/C3Vector.hpp +++ b/tempest/vector/C3Vector.hpp @@ -1,6 +1,8 @@ #ifndef TEMPEST_VECTOR_C_3VECTOR_HPP #define TEMPEST_VECTOR_C_3VECTOR_HPP +#include "tempest/vector/CImVector.hpp" + class C44Matrix; class C3Vector { @@ -16,6 +18,10 @@ class C3Vector { : x(x) , y(y) , z(z) {}; + C3Vector(const CImVector& color) + : x(color.r / 255.0f) + , y(color.g / 255.0f) + , z(color.b / 255.0f) {}; C3Vector& operator*=(float a); float Mag() const; void Normalize();