chore: Replacing typedef with using.

This commit is contained in:
Thorben Höhne 2025-05-04 21:26:24 +02:00
parent 1213bd3a2d
commit af41821541
Signed by: thoehne
GPG Key ID: 60D202D915B81DEC

View File

@ -13,40 +13,83 @@
# include "Core/Math/SIMD/PhanesSIMDTypes.h" # include "Core/Math/SIMD/PhanesSIMDTypes.h"
/** /**
* Includes forward declarations, as well as certain useful typedefs. * Includes forward declarations, as well as certain useful usings.
* *
* @ref OSAL/PlatformTypes.h * @ref OSAL/PlatformTypes.h
*/ */
namespace Phanes::Core::Math
namespace Phanes::Core::Math { {
/** /**
* Template forward declarations. * Template forward declarations.
*/ */
template<RealType T> struct TColor; template <RealType T>
template<RealType T> struct TLinearColor; struct TColor;
template<RealType T> struct TLine;
template<RealType T> struct TQuaternion; template <RealType T>
template<RealType T> struct TTransform; struct TLinearColor;
template<RealType T> struct TPoint2;
template<RealType T> struct TPoint3; template <RealType T>
template<RealType T> struct TPoint4; struct TLine;
template<IntType T> struct TIntPoint2;
template<IntType T> struct TIntPoint3; template <RealType T>
template<IntType T> struct TIntPoint4; struct TTransform;
template<RealType T> struct TMatrix2;
template<RealType T, bool S> struct TMatrix3; template <RealType T>
template<RealType T, bool S> struct TMatrix4; struct TPoint2;
template<RealType T, bool S> struct TVector2;
template<RealType T, bool S> struct TVector3; template <RealType T>
template<RealType T, bool S> struct TVector4; struct TPoint3;
template<IntType T, bool S> struct TIntVector2;
template<IntType T, bool S> struct TIntVector3; template <RealType T>
template<IntType T, bool S> struct TIntVector4; struct TPoint4;
template<RealType T, bool S> struct TPlane;
template<RealType T, bool S> struct TRay; template <IntType T>
struct TIntPoint2;
template <IntType T>
struct TIntPoint3;
template <IntType T>
struct TIntPoint4;
template <RealType T>
struct TMatrix2;
template <RealType T, bool S>
struct TQuaternion;
template <RealType T, bool S>
struct TMatrix3;
template <RealType T, bool S>
struct TMatrix4;
template <RealType T, bool S>
struct TVector2;
template <RealType T, bool S>
struct TVector3;
template <RealType T, bool S>
struct TVector4;
template <IntType T, bool S>
struct TIntVector2;
template <IntType T, bool S>
struct TIntVector3;
template <IntType T, bool S>
struct TIntVector4;
template <RealType T, bool S>
struct TPlane;
template <RealType T, bool S>
struct TRay;
/** /**
* Specific instantiation of forward declarations. * Specific instantiation of forward declarations.
@ -54,148 +97,142 @@ namespace Phanes::Core::Math {
// TPoint2 // TPoint2
typedef TPoint2<float> Point2; using Point2 = TPoint2<float>;
typedef TPoint2<float> Point2f; using Point2f = TPoint2<float>;
typedef TPoint2<double> Point2d; using Point2d = TPoint2<double>;
// TPoint3 // TPoint3
typedef TPoint3<float> Point3; using Point3 = TPoint3<float>;
typedef TPoint3<float> Point3f; using Point3f = TPoint3<float>;
typedef TPoint3<double> Point3d; using Point3d = TPoint3<double>;
// TPoint4 // TPoint4
typedef TPoint4<float> Point4; using Point4 = TPoint4<float>;
typedef TPoint4<float> Point4f; using Point4f = TPoint4<float>;
typedef TPoint4<double> Point4d; using Point4d = TPoint4<double>;
// TIntPoint2 // TIntPoint2
typedef TIntPoint2<int> IntPoint2; using IntPoint2 = TIntPoint2<int>;
typedef TIntPoint2<int> IntPoint2i; using IntPoint2i = TIntPoint2<int>;
typedef TIntPoint2<long> IntPoint2l; using IntPoint2l = TIntPoint2<long>;
// TIntPoint3 // TIntPoint3
typedef TIntPoint3<int> IntPoint3; using IntPoint3 = TIntPoint3<int>;
typedef TIntPoint3<int> IntPoint3i; using IntPoint3i = TIntPoint3<int>;
typedef TIntPoint3<long> IntPoint3l; using IntPoint3l = TIntPoint3<long>;
// TIntPoint4 // TIntPoint4
typedef TIntPoint4<int> IntPoint4; using IntPoint4 = TIntPoint4<int>;
typedef TIntPoint4<int> IntPoint4i; using IntPoint4i = TIntPoint4<int>;
typedef TIntPoint4<long> IntPoint4l; using IntPoint4l = TIntPoint4<long>;
// IntVetor2 // IntVetor2
typedef TIntVector2<int, false> IntVector2; using IntVector2 = TIntVector2<int, false>;
typedef TIntVector2<int, false> Vector2i; using Vector2i = TIntVector2<int, false>;
typedef TIntVector2<long, false> LongVector2; using LongVector2 = TIntVector2<long, false>;
typedef TIntVector2<long, false> Vector2l; using Vector2l = TIntVector2<long, false>;
// IntVetor3 // IntVetor3
typedef TIntVector3<int, false> IntVector3; using IntVector3 = TIntVector3<int, false>;
typedef TIntVector3<int, false> Vector3i; using Vector3i = TIntVector3<int, false>;
typedef TIntVector3<long, false> LongVector3; using LongVector3 = TIntVector3<long, false>;
typedef TIntVector3<long, false> Vector3l; using Vector3l = TIntVector3<long, false>;
// IntVetor4 // IntVetor4
typedef TIntVector4<int, false> IntVector4; using IntVector4 = TIntVector4<int, false>;
typedef TIntVector4<int, false> Vector4i; using Vector4i = TIntVector4<int, false>;
typedef TIntVector4<long, false> LongVector4; using LongVector4 = TIntVector4<long, false>;
typedef TIntVector4<long, false> Vector4l; using Vector4l = TIntVector4<long, false>;
// Vector2 // Vector2
typedef TVector2<float, false> Vector2; using Vector2 = TVector2<float, false>;
typedef TVector2<float, false> Vector2f; using Vector2f = TVector2<float, false>;
typedef TVector2<double, false> Vector2d; using Vector2d = TVector2<double, false>;
typedef TVector2<double, SIMD::use_simd<double, 2, true>::value> Vector2Regf64;
typedef TVector2<double, SIMD::use_simd<double, 2, true>::value> Vector2Reg;
typedef TVector2<double, SIMD::use_simd<double, 2, true>::value> Vector2Regd;
using Vector2Regf64 = TVector2<double, SIMD::use_simd<double, 2, true>::value>;
using Vector2Reg = TVector2<double, SIMD::use_simd<double, 2, true>::value>;
using Vector2Regd = TVector2<double, SIMD::use_simd<double, 2, true>::value>;
// Vector3 // Vector3
typedef TVector3<float, false> Vector3; using Vector3 = TVector3<float, false>;
typedef TVector3<float, false> Vector3f; using Vector3f = TVector3<float, false>;
typedef TVector3<double, false> Vector3d; using Vector3d = TVector3<double, false>;
typedef TVector3<float, SIMD::use_simd<float, 3, true>::value> Vector3Reg;
typedef TVector3<float, SIMD::use_simd<float, 3, true>::value> Vector3Regf32;
typedef TVector3<double, SIMD::use_simd<double, 3, true>::value> Vector3Regd;
typedef TVector3<double, SIMD::use_simd<double, 3, true>::value> Vector3Regf64;
using Vector3Reg = TVector3<float, SIMD::use_simd<float, 3, true>::value>;
using Vector3Regf32 = TVector3<float, SIMD::use_simd<float, 3, true>::value>;
using Vector3Regd = TVector3<double, SIMD::use_simd<double, 3, true>::value>;
using Vector3Regf64 = TVector3<double, SIMD::use_simd<double, 3, true>::value>;
// Vector4 // Vector4
typedef TVector4<float, false> Vector4; using Vector4 = TVector4<float, false>;
typedef TVector4<float, false> Vector4f; using Vector4f = TVector4<float, false>;
typedef TVector4<double, false> Vector4d; using Vector4d = TVector4<double, false>;
typedef TVector4<float, SIMD::use_simd<float, 4, true>::value> Vector4Reg; using Vector4Reg = TVector4<float, SIMD::use_simd<float, 4, true>::value>;
typedef TVector4<float, SIMD::use_simd<float, 4, true>::value> Vector4Regf32; using Vector4Regf32 = TVector4<float, SIMD::use_simd<float, 4, true>::value>;
typedef TVector4<double, SIMD::use_simd<double, 4, true>::value> Vector4Regd; using Vector4Regd = TVector4<double, SIMD::use_simd<double, 4, true>::value>;
typedef TVector4<double, SIMD::use_simd<double, 4, true>::value> Vector4Regf64; using Vector4Regf64 = TVector4<double, SIMD::use_simd<double, 4, true>::value>;
// Matrix2 // Matrix2
typedef TMatrix2<float> Matrix2; using Matrix2 = TMatrix2<float>;
typedef TMatrix2<float> Matrix2f; using Matrix2f = TMatrix2<float>;
typedef TMatrix2<double> Matrix2d; using Matrix2d = TMatrix2<double>;
// Matrix3 // Matrix3
typedef TMatrix3<float, false> Matrix3; using Matrix3 = TMatrix3<float, false>;
typedef TMatrix3<float, false> Matrix3f; using Matrix3f = TMatrix3<float, false>;
typedef TMatrix3<double, false> Matrix3d; using Matrix3d = TMatrix3<double, false>;
typedef TMatrix3<float, SIMD::use_simd<float, 3, true>::value> Matrix3Reg; using Matrix3Reg = TMatrix3<float, SIMD::use_simd<float, 3, true>::value>;
typedef TMatrix3<float, SIMD::use_simd<float, 3, true>::value> Matrix3Regf; using Matrix3Regf = TMatrix3<float, SIMD::use_simd<float, 3, true>::value>;
typedef TMatrix3<double, SIMD::use_simd<double, 3, true>::value> Matrix3Regd; using Matrix3Regd = TMatrix3<double, SIMD::use_simd<double, 3, true>::value>;
typedef TMatrix3<double, SIMD::use_simd<double, 3, true>::value> Matrix3Regf64; using Matrix3Regf64 = TMatrix3<double, SIMD::use_simd<double, 3, true>::value>;
// Matrix4 // Matrix4
typedef TMatrix4<float, false> Matrix4; using Matrix4 = TMatrix4<float, false>;
typedef TMatrix4<float, false> Matrix4f; using Matrix4f = TMatrix4<float, false>;
typedef TMatrix4<double, false> Matrix4d; using Matrix4d = TMatrix4<double, false>;
typedef TMatrix3<float, SIMD::use_simd<float, 4, true>::value> Matrix4Reg;
typedef TMatrix3<float, SIMD::use_simd<float, 4, true>::value> Matrix4Regf;
typedef TMatrix3<double, SIMD::use_simd<double, 4, true>::value> Matrix4Regd;
typedef TMatrix3<double, SIMD::use_simd<double, 4, true>::value> Matrix4Regf64;
using Matrix4Reg = TMatrix3<float, SIMD::use_simd<float, 4, true>::value>;
using Matrix4Regf = TMatrix3<float, SIMD::use_simd<float, 4, true>::value>;
using Matrix4Regd = TMatrix3<double, SIMD::use_simd<double, 4, true>::value>;
using Matrix4Regf64 = TMatrix3<double, SIMD::use_simd<double, 4, true>::value>;
// TPlane // TPlane
typedef TPlane<float, false> Plane; using Plane = TPlane<float, false>;
typedef TPlane<float, false> Planef; using Planef = TPlane<float, false>;
typedef TPlane<double, false> Planed; using Planed = TPlane<double, false>;
typedef TPlane<float, SIMD::use_simd<float, 4, true>::value> PlaneReg; using PlaneReg = TPlane<float, SIMD::use_simd<float, 4, true>::value>;
typedef TPlane<float, SIMD::use_simd<double, 4, true>::value> PlaneRegd; using PlaneRegd = TPlane<float, SIMD::use_simd<double, 4, true>::value>;
} // namespace Phanes::Core::Math
} // Phanes::Core::Math::coretypes
namespace Phanes::Core::Math::Internal namespace Phanes::Core::Math::Internal
{ {
// Internal types // Internal types
template <typename T, unsigned int D> struct AVector; template <typename T, unsigned int D>
struct AVector;
template <typename T, unsigned int n, unsigned int> struct AMatrix;
}
template <typename T, unsigned int n, unsigned int>
struct AMatrix;
} // namespace Phanes::Core::Math::Internal
#endif // !MATH_FWD_H #endif // !MATH_FWD_H