DubiousEngine  0.2.0
Simple Game Engine
Dubious::Physics::Minkowski_simplex Class Reference

The Minkowski Simplex used in GJK. More...

#include <Minkowski_simplex.h>

Public Member Functions

 Minkowski_simplex ()
 Default Constructor. More...
 
 Minkowski_simplex (const Minkowski_vector &start)
 Constructor. More...
 
void push_back (const Minkowski_vector &v)
 Add a Minkowski Vector to the simplex. More...
 
std::tuple< bool, Math::Vectorbuild ()
 Find the next point on the simplex. More...
 
const Minkowski_vectorv () const
 accessors More...
 
int size () const
 

Detailed Description

The Minkowski Simplex used in GJK.

The Simplex is the backbone of the GJK algorithm. It is comprised of 2 to 4 points, representing a line, triangle, or tetrahedron.

Constructor & Destructor Documentation

Dubious::Physics::Minkowski_simplex::Minkowski_simplex ( )

Default Constructor.

Dubious::Physics::Minkowski_simplex::Minkowski_simplex ( const Minkowski_vector start)

Constructor.

This creates an invalid simplex with only one point. start - [in] the vector to start with

Member Function Documentation

std::tuple< bool, Math::Vector > Dubious::Physics::Minkowski_simplex::build ( )

Find the next point on the simplex.

This is the bulk of the work of the Simplex. Finds the direction of the next point and corrects the Simplex internally.

Returns
true if there is a hope of collision along with the new direction to search in
void Dubious::Physics::Minkowski_simplex::push_back ( const Minkowski_vector v)

Add a Minkowski Vector to the simplex.

Simply puts the vector into the... vector. The heavy lifting is done in the build function

Parameters
v- [in] the Minkowski Vector to add
int Dubious::Physics::Minkowski_simplex::size ( ) const
inline
const Minkowski_vector* Dubious::Physics::Minkowski_simplex::v ( ) const
inline

accessors


The documentation for this class was generated from the following files: