tec::Simulation

#include <simulation.hpp>

Inherits from tec::CommandQueue< Simulation >, tec::EventQueue< KeyboardEvent >, tec::EventQueue< MouseBtnEvent >, tec::EventQueue< MouseMoveEvent >, tec::EventQueue< MouseClickEvent >, tec::EventQueue< ClientCommandsEvent >, tec::EventQueue< ControllerAddedEvent >, tec::EventQueue< ControllerRemovedEvent >, tec::EventQueue< FocusCapturedEvent >, tec::EventQueue< FocusBlurEvent >

Public Functions

Name
Simulation()
~Simulation()
GameState Simulate(const double delta_time, GameState & interpolated_state)
PhysicsSystem & GetPhysicsSystem()
VComputerSystem & GetVComputerSystem()
void AddController(Controller * controller)
void RemoveController(Controller * controller)
virtual void On(eid , std::shared_ptr< KeyboardEvent > data) override
virtual void On(eid , std::shared_ptr< MouseBtnEvent > data) override
virtual void On(eid , std::shared_ptr< MouseMoveEvent > data) override
virtual void On(eid , std::shared_ptr< MouseClickEvent > data) override
virtual void On(eid , std::shared_ptr< ClientCommandsEvent > data) override
virtual void On(eid , std::shared_ptr< ControllerAddedEvent > data) override
virtual void On(eid , std::shared_ptr< ControllerRemovedEvent > data) override
virtual void On(eid , std::shared_ptr< FocusCapturedEvent > data) override
This event is sent to indicate that focus had been captured by an entity it specifies which was captured: keyboard or mouse, if either of these parameters is true, then prevent normal processing of those events a controller implementing this should logically AND NOT these inputs with it's current settings.
virtual void On(eid , std::shared_ptr< FocusBlurEvent > data) override
This event is sent to indicate that focus had been released (blur) from an owning entity it specifies which was blurred: keyboard or mouse, if either of these parameters is true, then restore normal processing of those events a controller implementing this should logically OR these inputs with it's current settings.

Additional inherited members

Public Functions inherited from tec::CommandQueue< Simulation >

Name
CommandQueue()
~CommandQueue()
void ProcessCommandQueue()
void QueueCommand(Command< T > && command)
void QueueCommand(std::function< void(T *)> && command)

Protected Attributes inherited from tec::CommandQueue< Simulation >

Name
std::atomic< std::queue< Command< T > > * > global_command_queue
std::queue< Command< T > > * local_queue

Public Functions inherited from tec::EventQueue< KeyboardEvent >

Name
EventQueue()
EventQueue(eid entity_id)
virtual ~EventQueue()
void ProcessEventQueue()
void QueueEvent(Event< T > && e)

Protected Attributes inherited from tec::EventQueue< KeyboardEvent >

Name
Queue< Event< T > > * read_event_queue
std::atomic< Queue< Event< T > > * > write_event_queue

Public Functions inherited from tec::EventQueue< MouseBtnEvent >

Name
EventQueue()
EventQueue(eid entity_id)
virtual ~EventQueue()
void ProcessEventQueue()
void QueueEvent(Event< T > && e)

Protected Attributes inherited from tec::EventQueue< MouseBtnEvent >

Name
Queue< Event< T > > * read_event_queue
std::atomic< Queue< Event< T > > * > write_event_queue

Public Functions inherited from tec::EventQueue< MouseMoveEvent >

Name
EventQueue()
EventQueue(eid entity_id)
virtual ~EventQueue()
void ProcessEventQueue()
void QueueEvent(Event< T > && e)

Protected Attributes inherited from tec::EventQueue< MouseMoveEvent >

Name
Queue< Event< T > > * read_event_queue
std::atomic< Queue< Event< T > > * > write_event_queue

Public Functions inherited from tec::EventQueue< MouseClickEvent >

Name
EventQueue()
EventQueue(eid entity_id)
virtual ~EventQueue()
void ProcessEventQueue()
void QueueEvent(Event< T > && e)

Protected Attributes inherited from tec::EventQueue< MouseClickEvent >

Name
Queue< Event< T > > * read_event_queue
std::atomic< Queue< Event< T > > * > write_event_queue

Public Functions inherited from tec::EventQueue< ClientCommandsEvent >

