Simulated Reality SDK 7500c78d v1.30.2.51085 2024-04-26T11:23:03Z
Stable
screen.h
Go to the documentation of this file.
1
10#pragma once
11
18
19#include <fstream>
20
21#ifdef WIN32
22# ifdef COMPILING_DLL_SimulatedRealityDisplays
23# define DIMENCOSR_API __declspec(dllexport)
24# else
25# define DIMENCOSR_API __declspec(dllimport)
26# endif
27#else
28# define DIMENCOSR_API
29#endif
30
31namespace SR {
32
40 const int resolutionHeight = 1440; // height in pixel count of the resolution that is accepted by the screen
41 const int resolutionWidth = 2560; // width in pixel count of the resolution that is accepted by the screen
42
43 // physical resolution <-> native resolution
44 const int physicalResolutionHeight = 1440; // height in pixel count of the native resolution of the physical screen itself
45 const int physicalResolutionWidth = 2560; // width in pixel count of the native resolution of the physical screen itself
46
47 const float dotPitch_cm = 0.0233f; // Pixel size in cm = dot pitch (why they are the same) 0.00909
48 const float physicalSizeHeight = 40; // height of the screen in cm
49 const float physicalSizeWidth = 70; // width of the screen in cm
50public:
58 static Screen* create(SRContext &context);
59
69 Screen(int resolutionHeight, int resolutionWidth, int physicalResolutionHeight, int physicalResolutionWidth, float pixelSize);
70
77
83 const int getResolutionWidth();
84
91
98
105
111 const float getPhysicalSizeWidth();
112
118 const float getDotPitch();
119};
120
121}
122
123#undef DIMENCOSR_API
Maintains WorldObject and Sense objects during the application lifetime.
Definition: srcontext.h:80
Class of WorldObject representing the screen in real space.
Definition: screen.h:39
const float getPhysicalSizeHeight()
Get the physical height of the screen.
const int getResolutionHeight()
Get the vertical resolution that is accepted by the display.
const float getPhysicalSizeWidth()
Get the physical width of the screen.
Screen(int resolutionHeight, int resolutionWidth, int physicalResolutionHeight, int physicalResolutionWidth, float pixelSize)
Screen Class constructor.
const float getDotPitch()
Get the dot pitch (pixel size)
const int getPhysicalResolutionWidth()
Get the horizontal native resolution of the physical screen itself.
static Screen * create(SRContext &context)
Creates an instance of a Screen class.
const int getPhysicalResolutionHeight()
Get the vertical native resolution of the physical screen itself.
const int getResolutionWidth()
Get the horizontal resolution that is accepted by the display.
Class representing both real and virtual objects as nodes in the World tree.
Definition: worldobject.h:35
Namespace containing all C++ Simulated Reality classes.
Definition: srconfiguration.h:25
#define DIMENCOSR_API
Definition: screen.h:28