From bb98da5e79bbfc9441740dcccffc651b5df7450a Mon Sep 17 00:00:00 2001 From: scorpioblood <77296181+scorpioblood@users.noreply.github.com> Date: Thu, 23 May 2024 21:41:20 +0200 Subject: [PATCH] Change Engine/src to Engine/Source. --- Engine/{src => Source}/Runtime/Core/Core.h | 0 Engine/{src => Source}/Runtime/Core/Include.h | 0 .../Runtime/Core/private/Logging/Logging.cpp | 0 .../Runtime/Core/private/Math/Matrix4.cpp | 0 .../Runtime/Core/private/Math/Vector4.cpp | 0 .../private/StartingPoint/StartingPoint.cpp | 0 .../Runtime/Core/public/Logging/Logging.h | 0 .../Runtime/Core/public/Math/Boilerplate.h | 0 .../Runtime/Core/public/Math/IntPoint.hpp | 0 .../Runtime/Core/public/Math/IntVector2.hpp | 0 .../Runtime/Core/public/Math/IntVector3.hpp | 0 .../Runtime/Core/public/Math/Line.hpp | 0 .../Core/public/Math/MathAbstractTypes.h | 0 .../Runtime/Core/public/Math/MathCommon.hpp | 0 .../Runtime/Core/public/Math/MathFwd.h | 0 .../Runtime/Core/public/Math/MathPCH.h | 0 .../Core/public/Math/MathTypeConversion.hpp | 0 .../Core/public/Math/MathUnitConversion.hpp | 0 .../Runtime/Core/public/Math/Matrix2.hpp | 0 .../Runtime/Core/public/Math/Matrix3.hpp | 0 .../Runtime/Core/public/Math/Plane.hpp | 0 .../Runtime/Core/public/Math/Point.hpp | 0 .../Runtime/Core/public/Math/README.md | 0 .../Runtime/Core/public/Math/Ray.hpp | 0 .../Core/public/Math/SIMD/PhanesSIMD.h | 0 .../Runtime/Core/public/Math/SIMD/Platform.h | 0 .../Runtime/Core/public/Math/Vector2.hpp | 0 .../Runtime/Core/public/Math/Vector3.hpp | 0 .../Runtime/Core/public/Misc/Boilerplate.h | 0 .../Runtime/Core/public/OSAL/Platform.h | 0 .../Runtime/Core/public/OSAL/PlatformTypes.h | 0 .../Runtime/Core/public/OSAL/README.md | 0 .../Core/public/StartingPoint/EntryPoint.h | 0 .../Core/public/StartingPoint/StartingPoint.h | 0 Engine/{src => Source}/Runtime/Phanes.h | 0 .../Runtime/PhanesEnginePCH.cpp | 0 .../{src => Source}/Runtime/PhanesEnginePCH.h | 0 Engine/{src => Source}/Runtime/REAME.md | 0 .../src/Runtime/Core/public/Math/IntVector4.h | 941 ------------------ 39 files changed, 941 deletions(-) rename Engine/{src => Source}/Runtime/Core/Core.h (100%) rename Engine/{src => Source}/Runtime/Core/Include.h (100%) rename Engine/{src => Source}/Runtime/Core/private/Logging/Logging.cpp (100%) rename Engine/{src => Source}/Runtime/Core/private/Math/Matrix4.cpp (100%) rename Engine/{src => Source}/Runtime/Core/private/Math/Vector4.cpp (100%) rename Engine/{src => Source}/Runtime/Core/private/StartingPoint/StartingPoint.cpp (100%) rename Engine/{src => Source}/Runtime/Core/public/Logging/Logging.h (100%) rename Engine/{src => Source}/Runtime/Core/public/Math/Boilerplate.h (100%) rename Engine/{src => Source}/Runtime/Core/public/Math/IntPoint.hpp (100%) rename Engine/{src => Source}/Runtime/Core/public/Math/IntVector2.hpp (100%) rename Engine/{src => Source}/Runtime/Core/public/Math/IntVector3.hpp (100%) rename Engine/{src => Source}/Runtime/Core/public/Math/Line.hpp (100%) rename Engine/{src => Source}/Runtime/Core/public/Math/MathAbstractTypes.h (100%) rename Engine/{src => Source}/Runtime/Core/public/Math/MathCommon.hpp (100%) rename Engine/{src => Source}/Runtime/Core/public/Math/MathFwd.h (100%) rename Engine/{src => Source}/Runtime/Core/public/Math/MathPCH.h (100%) rename Engine/{src => Source}/Runtime/Core/public/Math/MathTypeConversion.hpp (100%) rename Engine/{src => Source}/Runtime/Core/public/Math/MathUnitConversion.hpp (100%) rename Engine/{src => Source}/Runtime/Core/public/Math/Matrix2.hpp (100%) rename Engine/{src => Source}/Runtime/Core/public/Math/Matrix3.hpp (100%) rename Engine/{src => Source}/Runtime/Core/public/Math/Plane.hpp (100%) rename Engine/{src => Source}/Runtime/Core/public/Math/Point.hpp (100%) rename Engine/{src => Source}/Runtime/Core/public/Math/README.md (100%) rename Engine/{src => Source}/Runtime/Core/public/Math/Ray.hpp (100%) rename Engine/{src => Source}/Runtime/Core/public/Math/SIMD/PhanesSIMD.h (100%) rename Engine/{src => Source}/Runtime/Core/public/Math/SIMD/Platform.h (100%) rename Engine/{src => Source}/Runtime/Core/public/Math/Vector2.hpp (100%) rename Engine/{src => Source}/Runtime/Core/public/Math/Vector3.hpp (100%) rename Engine/{src => Source}/Runtime/Core/public/Misc/Boilerplate.h (100%) rename Engine/{src => Source}/Runtime/Core/public/OSAL/Platform.h (100%) rename Engine/{src => Source}/Runtime/Core/public/OSAL/PlatformTypes.h (100%) rename Engine/{src => Source}/Runtime/Core/public/OSAL/README.md (100%) rename Engine/{src => Source}/Runtime/Core/public/StartingPoint/EntryPoint.h (100%) rename Engine/{src => Source}/Runtime/Core/public/StartingPoint/StartingPoint.h (100%) rename Engine/{src => Source}/Runtime/Phanes.h (100%) rename Engine/{src => Source}/Runtime/PhanesEnginePCH.cpp (100%) rename Engine/{src => Source}/Runtime/PhanesEnginePCH.h (100%) rename Engine/{src => Source}/Runtime/REAME.md (100%) delete mode 100644 Engine/src/Runtime/Core/public/Math/IntVector4.h diff --git a/Engine/src/Runtime/Core/Core.h b/Engine/Source/Runtime/Core/Core.h similarity index 100% rename from Engine/src/Runtime/Core/Core.h rename to Engine/Source/Runtime/Core/Core.h diff --git a/Engine/src/Runtime/Core/Include.h b/Engine/Source/Runtime/Core/Include.h similarity index 100% rename from Engine/src/Runtime/Core/Include.h rename to Engine/Source/Runtime/Core/Include.h diff --git a/Engine/src/Runtime/Core/private/Logging/Logging.cpp b/Engine/Source/Runtime/Core/private/Logging/Logging.cpp similarity index 100% rename from Engine/src/Runtime/Core/private/Logging/Logging.cpp rename to Engine/Source/Runtime/Core/private/Logging/Logging.cpp diff --git a/Engine/src/Runtime/Core/private/Math/Matrix4.cpp b/Engine/Source/Runtime/Core/private/Math/Matrix4.cpp similarity index 100% rename from Engine/src/Runtime/Core/private/Math/Matrix4.cpp rename to Engine/Source/Runtime/Core/private/Math/Matrix4.cpp diff --git a/Engine/src/Runtime/Core/private/Math/Vector4.cpp b/Engine/Source/Runtime/Core/private/Math/Vector4.cpp similarity index 100% rename from Engine/src/Runtime/Core/private/Math/Vector4.cpp rename to Engine/Source/Runtime/Core/private/Math/Vector4.cpp diff --git a/Engine/src/Runtime/Core/private/StartingPoint/StartingPoint.cpp b/Engine/Source/Runtime/Core/private/StartingPoint/StartingPoint.cpp similarity index 100% rename from Engine/src/Runtime/Core/private/StartingPoint/StartingPoint.cpp rename to Engine/Source/Runtime/Core/private/StartingPoint/StartingPoint.cpp diff --git a/Engine/src/Runtime/Core/public/Logging/Logging.h b/Engine/Source/Runtime/Core/public/Logging/Logging.h similarity index 100% rename from Engine/src/Runtime/Core/public/Logging/Logging.h rename to Engine/Source/Runtime/Core/public/Logging/Logging.h diff --git a/Engine/src/Runtime/Core/public/Math/Boilerplate.h b/Engine/Source/Runtime/Core/public/Math/Boilerplate.h similarity index 100% rename from Engine/src/Runtime/Core/public/Math/Boilerplate.h rename to Engine/Source/Runtime/Core/public/Math/Boilerplate.h diff --git a/Engine/src/Runtime/Core/public/Math/IntPoint.hpp b/Engine/Source/Runtime/Core/public/Math/IntPoint.hpp similarity index 100% rename from Engine/src/Runtime/Core/public/Math/IntPoint.hpp rename to Engine/Source/Runtime/Core/public/Math/IntPoint.hpp diff --git a/Engine/src/Runtime/Core/public/Math/IntVector2.hpp b/Engine/Source/Runtime/Core/public/Math/IntVector2.hpp similarity index 100% rename from Engine/src/Runtime/Core/public/Math/IntVector2.hpp rename to Engine/Source/Runtime/Core/public/Math/IntVector2.hpp diff --git a/Engine/src/Runtime/Core/public/Math/IntVector3.hpp b/Engine/Source/Runtime/Core/public/Math/IntVector3.hpp similarity index 100% rename from Engine/src/Runtime/Core/public/Math/IntVector3.hpp rename to Engine/Source/Runtime/Core/public/Math/IntVector3.hpp diff --git a/Engine/src/Runtime/Core/public/Math/Line.hpp b/Engine/Source/Runtime/Core/public/Math/Line.hpp similarity index 100% rename from Engine/src/Runtime/Core/public/Math/Line.hpp rename to Engine/Source/Runtime/Core/public/Math/Line.hpp diff --git a/Engine/src/Runtime/Core/public/Math/MathAbstractTypes.h b/Engine/Source/Runtime/Core/public/Math/MathAbstractTypes.h similarity index 100% rename from Engine/src/Runtime/Core/public/Math/MathAbstractTypes.h rename to Engine/Source/Runtime/Core/public/Math/MathAbstractTypes.h diff --git a/Engine/src/Runtime/Core/public/Math/MathCommon.hpp b/Engine/Source/Runtime/Core/public/Math/MathCommon.hpp similarity index 100% rename from Engine/src/Runtime/Core/public/Math/MathCommon.hpp rename to Engine/Source/Runtime/Core/public/Math/MathCommon.hpp diff --git a/Engine/src/Runtime/Core/public/Math/MathFwd.h b/Engine/Source/Runtime/Core/public/Math/MathFwd.h similarity index 100% rename from Engine/src/Runtime/Core/public/Math/MathFwd.h rename to Engine/Source/Runtime/Core/public/Math/MathFwd.h diff --git a/Engine/src/Runtime/Core/public/Math/MathPCH.h b/Engine/Source/Runtime/Core/public/Math/MathPCH.h similarity index 100% rename from Engine/src/Runtime/Core/public/Math/MathPCH.h rename to Engine/Source/Runtime/Core/public/Math/MathPCH.h diff --git a/Engine/src/Runtime/Core/public/Math/MathTypeConversion.hpp b/Engine/Source/Runtime/Core/public/Math/MathTypeConversion.hpp similarity index 100% rename from Engine/src/Runtime/Core/public/Math/MathTypeConversion.hpp rename to Engine/Source/Runtime/Core/public/Math/MathTypeConversion.hpp diff --git a/Engine/src/Runtime/Core/public/Math/MathUnitConversion.hpp b/Engine/Source/Runtime/Core/public/Math/MathUnitConversion.hpp similarity index 100% rename from Engine/src/Runtime/Core/public/Math/MathUnitConversion.hpp rename to Engine/Source/Runtime/Core/public/Math/MathUnitConversion.hpp diff --git a/Engine/src/Runtime/Core/public/Math/Matrix2.hpp b/Engine/Source/Runtime/Core/public/Math/Matrix2.hpp similarity index 100% rename from Engine/src/Runtime/Core/public/Math/Matrix2.hpp rename to Engine/Source/Runtime/Core/public/Math/Matrix2.hpp diff --git a/Engine/src/Runtime/Core/public/Math/Matrix3.hpp b/Engine/Source/Runtime/Core/public/Math/Matrix3.hpp similarity index 100% rename from Engine/src/Runtime/Core/public/Math/Matrix3.hpp rename to Engine/Source/Runtime/Core/public/Math/Matrix3.hpp diff --git a/Engine/src/Runtime/Core/public/Math/Plane.hpp b/Engine/Source/Runtime/Core/public/Math/Plane.hpp similarity index 100% rename from Engine/src/Runtime/Core/public/Math/Plane.hpp rename to Engine/Source/Runtime/Core/public/Math/Plane.hpp diff --git a/Engine/src/Runtime/Core/public/Math/Point.hpp b/Engine/Source/Runtime/Core/public/Math/Point.hpp similarity index 100% rename from Engine/src/Runtime/Core/public/Math/Point.hpp rename to Engine/Source/Runtime/Core/public/Math/Point.hpp diff --git a/Engine/src/Runtime/Core/public/Math/README.md b/Engine/Source/Runtime/Core/public/Math/README.md similarity index 100% rename from Engine/src/Runtime/Core/public/Math/README.md rename to Engine/Source/Runtime/Core/public/Math/README.md diff --git a/Engine/src/Runtime/Core/public/Math/Ray.hpp b/Engine/Source/Runtime/Core/public/Math/Ray.hpp similarity index 100% rename from Engine/src/Runtime/Core/public/Math/Ray.hpp rename to Engine/Source/Runtime/Core/public/Math/Ray.hpp diff --git a/Engine/src/Runtime/Core/public/Math/SIMD/PhanesSIMD.h b/Engine/Source/Runtime/Core/public/Math/SIMD/PhanesSIMD.h similarity index 100% rename from Engine/src/Runtime/Core/public/Math/SIMD/PhanesSIMD.h rename to Engine/Source/Runtime/Core/public/Math/SIMD/PhanesSIMD.h diff --git a/Engine/src/Runtime/Core/public/Math/SIMD/Platform.h b/Engine/Source/Runtime/Core/public/Math/SIMD/Platform.h similarity index 100% rename from Engine/src/Runtime/Core/public/Math/SIMD/Platform.h rename to Engine/Source/Runtime/Core/public/Math/SIMD/Platform.h diff --git a/Engine/src/Runtime/Core/public/Math/Vector2.hpp b/Engine/Source/Runtime/Core/public/Math/Vector2.hpp similarity index 100% rename from Engine/src/Runtime/Core/public/Math/Vector2.hpp rename to Engine/Source/Runtime/Core/public/Math/Vector2.hpp diff --git a/Engine/src/Runtime/Core/public/Math/Vector3.hpp b/Engine/Source/Runtime/Core/public/Math/Vector3.hpp similarity index 100% rename from Engine/src/Runtime/Core/public/Math/Vector3.hpp rename to Engine/Source/Runtime/Core/public/Math/Vector3.hpp diff --git a/Engine/src/Runtime/Core/public/Misc/Boilerplate.h b/Engine/Source/Runtime/Core/public/Misc/Boilerplate.h similarity index 100% rename from Engine/src/Runtime/Core/public/Misc/Boilerplate.h rename to Engine/Source/Runtime/Core/public/Misc/Boilerplate.h diff --git a/Engine/src/Runtime/Core/public/OSAL/Platform.h b/Engine/Source/Runtime/Core/public/OSAL/Platform.h similarity index 100% rename from Engine/src/Runtime/Core/public/OSAL/Platform.h rename to Engine/Source/Runtime/Core/public/OSAL/Platform.h diff --git a/Engine/src/Runtime/Core/public/OSAL/PlatformTypes.h b/Engine/Source/Runtime/Core/public/OSAL/PlatformTypes.h similarity index 100% rename from Engine/src/Runtime/Core/public/OSAL/PlatformTypes.h rename to Engine/Source/Runtime/Core/public/OSAL/PlatformTypes.h diff --git a/Engine/src/Runtime/Core/public/OSAL/README.md b/Engine/Source/Runtime/Core/public/OSAL/README.md similarity index 100% rename from Engine/src/Runtime/Core/public/OSAL/README.md rename to Engine/Source/Runtime/Core/public/OSAL/README.md diff --git a/Engine/src/Runtime/Core/public/StartingPoint/EntryPoint.h b/Engine/Source/Runtime/Core/public/StartingPoint/EntryPoint.h similarity index 100% rename from Engine/src/Runtime/Core/public/StartingPoint/EntryPoint.h rename to Engine/Source/Runtime/Core/public/StartingPoint/EntryPoint.h diff --git a/Engine/src/Runtime/Core/public/StartingPoint/StartingPoint.h b/Engine/Source/Runtime/Core/public/StartingPoint/StartingPoint.h similarity index 100% rename from Engine/src/Runtime/Core/public/StartingPoint/StartingPoint.h rename to Engine/Source/Runtime/Core/public/StartingPoint/StartingPoint.h diff --git a/Engine/src/Runtime/Phanes.h b/Engine/Source/Runtime/Phanes.h similarity index 100% rename from Engine/src/Runtime/Phanes.h rename to Engine/Source/Runtime/Phanes.h diff --git a/Engine/src/Runtime/PhanesEnginePCH.cpp b/Engine/Source/Runtime/PhanesEnginePCH.cpp similarity index 100% rename from Engine/src/Runtime/PhanesEnginePCH.cpp rename to Engine/Source/Runtime/PhanesEnginePCH.cpp diff --git a/Engine/src/Runtime/PhanesEnginePCH.h b/Engine/Source/Runtime/PhanesEnginePCH.h similarity index 100% rename from Engine/src/Runtime/PhanesEnginePCH.h rename to Engine/Source/Runtime/PhanesEnginePCH.h diff --git a/Engine/src/Runtime/REAME.md b/Engine/Source/Runtime/REAME.md similarity index 100% rename from Engine/src/Runtime/REAME.md rename to Engine/Source/Runtime/REAME.md diff --git a/Engine/src/Runtime/Core/public/Math/IntVector4.h b/Engine/src/Runtime/Core/public/Math/IntVector4.h deleted file mode 100644 index 06b8ccc..0000000 --- a/Engine/src/Runtime/Core/public/Math/IntVector4.h +++ /dev/null @@ -1,941 +0,0 @@ -#pragma once - -#include "Misc/BoilerplateHeader.h" -#include PHANES_CORE_PCH_DEFAULT_PATH - -#include "Math/MathCommon.h" -#include "Math/MathAbstractTypes.h" -#include "Math/MathFwd.h" - - -#ifndef P_DEBUG -#pragma warning(disable : 4244) -#endif - - -#ifndef INTVECTOR4_H -#define INTVECTOR4_H - -namespace phanes::core::math::coretypes { - - /** - * A 4D Vector with components x, y, z and w with integer precision. - */ - - template - struct IntVector4 { - - static_assert(std::is_integral_v(T), "T must be an integer type."); - - public: - - union - { - - struct - { - - /** X component of Vector - * - * @ref [FIELD]components - * - * @note x does not hold the component, but is a reference two the second item in the components array. The varibale exists wholly for convenience. - */ - T x = &components[1]; - - /** Y component of Vector - * - * @ref [FIELD]components - * - * @note y does not hold the component, but is a reference two the second item in the components array. The varibale exists wholly for convenience. - */ - T y = &components[1]; - - /** Z component of Vector - * - * @ref [FIELD]components - * - * @note z does not hold the component, but is a reference two the second item in the components array. The varibale exists wholly for convenience. - */ - T z = &components[2]; - - /** W component of Vector - * - * @ref [FIELD]components - * - * @note w does not hold the component, but is a reference two the second item in the components array. The varibale exists wholly for convenience. - */ - T w = &components[3]; - - }; - - /** Components array holding the data - * - * @ref [FIELD]x - * @ref [FIELD]y - * @ref [FIELD]z - * @ref [FIELD]w - * - * @note Components are split into x, y, z and w. Access and manipulation is possible by these variables. - */ - - T components[4]; - }; - - - public: - - /** - * Default constructor without initialization - */ - - PHANES_CORE_API IntVector4() = default; - - - /** - * Construct Vector from xy components. - * - * @param x X component - * @param y Y component - * @param z Z component - * @param w W component - */ - - PHANES_CORE_API IntVector4(const T x, const T y, const T z, const T w); - - /** - * Construct Vector from two component array. - * - * @param comp Array of components - */ - - PHANES_CORE_API IntVector4(const T comp[4]); - - /** - * Construct Vector from 2D Vector's xy and the last two zero. - * - * @param v 2D IntVector to copy from - */ - - PHANES_CORE_API IntVector4(const Vector2& v); - - /** - * Construct Vector from 3D Vector's xyz and zero. - * - * @param v 3D Vector to copy from - */ - - - PHANES_CORE_API IntVector4(const Vector3& v); - - /** - * Construct Vector from 4D Vector's xyzw. - * - * @param v 4D Vector to copy from - */ - - PHANES_CORE_API IntVector4(const Vector4& v); - - - /** - * Construct Vector from 2D integer Vector's xy and the last two zero. - * - * @param v 3D IntVector to copy from - */ - - PHANES_CORE_API IntVector4(const IntVector2& v); - - /** - * Construct Vector from 4D integer Vector's xyz and zero. - * - * @param v 4D IntVector to copy from - */ - - PHANES_CORE_API IntVector4(const IntVector3& v); - - /** - * Construct Vector from 3D Point's xyzw. - * - * @param v 3D Point to copy from - */ - - PHANES_CORE_API IntVector4(const IntPoint4& v); - - - }; - - - // List of IntVector4 for DoP and ECS - - // List of 4D Vectors using int - using IntVector4List = std::vector >; - - - - // ======================== // - // IntVector4 operators // - // ======================== // - - - - /** - * Addition operation on same IntVector4 (this) by a integer value. - * - * @param a Vector to add to - * @param s integer to add - */ - - template - INLINE PHANES_CORE_API void operator+= (IntVector4& a, T s); - - - /** - * Addition operation on same IntVector4 (this) by a another IntVector4. - * - * @param a Vector to add to - * @param b Vector to add - */ - - template - INLINE PHANES_CORE_API void operator+= (IntVector4& a, const IntVector4& b); - - - /** - * Substraction operation on same IntVector4 (this) by a integer. - * - * @param a Vector to substract from - * @param b integer to substract - */ - - template - INLINE PHANES_CORE_API void operator-= (IntVector4& a, T s); - - - /** - * Substraction operation on same IntVector4 (this) by a another IntVector4. - * - * @param a Vector to substract from - * @param b Vector to substract - */ - - template - INLINE PHANES_CORE_API void operator-= (IntVector4& a, const IntVector4& b); - - - /** - * Multiplication of IntVector4 (this) with a integer. (Scale) - * - * @param a Vector to multiply with - * @param s integer to multiply with - */ - - template - INLINE PHANES_CORE_API void operator*= (IntVector4& a, T s); - - - /** - * Devision of Vector (this) by integer. - * - * @ref [FUNC]DivideTruncV - * @ref [FUNC]DivideFloatV - * - * @param a Vector to multiply with - * @param s integer to divide with - * - * @note Rounds components - */ - - template - INLINE PHANES_CORE_API void operator/= (IntVector4& a, T s); - - - /** - * Componentwise divison of Vector (this) by another vector - * - * @ref [FUNC]DivideTruncV - * @ref [FUNC]DivideFloatV - * - * @param a Vector to multiply with - * @param b Vector to divide with - * - * @note Rounds components - */ - - template - INLINE PHANES_CORE_API void operator/= (IntVector4& a, const IntVector4& b); - - - /** - * Scale of Vector by integer. (> Creates a new IntVector4) - * - * @param a Vector to multiply with - * @param s integer to multiply with - * - * @return Result Vector - */ - - template - INLINE PHANES_CORE_API IntVector4 operator* (const IntVector4& a, T s); - - - /** - * Scale of Vector by integer. (> Creates a new IntVector4) - * - * @param a Vector to multiply with - * @param s integer to multiply with - * - * @return Result Vector - */ - - template - INLINE PHANES_CORE_API IntVector4 operator* (T s, const IntVector4& a); - - - /** - * Dot product between two Vectors. - * - * @ref [FUNC]DotP - * - * @param a Vector one - * @param b Vector two - * - * @result Dot product - */ - - template - INLINE PHANES_CORE_API T operator* (const IntVector4& a, const IntVector4& b); - - - /** - * Division of Vector by integer. (> Creates another IntVector4) - * - * @param a Vector to multiply with - * @param s integer to divide with - * - * @return Result Vector - */ - - template - INLINE PHANES_CORE_API IntVector4 operator/ (const IntVector4& a, T s); - - - /** - * Division of Vector by integer. (> For convenience not arithmethicaly correct. Works like overloaded counterpart.) - * - * @ref [FUNC]DivideTrunc - * @ref [FUNC]DivideFloat - * - * @param a Vector to multiply with - * @param s integer to divide with - * - * @note Rounds components - * - * @return Result Vector - */ - - template - INLINE PHANES_CORE_API IntVector4 operator/ (T s, const IntVector4& a); - - - /** - * Componentwise division of Vector (> For convenience not arithmethicaly correct. Works like overloaded counterpart.) - * - * @ref [FUNC]DivideTrunc - * @ref [FUNC]DivideFloat - * - * @param a Vector to multiply with - * @param s integer to divide with - * - * @note Rounds components - * - * @return Result Vector - */ - - template - INLINE PHANES_CORE_API IntVector4 operator/ (const IntVector4& a, const IntVector4& b); - - - /** - * Componentwise addition of Vector with integer. - * - * @param a Vector to add to - * @param s integer to add - * - * @return Result Vector - */ - - template - INLINE PHANES_CORE_API IntVector4 operator+ (const IntVector4& a, T s); - - - /** - * Componentwise addition of Vector with integer. - * - * @param a Vector to add to - * @param s integer to add - * - * @return Result Vector - */ - - template - INLINE PHANES_CORE_API IntVector4 operator+ (const IntVector4& a, const IntVector4& b); - - - /** - * Componentwise substraction of Vector with integer. - * - * @param a Vector to substract from - * @param s integer to substract - * - * @return Result Vector - */ - - template - INLINE PHANES_CORE_API IntVector4 operator- (const IntVector4& a, T s); - - /** - * Componentwise substraction of Vector with Vector. - * - * @param a Vector to substract from - * @param s integer to substract - * - * @return Result Vector - */ - - template - INLINE PHANES_CORE_API IntVector4 operator- (const IntVector4& a, const IntVector4& b); - - - /** - * Negate Vector. - * - * @param a Vector to negate - */ - - template - INLINE PHANES_CORE_API void operator- (IntVector4& a); - - - /** - * Compare Vector for equality. - * - * @ref [FUNC]Equals - * - * @param a Vector to negate - * - * @return true if equal, false if inequal - */ - - template - INLINE PHANES_CORE_API bool operator== (const IntVector4& a, const IntVector4& b); - - - /** - * Compare Vector for inequality. - * - * @ref [FUNC]Equals - * - * @param a Vector to negate - * - * @return true if inequal, false if equal - */ - - template - INLINE PHANES_CORE_API bool operator!= (const IntVector4& a, const IntVector4& b); - - - // ============================================== // - // IntVector4 static function implementation // - // ============================================== // - - /** - * Magnitude of Vector - * - * @param a Vector - * - * @return Size of Vector - */ - - template - PHANES_CORE_API T Magnitude(const IntVector4& a); - - - /** - * Square of magnitude of Vector - * - * @param a Vector - * - * @return Magnitude without calculating square root - */ - - template - PHANES_CORE_API T SqrMagnitude(const IntVector4& a); - - - /** - * Normalize Vector - * - * @param a Vector - */ - - template - PHANES_CORE_API void NormalizeV(IntVector4& a); - - - /** - * Angle between to Vectors - * - * @param a Vector one - * @param b Vector two - */ - - template - PHANES_CORE_API T Angle(const IntVector4& a, const IntVector4& b); - - - /** - * Dot product of two Vectors - * - * @param a Vector one - * @param b Vector two - */ - - template - PHANES_CORE_API T DotP(const IntVector4& a, const IntVector4& b); - - - /** - * Creates Vector, with component wise largest values. - * - * @param a Vector one - * @param b Vector two - * - * @note Stores new Vector to a - */ - - template - PHANES_CORE_API void MaxV(IntVector4& a, const IntVector4& b); - - - /** - * Creates Vector, with component wise smallest values. - * - * @param a Vector one - * @param b Vector two - * - * @note Stores new Vector to a - */ - - template - PHANES_CORE_API void MinV(IntVector4& a, const IntVector4& b); - - - /** - * Gets perpendicular Vector to a. - * - * @reg NO_RETURN(ReversePerpendicular) - * - * @param a Vector one - * - * @note Stores new Vector to a - */ - - template - PHANES_CORE_API void PerpendicularV(IntVector4& a); - - - /** - * Gets perpendicular Vector to a. - * - * @reg NO_RETURN(Perpendicular) - * - * @param a Vector one - * - * @note Stores new Vector to a - */ - - template - PHANES_CORE_API void ReversePerpendicularV(IntVector4& a); - - - /** - * Component wise multiplication of Vector - * - * @param a Vector one - * @param b Vector two - * - * @note Stores new Vector to a - */ - - template - PHANES_CORE_API void ScaleV(IntVector4& a, const IntVector4& b); - - - /** - * Component wise division of Vector - * - * @param a Vector one - * @param b Vector two - * - * @note Truncates result instead of rounding - * @note Stores new Vector to a - */ - - template - PHANES_CORE_API void DivideTruncV(IntVector4& a, const IntVector4& b); - - - /** - * Component wise division of Vector - * - * @param a Vector one - * @param b Vector two - * - * @note Truncates result instead of rounding - * @note Stores new Vector to a - */ - - template - PHANES_CORE_API void DivideTruncV(IntVector4& a, T s); - - - /** - * Componentwise inversion of Vector - * - * @param a Vector one - * - * @note Stores new Vector to a - */ - - template - PHANES_CORE_API void CompInverseV(IntVector4& a); - - - /** - * Reflect Vector by normal vector. - * - * @param a Vector one - * @param b Vector two - * - * @note Stores new Vector to a - */ - - template - PHANES_CORE_API void ReflectV(IntVector4& a, const IntVector4& normal); - - - /** - * Copies one Vector two another - * - * @param a Vector to copy to - * @param b Vector to copy - */ - - template - PHANES_CORE_API void Set(IntVector4& a, const IntVector4& b); - - - /** - * Sets components of a vector. - * - * @param a Vector to copy to - * @param b Vector to copy - */ - - template - PHANES_CORE_API void Set(IntVector4& a, T x, T y, T z, T w); - - - /** - * Tests if vector is a unity vector. - * - * @param a Vector one - * @param threshold Threshold to one - * - * @return true if unit vector, false if not - */ - - template - PHANES_CORE_API bool IsNormalized(const IntVector4& a, T threshold = P_FLT_INAC); - - /** - * Tests if 2 vectors are perpendicular to each other. - * - * @param a Vector one - * @param b Vector two - * @param threshold Threshold - * - * @return true if perpendicular, false if not - */ - - template - PHANES_CORE_API bool IsPerpendicular(const IntVector4& a, const IntVector4& b, T threshold = P_FLT_INAC); - - - /** - * Tests if 2 vectors are parallel to each other. (Angle is close to zero.) - * - * @param a Vector one - * @param b Vector two - * @param threshold Threshold - * - * @return true if parallel, false if not - */ - - template - PHANES_CORE_API bool IsParallel(const IntVector4& a, const IntVector4& b, T threshold = P_FLT_INAC); - - /** - * Tests if 2 vectors are coincident. (Are parallel and point in the same direction.) - * - * @param a Vector one - * @param b Vector two - * @param threshold Threshold - * - * @return true if coincident, false if not - */ - - template - PHANES_CORE_API bool IsCoincident(const IntVector4& a, const IntVector4& b, T threshold = P_FLT_INAC); - - - /** - * Gets outer product of to vectors. - * - * @param a Vector one - * @param b Vector two - * - * @return Resulting matrix - */ - - template - PHANES_CORE_API Matrix2 OuterProduct(const IntVector4& a, const IntVector4& b); - - - // ================================================================ // - // IntVector4 static function implementation with return values // - // ================================================================ // - - - /** - * Reflects a vector on a normal - * - * @param a Vector one - * @param normal Normal vector - * - * @return Reflected vector - */ - - template - PHANES_CORE_API IntVector4 Reflect(const IntVector4& a, const IntVector4& normal); - - - /** - * Scales a vector component wise - * - * @param a Vector one - * @param b Vector two - * - * @return Reflected vector - */ - - template - PHANES_CORE_API IntVector4 Scale(const IntVector4& a, const IntVector4& b); - - - /** - * Component wise division of Vector - * - * @param a Vector one - * @param b Vector two - * - * @note Truncates result instead of rounding - */ - - template - PHANES_CORE_API IntVector4 DivideTrunc(const IntVector4& a, const IntVector4& b); - - - /** - * Component wise division of Vector - * - * @param a Vector one - * @param b Vector two - * - * @note Truncates result instead of rounding - */ - - template - PHANES_CORE_API IntVector4 DivideTrunc(const IntVector4& a, T s); - - - /** - * Component wise division of Vector - * - * @param a Vector one - * @param b Vector two - * - * @return Floating point vector - */ - - template - PHANES_CORE_API Vector2 DivideFloat(const IntVector4& a, const IntVector4& b); - - - /** - * Component wise division of Vector - * - * @param a Vector one - * @param b Vector two - * - * @return Floating point vector - */ - - template - PHANES_CORE_API Vector2 DivideFloat(const IntVector4& a, T s); - - - /** - * Componentwise inverse of Vector - * - * @param a Vector one - * @param b Vector two - * - * @return Reflected vector - */ - - template - PHANES_CORE_API IntVector4 CompInverse(const IntVector4& a); - - - /** - * Gets the perpendicular vector of a - * - * @param a Vector one - * - * @return Perpendicular vector - */ - - template - PHANES_CORE_API IntVector4 Perpendicular(const IntVector4& a); - - - /** - * Gets reverse of the perpendicular vector of a - * - * @param a Vector one - * - * @return Reversed perpendicular vector - */ - - template - PHANES_CORE_API IntVector4 ReversePerpendicular(const IntVector4& a); - - - /** - * Creates a new Vector by the component wise minimals of both vectors - * - * @param a Vector one - * @param b Vector two - * - * @return Minimal vector - */ - - template - PHANES_CORE_API IntVector4 Min(const IntVector4& a, const IntVector4& b); - - - /** - * Creates a new Vector by the component wise maxima of both vectors - * - * @param a Vector one - * @param b Vector two - * - * @return Maximal vector - */ - - template - PHANES_CORE_API IntVector4 Max(const IntVector4& a, const IntVector4& b); - - - /** - * Creates a normalized instance of the vector - * - * @param a Vector to normalize - * - * @return Unit vector - */ - - template - PHANES_CORE_API IntVector4 Normalize(const IntVector4& a); - - - /** - * Interpolates between to vectors. - * - * @param a Start value (t = 0) - * @param b End value (t = 1) - * @param t Interpolation value - * - * @return Interpolated vector - * - * @note Interpolation is clamped between 0 - 1. - */ - - template - INLINE PHANES_CORE_API IntVector4 Lerp(const IntVector4& a, const IntVector4& b, T t); - - - /** - * Interpolates between to vectors. - * - * @param a Start value (t = 0) - * @param b End value (t = 1) - * @param t Interpolation value - * - * @return Interpolated vector - * - * @note Interpolation is not clamped. - */ - - template - INLINE PHANES_CORE_API IntVector4 LerpUnclamped(const IntVector4& a, const IntVector4& b, T t); - - - /** - * Spherical interpolation between two vectors. - * - * @param a Start value (t = 0) - * @param b End value (t = 1) - * @param t Interpolation value - * - * @return Interpolated vector - * - * @note Interpolation is clamped between 0 - 1. - * @note Quaternion are more efficient and should be used if possible. - */ - - template - PHANES_CORE_API IntVector4 Slerp(const IntVector4& a, const IntVector4& b, T t); - - - /** - * Spherical interpolation between two vectors. - * - * @param a Start value (t = 0) - * @param b End value (t = 1) - * @param t Interpolation value - * - * @return Interpolated vector - * - * @note Interpolation is clamped between 0 - 1. - * @note Quaternion are more efficient and should be used if possible. - */ - - template - PHANES_CORE_API IntVector4 SlerpUnclamped(const IntVector4& a, const IntVector4& b, T t); - -} // phanes::core::math::coretypes - -#endif // !INTVECTOR3_H -