CG-Project2
Loading...
Searching...
No Matches
systems::input Namespace Reference

All utilities to manage user input to interact whith meshes. More...

Functions

std::vector< std::pair< unsigned int, std::function< void()> > > getKeysCallback (const unsigned int &id)
 Retrieves all the callback of a mesh to be called when the key is pressed.
void setKeyCallback (const unsigned int &id, const unsigned int &key, std::function< void()> func)
 Sets a callback for the entity.

Detailed Description

All utilities to manage user input to interact whith meshes.

Function Documentation

◆ getKeysCallback()

std::vector< std::pair< unsigned int, std::function< void()> > > systems::input::getKeysCallback ( const unsigned int & id)

Retrieves all the callback of a mesh to be called when the key is pressed.

Parameters
idthe entity id
Returns
a vector of pair like (key, callback) where the key is an unsigned int and the callback is a std::funcion<void()>

◆ setKeyCallback()

void systems::input::setKeyCallback ( const unsigned int & id,
const unsigned int & key,
std::function< void()> func )

Sets a callback for the entity.

Parameters
idthe entity id
keythe key that execute the callback
functhe callback to be executed