tile2d
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
CollisionManifold Class Reference

Defines the relevant collision information generated by detectNarrowColllision() to both resolve the collision through its normals and impulse. More...

#include <collide.hpp>

Public Member Functions

 CollisionManifold (const CollisionManifold &other)
 
bool isValid () const
 If any members are NaN, normal is not normalized, or the contact count is more then 2, the collision manifold is not valid.
 

Public Attributes

vec2 normal = { Float(0.0), Float(0.0) }
 
Float depth = std::numeric_limits<Float>::max()
 
size_t count = 0
 
std::array< vec2, 2 > points
 
Float staticFriction = Float(1.0)
 
Float dynamicFriction = Float(1.0)
 
Float restitution = Float(0.0)
 

Detailed Description

Defines the relevant collision information generated by detectNarrowColllision() to both resolve the collision through its normals and impulse.

Member Function Documentation

◆ isValid()

bool CollisionManifold::isValid ( ) const
inline

If any members are NaN, normal is not normalized, or the contact count is more then 2, the collision manifold is not valid.

Returns
True if valid

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