Implemented a custom physics engine #316
|
@ -84,21 +84,54 @@ namespace SHADE
|
|||
|
||||
// Sphere VS Convex
|
||||
|
||||
static FaceQuery findClosestFace (const SHSphereCollisionShape& sphere, const SHConvexPolyhedronCollisionShape& polyhedron) noexcept;
|
||||
static int32_t findClosestPoint (const SHSphereCollisionShape& sphere, const SHConvexPolyhedronCollisionShape& polyhedron, int32_t faceIndex) noexcept;
|
||||
static int32_t findVoronoiRegion (const SHSphereCollisionShape& sphere, const SHVec3& faceVertex, const SHVec3& faceNormal, const SHVec3& tangent1, const SHVec3& tangent2) noexcept;
|
||||
static FaceQuery findClosestFace
|
||||
(
|
||||
const SHSphereCollisionShape& sphere
|
||||
, const SHConvexPolyhedronCollisionShape& polyhedron
|
||||
|
||||
static bool isMinkowskiFace(const SHVec3& a, const SHVec3& b, const SHVec3& c, const SHVec3& d) noexcept;
|
||||
) noexcept;
|
||||
|
||||
// TODO: buildMinkowskiFace, queryEdgeDirection, distanceBetweenTwoEdges,
|
||||
static int32_t findClosestPoint
|
||||
(
|
||||
const SHSphereCollisionShape& sphere
|
||||
, const SHConvexPolyhedronCollisionShape& polyhedron
|
||||
, int32_t faceIndex
|
||||
|
||||
) noexcept;
|
||||
|
||||
static int32_t findVoronoiRegion
|
||||
(
|
||||
const SHSphereCollisionShape& sphere
|
||||
, const SHVec3& faceVertex
|
||||
, const SHVec3& faceNormal
|
||||
, const SHVec3& tangent1
|
||||
, const SHVec3& tangent2
|
||||
|
||||
) noexcept;
|
||||
|
||||
// Capsule VS Convex
|
||||
|
||||
// TODO: Capsule VS Convex uses the same gauss map optimisation as convex vs convex
|
||||
|
||||
// Convex VS Convex
|
||||
|
||||
static bool isMinkowskiFace
|
||||
(
|
||||
const SHVec3& a
|
||||
, const SHVec3& b
|
||||
, const SHVec3& c
|
||||
, const SHVec3& d
|
||||
|
||||
) noexcept;
|
||||
|
||||
/*
|
||||
* TODO:
|
||||
* static FaceQuery queryFaceDirections (const SHCollisionShape& A, const SHCollisionShape& B) noexcept;
|
||||
* static EdgeQuery queryEdgeDirections (const SHCollisionShape& A, const SHCollisionShape& B) noexcept;
|
||||
* static bool buildMinkowskiFace (const SHHalfEdge& edgeA, const SHHalfEdge& edgeB) noexcept;
|
||||
* static float distanceBetweenEdges(const SHHalfEdge& edgeA, const SHHalfEdge& edgeB, SHCollisionShape& poly) noexcept;
|
||||
* static uint32_t clip
|
||||
* static FaceQuery queryFaceDirections (const SHConvexPolyhedron& A, const SHConvexPolyhedron& B) noexcept;
|
||||
* static EdgeQuery queryEdgeDirections (const SHConvexPolyhedron& A, const SHConvexPolyhedron& B) noexcept;
|
||||
* static bool buildMinkowskiFace (const SHConvexPolyhedron::HalfEdge& edgeA, const SHConvexPolyhedron::HalfEdge& edgeB) noexcept;
|
||||
* static float distanceBetweenEdges(const SHConvexPolyhedron::HalfEdge& edgeA, const SHConvexPolyhedron::HalfEdge& edgeB, SHConvexPolyhedron& poly) noexcept;
|
||||
* static int32_t findIncidentFace (SHConvexPolyhedron& poly, const SHVec3& normal) noexcept;
|
||||
* static uint32_t clip [sutherland-hodgemann clipping]
|
||||
*
|
||||
* ! References
|
||||
* https://ia801303.us.archive.org/30/items/GDC2013Gregorius/GDC2013-Gregorius.pdf
|
||||
|
|
Loading…
Reference in New Issue