LeiaSR SDK 720218b2 v1.32.7.6322 2025-02-13T14:55:38Z
Stable
switchablehint.h
Go to the documentation of this file.
1
5#pragma once
6
8
9#ifdef WIN32
10# ifdef COMPILING_DLL_SimulatedRealityDisplays
11# define DIMENCOSR_API __declspec(dllexport)
12# else
13# define DIMENCOSR_API __declspec(dllimport)
14# endif
15#else
16# define DIMENCOSR_API
17#endif
18
19namespace SR {
20
30public:
43
47 virtual ~SwitchableLensHint() {};
48
52 virtual void enable() = 0;
53
57 virtual void disable() = 0;
58
64 virtual bool isEnabled() = 0;
65
73 virtual bool isEnabledByPreference() = 0;
74};
75
76}
77
78#undef DIMENCOSR_API
Maintains WorldObject and Sense objects during the application lifetime.
Definition: srcontext.h:75
Class of objects dealing with Streams of data.
Definition: sense.h:37
Pure virtual interface for controlling switchable lenses from applications.
Definition: switchablehint.h:29
virtual bool isEnabledByPreference()=0
This function returns true if any of already connected applications enabled the lense,...
static SwitchableLensHint * create(SRContext &context)
Creates a functional SwitchableLensHints instance.
virtual void enable()=0
Expresses preference to enable the lens such that it affects the light transmitted through it.
virtual void disable()=0
Expresses preference to disable the lens to minimize the effect on the light transmitted through it.
virtual bool isEnabled()=0
Checks whether the Lens is currently enabled.
virtual ~SwitchableLensHint()
Virtual destructor.
Definition: switchablehint.h:47
Namespace containing all C++ Simulated Reality classes.
Definition: srconfiguration.h:20
#define DIMENCOSR_API
Definition: switchablehint.h:16