Stowy Physics Engine 0.1.0
Loading...
Searching...
No Matches
ManifoldFactory.hpp File Reference

Contains the algo namespace which contains the functions to detect a collision. More...

#include "Collider.hpp"
#include "Manifold.hpp"
#include "Simplex.hpp"
#include "Transform.hpp"
Include dependency graph for ManifoldFactory.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  stw
 
namespace  stw::algo
 Namespace containing all the methods to get manifolds from collisions. This is here to separate the logic from the Collider class. Avoids the problem where we don't know if the circle-box collision resolution should be in the CircleCollider class or the box ColliderClass.
 

Functions

Manifold stw::algo::FindCircleCircleManifold (const CircleCollider *a, const Transform *ta, const CircleCollider *b, const Transform *tb)
 Finds the collision manifold between A and B.
 
Manifold stw::algo::FindCircleBoxManifold (const CircleCollider *a, const Transform *ta, const BoxCollider *b, const Transform *tb)
 Finds the collision manifold between A and B.
 
Manifold stw::algo::FindBoxCircleManifold (const BoxCollider *a, const Transform *ta, const CircleCollider *b, const Transform *tb)
 Finds the collision manifold between A and B.
 
Manifold stw::algo::FindBoxBoxManifold (const BoxCollider *a, const Transform *ta, const BoxCollider *b, const Transform *tb)
 Finds the collision manifold between A and B.
 
Manifold stw::algo::FindAabbAabbManifold (const AabbCollider *a, const Transform *ta, const AabbCollider *b, const Transform *tb)
 Finds the collision manifold between A and B.
 
Manifold stw::algo::FindAabbCircleManifold (const AabbCollider *a, const Transform *ta, const CircleCollider *b, const Transform *tb)
 Finds the collision manifold between A and B.
 
Manifold stw::algo::FindCircleAabbManifold (const CircleCollider *a, const Transform *ta, const AabbCollider *b, const Transform *tb)
 Finds the collision manifold between A and B.
 
Vector2 stw::algo::Support (const Collider *colliderA, const Transform *transformA, const Collider *colliderB, const Transform *transformB, const Vector2 &direction)
 Support function of the GJK algorithm.
 
Manifold stw::algo::Gjk (const Collider *colliderA, const Transform *transformA, const Collider *colliderB, const Transform *transformB)
 Finds the manifold between A and B using GJK.
 
bool stw::algo::NextSimplex (const Simplex &points, Vector2 &direction)
 Finds the next simplex for the GJK algorithm.
 
bool stw::algo::SameDirection (Vector2 direction, Vector2 ao)
 Finds if both vectors are going in the same direction.
 
bool stw::algo::Line (const Simplex &points, Vector2 &direction)
 Line case for the NextSimplex function.
 
bool stw::algo::Triangle (const Simplex &points, Vector2 &direction)
 Triangle case for the NextSimplex function.
 
Manifold stw::algo::Epa (const Simplex &simplex, const Collider *colliderA, const Transform *transformA, const Collider *colliderB, const Transform *transformB)
 Find the manifold from the last simplex of the GJK algorithm.
 
Manifold stw::algo::Sat (const BoxCollider *colliderA, const Transform *transformA, const BoxCollider *colliderB, const Transform *transformB)
 

Detailed Description

Contains the algo namespace which contains the functions to detect a collision.

Author
Fabian Huber (fabia.nosp@m.n.hb.nosp@m.r@pro.nosp@m.tonm.nosp@m.ail.c.nosp@m.h)
Version
1.0
Date
05.07.2022