Simulated Reality SDK 7500c78d v1.30.2.51085 2024-04-26T11:23:03Z
Stable
Public Member Functions | Static Public Member Functions | List of all members
SR::SwitchableLensHint Class Referenceabstract

Pure virtual interface for controlling switchable lenses from applications. More...

#include <switchablehint.h>

Inheritance diagram for SR::SwitchableLensHint:
[legend]
Collaboration diagram for SR::SwitchableLensHint:
[legend]

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...
 
- Public Member Functions inherited from SR::Sense
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 SwitchableLensHintcreate (SRContext &context)
 Creates a functional SwitchableLensHints instance. More...
 

Additional Inherited Members

- Protected Attributes inherited from SR::Sense
Transformation calibration
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ ~SwitchableLensHint()

virtual SR::SwitchableLensHint::~SwitchableLensHint ( )
inlinevirtual

Virtual destructor.

Member Function Documentation

◆ create()

static SwitchableLensHint * SR::SwitchableLensHint::create ( SRContext context)
static

Creates a functional SwitchableLensHints instance.

Parameters
contextis the environment in which created senses are kept track of
Returns
SwitchableLensHints* which provides access to an available switchable lens controller

◆ disable()

virtual void SR::SwitchableLensHint::disable ( )
pure virtual

Expresses preference to disable the lens to minimize the effect on the light transmitted through it.

◆ enable()

virtual void SR::SwitchableLensHint::enable ( )
pure virtual

Expresses preference to enable the lens such that it affects the light transmitted through it.

◆ isEnabled()

virtual bool SR::SwitchableLensHint::isEnabled ( )
pure virtual

Checks whether the Lens is currently enabled.

Returns
a boolean representing whether the Lens is currently enabled

◆ isEnabledByPreference()

virtual bool SR::SwitchableLensHint::isEnabledByPreference ( )
pure virtual

This function returns true if any of already connected applications enabled the lense, otherwise returns false.

Returns
a boolean representing whether any applications have explicitly indicated that they want the lens to be on.
Exceptions
std::system_errorif mutex lock fails

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