Stowy Physics Engine 0.1.0
Loading...
Searching...
No Matches
stw::Manifold Struct Reference

#include <Manifold.hpp>

Collaboration diagram for stw::Manifold:

Public Member Functions

 Manifold (const Vector2 &a, const Vector2 &b, const Vector2 &normal, float depth)
 
 Manifold (const Vector2 &normal, float depth)
 
 Manifold ()
 
Manifold Swaped () const
 

Static Public Member Functions

static Manifold Empty ()
 Gets an empty manifold with no collisions.
 

Public Attributes

Vector2 a
 Point a of the manifold.
 
Vector2 b
 Point b of the manifold.
 
Vector2 normal
 The normal of the manifold. Represents the direction in which the collision should be solved.
 
float depth {}
 The depth of the collision. Can be seen as the magnitude of the normal.
 
bool hasCollision {}
 Boolean indicating whether a collision happened.
 

Constructor & Destructor Documentation

◆ Manifold() [1/3]

stw::Manifold::Manifold ( const Vector2 & a,
const Vector2 & b,
const Vector2 & normal,
float depth )

◆ Manifold() [2/3]

stw::Manifold::Manifold ( const Vector2 & normal,
float depth )

◆ Manifold() [3/3]

stw::Manifold::Manifold ( )

Member Function Documentation

◆ Empty()

static Manifold stw::Manifold::Empty ( )
inlinestatic

Gets an empty manifold with no collisions.

Returns
An empty manifold.

◆ Swaped()

Manifold stw::Manifold::Swaped ( ) const

Member Data Documentation

◆ a

Vector2 stw::Manifold::a

Point a of the manifold.

◆ b

Vector2 stw::Manifold::b

Point b of the manifold.

◆ depth

float stw::Manifold::depth {}

The depth of the collision. Can be seen as the magnitude of the normal.

◆ hasCollision

bool stw::Manifold::hasCollision {}

Boolean indicating whether a collision happened.

◆ normal

Vector2 stw::Manifold::normal

The normal of the manifold. Represents the direction in which the collision should be solved.


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