first commit of some basics

This commit is contained in:
2026-01-17 09:13:59 +01:00
parent f9bc556ad9
commit c770c62400
41 changed files with 13610 additions and 0 deletions

45
TSE_Math/src/Mesh.hpp Normal file
View File

@@ -0,0 +1,45 @@
#pragma once
#include <vector>
#include "Types.hpp"
#include "Vector3.hpp"
#include "Vector2.hpp"
namespace TSE
{
class Mesh
{
public:
string name;
std::vector<Vector3> vertecies;
std::vector<ushort> indecies;
std::vector<Vector2> uvs;
/// @brief gives you an empty mesh with the name set to an empty string
Mesh();
/// @brief constructs a mesh with custom parameters
/// @param _name name of the mesh
/// @param _vertecies the vertecies
/// @param _indecies the indecies
/// @param _uvs the uvs
Mesh(string _name,
const std::vector<Vector3>& _vertecies,
const std::vector<ushort>& _indecies,
const std::vector<Vector2>& _uvs);
/// @brief gives you the count of indecies in this mesh
/// @return the indecie count
size_t IndeciesCount() const;
/// @brief gives you the count of vertecies in this mesh
/// @return the vertex count
size_t VerteciesCount() const;
/// @brief generates a circle mesh with the defined amounts of segments
/// @param segments amount of "pizza slices" to make the mesh out of. default 16
/// @return the resulting mesh
static Mesh GetCircleMesh(ushort segments = 16);
/// @brief gives you a basic unit quad with (-0.5, -0.5) -> (0.5, 0.5)
/// @return the resulting mesh
static Mesh GetQuadMesh();
};
} // namespace TSE