From 831bc1a9eda12a6f5cad283c2482874f723bb1b0 Mon Sep 17 00:00:00 2001 From: Phillip Stephens Date: Tue, 4 Oct 2022 14:07:00 -0700 Subject: [PATCH] Match and link CUnitVector3f --- configure.py | 1 + obj_files.mk | 2 +- src/Kyoto/Math/CUnitVector3f.cpp | 5 +++++ 3 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 src/Kyoto/Math/CUnitVector3f.cpp diff --git a/configure.py b/configure.py index 3a82ac21..7d37d35b 100755 --- a/configure.py +++ b/configure.py @@ -33,6 +33,7 @@ COMPLETE_OBJECTS = [ "Kyoto/Graphics/CGX", "Kyoto/Particles/CWarp", "Kyoto/Math/CPlane", + "Kyoto/Math/CUnitVector3f", "Kyoto/Math/CVector2f", "Kyoto/Math/CVector2i", "Kyoto/Math/CVector3d", diff --git a/obj_files.mk b/obj_files.mk index 7754702c..6fcf2a12 100644 --- a/obj_files.mk +++ b/obj_files.mk @@ -519,7 +519,7 @@ KYOTO_1 :=\ $(BUILD_DIR)/asm/Kyoto/Math/CQuaternion.o\ $(BUILD_DIR)/src/Kyoto/CRandom16.o\ $(BUILD_DIR)/asm/Kyoto/Math/CTransform4f.o\ - $(BUILD_DIR)/asm/Kyoto/Math/CUnitVector3f.o\ + $(BUILD_DIR)/src/Kyoto/Math/CUnitVector3f.o\ $(BUILD_DIR)/src/Kyoto/Math/CVector2f.o\ $(BUILD_DIR)/src/Kyoto/Math/CVector2i.o\ $(BUILD_DIR)/src/Kyoto/Math/CVector3d.o\ diff --git a/src/Kyoto/Math/CUnitVector3f.cpp b/src/Kyoto/Math/CUnitVector3f.cpp new file mode 100644 index 00000000..9a6cc38f --- /dev/null +++ b/src/Kyoto/Math/CUnitVector3f.cpp @@ -0,0 +1,5 @@ +#include "Kyoto/Math/CUnitVector3f.hpp" + +CUnitVector3f::CUnitVector3f(const CVector3f& vec) +: CVector3f(vec.IsNonZero() ? vec.AsNormalized() : CVector3f::Zero()) { +}