NAP
Public Types | Public Member Functions | List of all members
InputRouter Class Referenceabstract

#include <inputrouter.h>

Public Types

using EntityList = std::vector< EntityInstance * >
 

Public Member Functions

virtual void routeEvent (const InputEvent &event, const EntityList &entities)=0
 

Description

Base class for routing input events. An input router selects input components from a hierarchy of entities. This class provides an interface to forward input events to input components that belong to one of the entities. Override the routing call to implement custom routing behavior.

Inheritance diagram for InputRouter:
[legend]

Member Typedef Documentation

◆ EntityList

using EntityList = std::vector<EntityInstance*>

Member Function Documentation

◆ routeEvent()

virtual void routeEvent ( const InputEvent event,
const EntityList entities 
)
pure virtual

Forwards an input event to a set of entities.

Parameters
eventThe event to process.
entitiesThe list of entities to process recursively.

Implemented in DefaultInputRouter.