Axmol 3.0.0-89d6d9a
Loading...
Searching...
No Matches
Physics_3d

Classes

class  ContactEvent3D
 Contact information. More...
class  ContactEventListener3D
 Contact listener. More...

Functions

static ContactEventListener3D * create ()
 Create the listener.
bool checkAvailable () override
 Check the listener is available.
ContactEventListener3D * clone () override
 Clone an object from this listener.

Variables

std::function< bool(ContactEvent3D *event)> onContactFilter = [](ContactEvent3D*) { return true; }
 Two shapes are touching during this step.
std::function< void(ContactEvent3D *event)> onCollisionHit
 Two shapes are touching and their collision response has been processed.

Detailed Description

Function Documentation

◆ checkAvailable()

bool checkAvailable ( )
overridevirtual

Check the listener is available.

Returns
True if there's one available callback function at least, false if there's no one.

Implements EventListener.

Variable Documentation

◆ onContactFilter

std::function<bool(ContactEvent3D* event)> onContactFilter = [](ContactEvent3D*) { return true; }

Two shapes are touching during this step.

Return false from the callback to make world ignore the collision this step or true to process it normally.

◆ onCollisionHit

std::function<void(ContactEvent3D* event)> onCollisionHit

Two shapes are touching and their collision response has been processed.

You can retrieve the collision impulse or kinetic energy at this time if you want to use it to calculate sound volumes or damage amounts.