mirror of
https://github.com/orange-cpp/omath.git
synced 2026-02-13 07:03:25 +00:00
fixed uv type
This commit is contained in:
@@ -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; };
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user