Class atlas::physics::jolt_collision_manager
ClassList > atlas > physics > jolt_collision_manager
This allows users to make thier own version of jolt collition and run them their own way. It allows users to interact with the calls by creating a child class of jolt_collision and run whatever action they want.
#include <jolt_collision_manager.hpp>
Public Functions
Type | Name |
---|---|
jolt_collision_manager () = default |
|
void | run_collision_added (uint64_t p_id, contact_event & p_event) Connects an entity to a defualt or user defined jolt_collision . Runs the functions ofjolt_collision passing the arguments for the user to utilize. |
Public Static Functions
Type | Name |
---|---|
scope< jolt_collision_manager > | initialize (const std::string & p_tag) Creates all the neccessary starting components for collisions to begin working. Is utilized by the physics engine to run user defined collisions in a simple way. |
void | subscribe_action (uint64_t p_id, jolt_collision & p_collision_action) FIXME: These need to be implemented along with all other persisted and removed events. |
Public Functions Documentation
function jolt_collision_manager
atlas::physics::jolt_collision_manager::jolt_collision_manager () = default
function run_collision_added
Connects an entity to a defualt or user defined jolt_collision . Runs the functions ofjolt_collision passing the arguments for the user to utilize.
void atlas::physics::jolt_collision_manager::run_collision_added (
uint64_t p_id,
contact_event & p_event
)
Parameters:
p_id
Generally a way to connect the id of a flecs::entity_t to a specified jolt_collisionp_event
Describes the collision that took place
Public Static Functions Documentation
function initialize
Creates all the neccessary starting components for collisions to begin working. Is utilized by the physics engine to run user defined collisions in a simple way.
static scope< jolt_collision_manager > atlas::physics::jolt_collision_manager::initialize (
const std::string & p_tag
)
Parameters:
p_tag
Creates a tag for the collision manager so debugging later will be simplied. Specifically when there are more then one scenes in the game world at once.
Returns:
scope<jolt_collision_manager> is the way the engine can run the non-statics collision functions.
function subscribe_action
FIXME: These need to be implemented along with all other persisted and removed events.
static void atlas::physics::jolt_collision_manager::subscribe_action (
uint64_t p_id,
jolt_collision & p_collision_action
)
Allows the user to subscribe their own collision_handlers to the map and connecting those handlers to entities that they define.
Parameters:
p_id
Used to connect an entity to a collision instance.p_collision_action
The collision handler to create actions based on the collision given.
Todo
We need to subscribe action. This might be fixed when we have events to take and subcribes their user actions with. Or this could be done like the other subscribes that exsist.
The documentation for this class was generated from the following file TheAtlasEngine/atlas/physics/jolt-cpp/jolt_collision_manager.hpp