Implementing ECS SystemBase and updating slang

This commit is contained in:
Dynamitos
2022-11-15 12:19:11 +01:00
parent 05bc31a2b4
commit f635ee2100
106 changed files with 1083 additions and 1675 deletions
+5 -5
View File
@@ -1,25 +1,25 @@
#include "Vector.h"
#include <regex>
using namespace Seele;
using namespace Seele::Math;
std::ostream& Seele::operator<<(std::ostream& stream, const Vector2& vector)
std::ostream& operator<<(std::ostream& stream, const Vector2& vector)
{
stream << "(" << vector.x << ", " << vector.y << ")";
return stream;
}
std::ostream& Seele::operator<<(std::ostream& stream, const Vector& vector)
std::ostream& operator<<(std::ostream& stream, const Vector& vector)
{
stream << "(" << vector.x << ", " << vector.y << ", " << vector.z << ")";
return stream;
}
std::ostream& Seele::operator<<(std::ostream& stream, const Vector4& vector)
std::ostream& operator<<(std::ostream& stream, const Vector4& vector)
{
stream << "(" << vector.x << ", " << vector.y << ", " << vector.z << ", " << vector.w << ")";
return stream;
}
Vector Seele::parseVector(const char* str)
Vector Seele::Math::parseVector(const char* str)
{
//regex pattern consisting of 'float3(xComp, yComp, zComp)', more also matches for invalid floats, but that will throw later
std::regex pattern("float3\\(\\s*([0-9.]+f?)\\s*,\\s*([0-9.]+f?)\\s*,\\s*([0-9.]+f?)\\s*\\)");