LeiaSR SDK 720218b2 v1.32.7.6322 2025-02-13T14:55:38Z
Stable
|
Pure virtual interface for controlling switchable lenses from applications. More...
#include <switchablehint.h>
Public Member Functions | |
virtual | ~SwitchableLensHint () |
Virtual destructor. More... | |
virtual void | enable ()=0 |
Expresses preference to enable the lens such that it affects the light transmitted through it. More... | |
virtual void | disable ()=0 |
Expresses preference to disable the lens to minimize the effect on the light transmitted through it. More... | |
virtual bool | isEnabled ()=0 |
Checks whether the Lens is currently enabled. More... | |
virtual bool | isEnabledByPreference ()=0 |
This function returns true if any of already connected applications enabled the lense, otherwise returns false. More... | |
![]() | |
void | setCalibration (Transformation calibration) |
Sets a Transformation object to represent the sense's calibration with respect to the display. More... | |
Transformation | getCalibration () |
Gets callibration. More... | |
virtual | ~Sense () |
Ensures the proper destruction of the sense implementation. More... | |
virtual std::string | getName ()=0 |
Return the name of the sense. More... | |
virtual std::string | getDescription ()=0 |
Return a description of the sense. More... | |
virtual void | start ()=0 |
Start continuous updates, default behaviour is defined in the updater() function. More... | |
virtual void | stop ()=0 |
Stop continuous updates. More... | |
Static Public Member Functions | |
static SwitchableLensHint * | create (SRContext &context) |
Creates a functional SwitchableLensHints instance. More... | |
Additional Inherited Members | |
![]() | |
Transformation | calibration |
Pure virtual interface for controlling switchable lenses from applications.
The eventual effect is dependent on all SR applications that are currently running. If there is only one SR application, this interface will provide direct control.
|
inlinevirtual |
Virtual destructor.
|
static |
Creates a functional SwitchableLensHints instance.
Objects created via this method are managed by SR::SRContext and should not be explicitly deleted by the user. Instead, these objects are automatically cleaned up when SR::SRContext is destroyed. Calling delete on such objects directly will result in a crash.
context | is the environment in which created senses are kept track of |
|
pure virtual |
Expresses preference to disable the lens to minimize the effect on the light transmitted through it.
|
pure virtual |
Expresses preference to enable the lens such that it affects the light transmitted through it.
|
pure virtual |
Checks whether the Lens is currently enabled.
|
pure virtual |
This function returns true if any of already connected applications enabled the lense, otherwise returns false.
std::system_error | if mutex lock fails |