fixed uv type

This commit is contained in:
2025-12-01 05:03:43 +03:00
parent 6414922884
commit 1aff083ef3
3 changed files with 15 additions and 14 deletions

View File

@@ -11,13 +11,14 @@
namespace omath::primitives
{
template<class T = Vector3<float>>
template<class VecType = Vector3<float>, class UvT = Vector2<float>>
struct Vertex final
{
using VectorType = T;
using VectorType = VecType;
using UvType = UvT;
VectorType position;
VectorType normal;
VectorType uv;
UvType uv;
};
template<typename T> concept HasPosition = requires(T vertex) { vertex.position; };

View File

@@ -24,7 +24,7 @@ namespace omath::collision
class Epa final
{
public:
using VectorType = typename ColliderType::VectorType;
using VectorType = ColliderType::VectorType;
static_assert(EpaVector<VectorType>, "VertexType must satisfy EpaVector concept");
struct Result final
@@ -45,8 +45,8 @@ namespace omath::collision
// Precondition: simplex.size()==4 and contains the origin.
[[nodiscard]]
static std::optional<Result> solve(const ColliderType& a, const ColliderType& b, const Simplex<VectorType>& simplex,
const Params params = {})
static std::optional<Result> solve(const ColliderType& a, const ColliderType& b,
const Simplex<VectorType>& simplex, const Params params = {})
{
// --- Build initial polytope from simplex (4 points) ---
std::vector<VectorType> vertexes;