Name
EventQueue()
EventQueue(eid entity_id)
virtual ~EventQueue()
void ProcessEventQueue()
void QueueEvent(Event< T > && e)

Protected Attributes inherited from tec::EventQueue< ClientCommandsEvent >

Name
Queue< Event< T > > * read_event_queue
std::atomic< Queue< Event< T > > * > write_event_queue

Public Functions inherited from tec::EventQueue< ControllerAddedEvent >

Name
EventQueue()
EventQueue(eid entity_id)
virtual ~EventQueue()
void ProcessEventQueue()
void QueueEvent(Event< T > && e)

Protected Attributes inherited from tec::EventQueue< ControllerAddedEvent >

Name
Queue< Event< T > > * read_event_queue
std::atomic< Queue< Event< T > > * > write_event_queue

Public Functions inherited from tec::EventQueue< ControllerRemovedEvent >

Name
EventQueue()
EventQueue(eid entity_id)
virtual ~EventQueue()
void ProcessEventQueue()
void QueueEvent(Event< T > && e)

Protected Attributes inherited from tec::EventQueue< ControllerRemovedEvent >

Name
Queue< Event< T > > * read_event_queue
std::atomic< Queue< Event< T > > * > write_event_queue

Public Functions inherited from tec::EventQueue< FocusCapturedEvent >

Name
EventQueue()
EventQueue(eid entity_id)
virtual ~EventQueue()
void ProcessEventQueue()
void QueueEvent(Event< T > && e)

Protected Attributes inherited from tec::EventQueue< FocusCapturedEvent >

Name
Queue< Event< T > > * read_event_queue
std::atomic< Queue< Event< T > > * > write_event_queue

Public Functions inherited from tec::EventQueue< FocusBlurEvent >

Name
EventQueue()
EventQueue(eid entity_id)
virtual ~EventQueue()
void ProcessEventQueue()
void QueueEvent(Event< T > && e)

Protected Attributes inherited from tec::EventQueue< FocusBlurEvent >

Name
Queue< Event< T > > * read_event_queue
std::atomic< Queue< Event< T > > * > write_event_queue

Public Functions Documentation

function Simulation

Simulation()

function ~Simulation

~Simulation()

function Simulate

GameState Simulate(
    const double delta_time,
    GameState & interpolated_state
)

function GetPhysicsSystem

inline PhysicsSystem & GetPhysicsSystem()

function GetVComputerSystem

inline VComputerSystem & GetVComputerSystem()

function AddController

void AddController(
    Controller * controller
)

function RemoveController

void RemoveController(
    Controller * controller
)

function On

virtual void On(
    eid ,
    std::shared_ptr< KeyboardEvent > data
) override

Reimplements: tec::EventQueue::On

function On

virtual void On(
    eid ,
    std::shared_ptr< MouseBtnEvent > data
) override

Reimplements: tec::EventQueue::On

function On

virtual void On(
    eid ,
    std::shared_ptr< MouseMoveEvent > data
) override

Reimplements: tec::EventQueue::On

function On

virtual void On(
    eid ,
    std::shared_ptr< MouseClickEvent > data
) override

Reimplements: tec::EventQueue::On

function On

virtual void On(
    eid ,
    std::shared_ptr< ClientCommandsEvent > data
) override

Reimplements: tec::EventQueue::On

function On

virtual void On(
    eid ,
    std::shared_ptr< ControllerAddedEvent > data
) override

Reimplements: tec::EventQueue::On

function On

virtual void On(
    eid ,
    std::shared_ptr< ControllerRemovedEvent > data
) override

Reimplements: tec::EventQueue::On

function On

virtual void On(
    eid ,
    std::shared_ptr< FocusCapturedEvent > data
) override

This event is sent to indicate that focus had been captured by an entity it specifies which was captured: keyboard or mouse, if either of these parameters is true, then prevent normal processing of those events a controller implementing this should logically AND NOT these inputs with it's current settings.

Reimplements: tec::EventQueue::On

function On

virtual void On(
    eid ,
    std::shared_ptr< FocusBlurEvent > data
) override

This event is sent to indicate that focus had been released (blur) from an owning entity it specifies which was blurred: keyboard or mouse, if either of these parameters is true, then restore normal processing of those events a controller implementing this should logically OR these inputs with it's current settings.

Reimplements: tec::EventQueue::On


Updated on 2022-07-24 at 19:27:35 +0000