feat(vector): add C3Vector constructor for CImVector

This commit is contained in:
fallenoak 2022-12-25 22:36:29 -06:00
parent ad2fe0f0f0
commit c6a7e2c771
No known key found for this signature in database
GPG key ID: 7628F8E61AEA070D

View file

@ -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();