LeiaSR SDK
720218b2 v1.32.7.6322 2025-02-13T14:55:38Z
Stable
simulatedreality-win64-Release
include
sr
sense
display
switchablehint.h
Go to the documentation of this file.
1
5
#pragma once
6
7
#include "
sr/management/srcontext.h
"
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
19
namespace
SR
{
20
29
class
DIMENCOSR_API
SwitchableLensHint
:
public
Sense
{
30
public
:
42
static
SwitchableLensHint
*
create
(
SRContext
&context);
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
SR::SRContext
Maintains WorldObject and Sense objects during the application lifetime.
Definition:
srcontext.h:75
SR::Sense
Class of objects dealing with Streams of data.
Definition:
sense.h:37
SR::SwitchableLensHint
Pure virtual interface for controlling switchable lenses from applications.
Definition:
switchablehint.h:29
SR::SwitchableLensHint::isEnabledByPreference
virtual bool isEnabledByPreference()=0
This function returns true if any of already connected applications enabled the lense,...
SR::SwitchableLensHint::create
static SwitchableLensHint * create(SRContext &context)
Creates a functional SwitchableLensHints instance.
SR::SwitchableLensHint::enable
virtual void enable()=0
Expresses preference to enable the lens such that it affects the light transmitted through it.
SR::SwitchableLensHint::disable
virtual void disable()=0
Expresses preference to disable the lens to minimize the effect on the light transmitted through it.
SR::SwitchableLensHint::isEnabled
virtual bool isEnabled()=0
Checks whether the Lens is currently enabled.
SR::SwitchableLensHint::~SwitchableLensHint
virtual ~SwitchableLensHint()
Virtual destructor.
Definition:
switchablehint.h:47
SR
Namespace containing all C++ Simulated Reality classes.
Definition:
srconfiguration.h:20
srcontext.h
DIMENCOSR_API
#define DIMENCOSR_API
Definition:
switchablehint.h:16
Generated by
1.9.2