Files
Re3D/include/Redacted3D/engine/collision.h
2024-08-21 21:07:54 -04:00

22 lines
938 B
C++

#pragma once
#include <Redacted3D/types/vertex.h>
#include <J3ML/Geometry.hpp>
using J3ML::Geometry::AABB;
using J3ML::Geometry::OBB;
using J3ML::Geometry::Frustum;
using J3ML::Geometry::Sphere;
namespace Collision {
///Creates an AABB around a Vertex Array. *SLOW*
AABB genMinimallyEnclosingAABB(const VertexArray* vA);
///Creates an AABB around a Vertex Array using the OBB. *FAST*
AABB genMinimallyEnclosingAABB(const VertexArray* vA, const Vector3& rotation);
///Creates a minimally enclosing sphere around a VertexArray using the cached OBB *FAST*
Sphere genMinimallyEnclosingSphere(const VertexArray* vA);
///Creates an OBB around a VertexArray. Should ideally only be used when loading. *SLOW*
OBB genMinimallyEnclosingOBB(const VertexArray* vA, const Vector3& rotation);
///Returns a renderable version of the collider for debug reasons.
VertexArray getDrawable(const Shape& collider);
}