Avara3D 0.2.0
C++ API reference
a3d::InputContext Class Referenceabstract

Base interface for Scene input state updated once per Runner host update. More...

#include <a3d/input/InputContext.h>

Inheritance diagram for a3d::InputContext:
[legend]

Classes

struct  UpdateInfo
 Timing information for one input update. More...
 

Public Types

using DidUpdateCallback = std::function< void(InputContext &inputContext, const UpdateInfo &info)>
 Callback invoked after input state has been updated for the current Runner host update. More...
 

Public Member Functions

 InputContext ()
 Creates an InputContext with no did-update callback. More...
 
DidUpdateCallback didUpdateCallback () const
 Returns the callback invoked after each input update. More...
 
void didUpdateCallback (DidUpdateCallback callback)
 Sets the did-update callback; an empty callback disables it. More...
 

Detailed Description

Base interface for Scene input state updated once per Runner host update.

Event polling occurs before the InputContext is updated. The did-update callback runs after the concrete input context has made the current update's state available and before simulation scheduling and rendering continue.

Definition at line 27 of file InputContext.h.

Member Typedef Documentation

◆ DidUpdateCallback

using a3d::InputContext::DidUpdateCallback = std::function<void(InputContext& inputContext, const UpdateInfo& info)>

Callback invoked after input state has been updated for the current Runner host update.

Definition at line 48 of file InputContext.h.

Constructor & Destructor Documentation

◆ InputContext()

a3d::InputContext::InputContext ( )

Creates an InputContext with no did-update callback.

Member Function Documentation

◆ didUpdateCallback() [1/2]

DidUpdateCallback a3d::InputContext::didUpdateCallback ( ) const

Returns the callback invoked after each input update.

◆ didUpdateCallback() [2/2]

void a3d::InputContext::didUpdateCallback ( DidUpdateCallback  callback)

Sets the did-update callback; an empty callback disables it.


The documentation for this class was generated from the following file: