Represents a Collision between two rigid bodies.
More...
#include <physenv.h>
|
| Collision (RigidBody *body0, RigidBody *body1, float impulse) |
| Constructor.
|
|
bool | involves (const std::string &name) const |
| Checks if rigid body with name name is involved in this Collision.
|
|
bool | involves2 (const std::string &nameA, const std::string &nameB) const |
| Checks if this Collision happened between rigid bodies with names nameA and nameB.
|
|
Represents a Collision between two rigid bodies.
◆ Collision()
yourgame::util::Collision::Collision |
( |
RigidBody * |
body0, |
|
|
RigidBody * |
body1, |
|
|
float |
impulse |
|
) |
| |
|
inline |
Constructor.
- Parameters
-
body0 | pointer to rigid body (first collision partner) |
body1 | pointer to rigid body (second collision partner) |
impulse | impulse of the collision |
◆ involves()
bool yourgame::util::Collision::involves |
( |
const std::string & |
name | ) |
const |
|
inline |
Checks if rigid body with name name is involved in this Collision.
- Parameters
-
- Returns
- true if rigid body with name name is involved in this Collision, false otherwise
◆ involves2()
bool yourgame::util::Collision::involves2 |
( |
const std::string & |
nameA, |
|
|
const std::string & |
nameB |
|
) |
| const |
|
inline |
Checks if this Collision happened between rigid bodies with names nameA and nameB.
- Parameters
-
nameA | name of first rigid body |
nameB | name of second rigid body |
- Returns
- true if collision happened between these two, false otherwise
◆ m_body0
RigidBody* yourgame::util::Collision::m_body0 |
◆ m_body1
RigidBody* yourgame::util::Collision::m_body1 |
◆ m_impulse
float yourgame::util::Collision::m_impulse |
The documentation for this class was generated from the following file:
- /code/include/toolbox/yourgame/util/physenv.h