Simulated Reality SDK 7500c78d v1.30.2.51085 2024-04-26T11:23:03Z
Stable
Classes | Typedefs | Enumerations | Functions
SR Namespace Reference

Namespace containing all C++ Simulated Reality classes. More...

Classes

class  ApplicationSense
 Sense class which shares information about SR Applications throughout the SR system and to applications. More...
 
class  Camera
 Class of Sense dealing with video data. More...
 
class  CameraController
 Interface defining camera functions to control sensor parameters. More...
 
class  CameraControllerUnavailableException
 Class of Exception which indicates the CameraController can not be used at this point in time. More...
 
class  Configuration
 Class representing the configuration of the SRContext. More...
 
struct  DDCCISettings
 Holds all data required to set the DDC/CI settings of the display. More...
 
class  DeviceNotAvailableException
 Class of exception which indicates that a hardware device was not available for use in the SR system. More...
 
class  Display
 Class of WorldObject representing the SR display in real space. More...
 
class  DX10Weaver
 
class  DX10WeaverBase
 
class  DX11Weaver
 
class  DX11WeaverBase
 
class  DX12Weaver
 
class  DX12WeaverBase
 
class  DX9Weaver
 
class  DX9WeaverBase
 
class  DXWeaver
 
union  EdidData
 
class  Exception
 Class of exception which indicates a general SR logic error. More...
 
class  EyePairListener
 Interface for listening to SR_eyePair updates. More...
 
class  EyePairStream
 Stream of SR_eyePair objects. More...
 
class  EyeTracker
 Sense class which provides face tracking functionality to the SR system. More...
 
class  GestureAnalyser
 Sense class which provides gesture analysis functionality to the SR system. More...
 
class  GestureBuffer
 Class of Buffer<SR_gesture> managing instances of SR_gesture in real-time. More...
 
class  GestureListener
 Interface for listening to SR_gesture updates. More...
 
class  GestureStream
 Stream of SR_gesture objects. More...
 
class  GLWeaver
 
class  GLWeaverBase
 class to be used to add Weaving to OpenGL based SR applications More...
 
class  HandEventListener
 Interface for listening to SR_handEvent updates. More...
 
class  HandEventStream
 Stream of SR_handEvent objects. More...
 
class  HandPoseListener
 Interface for listening to SR_handPose updates. More...
 
class  HandPoseStream
 Stream of SR_handPose objects. More...
 
class  HandTracker
 Sense class which provides hand tracking functionality to the SR system. More...
 
class  HeadListener
 Interface for listening to SR_head updates This interface is supported from Eye Tracker version 1.5.4. More...
 
class  HeadPoseListener
 Interface for listening to SR_headPose updates This interface is supported from Eye Tracker version 1.5.4. More...
 
class  HeadPoseStream
 Stream of SR_headPose objects. More...
 
class  HeadPoseTracker
 Sense class which provides head pose tracking functionality to the SR system. More...
 
class  HeadStream
 Stream of SR_head objects. More...
 
class  HeadTracker
 Sense class which provides face tracking functionality to the SR system. More...
 
class  InputStream
 Template class to wrap data stream to a listener object. More...
 
class  Log
 Class with static logging functionality. More...
 
struct  MonitorData
 
class  NetworkInterface
 Interface defining how to send messages between SR applications. More...
 
class  PredictingDX10Weaver
 
class  PredictingDX11Weaver
 
class  PredictingDX12Weaver
 
class  PredictingDX9Weaver
 
class  PredictingEyeTracker
 Sense class which provides predictive eye tracking functionality. More...
 
class  PredictingGLWeaver
 
class  PredictingWeaverTracker
 Sense class which provides predictive weaver position tracking functionality. More...
 
class  Receiver
 Interface to be used to enable receiving SR_packet from other SR applications. More...
 
struct  Resolution
 
class  Screen
 Class of WorldObject representing the screen in real space. More...
 
class  Sense
 Class of objects dealing with Streams of data. More...
 
class  SenseConfiguration
 Class representing the configuration of a single Sense in the SRContext. More...
 
class  ServerNotAvailableException
 Class of Exception which indicates that a SR Service was not available to connect with. More...
 
class  SRContext
 Maintains WorldObject and Sense objects during the application lifetime. More...
 
class  SwitchableLensHint
 Pure virtual interface for controlling switchable lenses from applications. More...
 
class  SystemEvent
 Class containing dynamic-length event messages. More...
 
class  SystemEventListener
 Interface for listening to SR_systemEvent updates. More...
 
class  SystemEventStream
 Stream of SR_systemEvent objects. More...
 
class  SystemSense
 Sense class which shares information about the SR system throughout the SR system and to applications. More...
 
class  Transformation
 Class of objects defining the relation between different coordinate systems. More...
 
class  UniqueCameraController
 Non-copyable class of CameraController interface that can only be constructed once per Camera (Camera::Descriptor) More...
 
class  VideoFrame
 Class containing an image recorded by a Camera. More...
 
class  VideoListener
 Interface for listening to SR_videoFrame updates. More...
 
class  VideoStream
 Stream of SR_videoFrame objects. More...
 
class  WeaverPositionListener
 Interface for listening to SR_weaverPosition updates. More...
 
class  WeaverPositionStream
 Stream of SR_weaverPosition objects. More...
 
class  WeaverTracker
 Sense class which provides weave tracking functionality to the SR system. More...
 
class  Window
 Interface class to represent the application window in the SR system. More...
 
class  WorldObject
 Class representing both real and virtual objects as nodes in the World tree. More...
 

Typedefs

typedef Camera *() CameraCreateImplementationFunction(SRContext &, SR_cameraDescriptor)
 
typedef UniqueCameraController() CameraControlFunction(Camera *)
 Type of function used for gaining control of camera sensor parameters. More...
 

Enumerations

enum  Verbosity : int { HighVerbosity = 0 , MediumVerbosity = 1 , LowVerbosity = 2 , NoLogging = 3 }
 Verbosity level enumeration. More...
 

Functions

DIMENCOSR_API std::vector< CameraListFunction * > & cameraListImplementationFunctions ()
 Vector of functions to list camera descriptors of a specific type. More...
 
DIMENCOSR_API std::map< std::string, CameraCreateImplementationFunction * > & cameraCreateImplementationFunctions ()
 Map of camera type to functions to create cameras of that type. More...
 
DIMENCOSR_API std::map< std::string, CameraControlFunction * > & cameraControlFunctions ()
 Map of camera type to functions to create cameras of that type. More...
 
DIMENCOSR_API bool isProductCodeSupported (std::string productCode)
 checks if the given productCode is supported More...
 
DIMENCOSR_API bool getNativeResolution (const LUID adapterLuid, const UINT32 targetId, DISPLAYCONFIG_TARGET_PREFERRED_MODE &PreferredMode)
 Gets preferred or recommended resolutions of the monitor. More...
 
DIMENCOSR_API HRESULT GetPathInfo (HMONITOR hMonitor, _Out_ DISPLAYCONFIG_PATH_INFO *pPathInfo)
 Gets path of the given monitor handler. More...
 
DIMENCOSR_API bool getDisplayResolution (LPCSTR deviceName, int &height, int &width)
 Get display resolution of the given monitor. More...
 
DIMENCOSR_API bool getMonitorList (std::vector< MonitorData > &monitors)
 Gets all active monitor handles and EDID information. More...
 
DIMENCOSR_API bool getEdidData (const HKEY &hDevRegKey, EdidData &edid)
 Gets edid data given a key from the registry and parses the data. More...
 
DIMENCOSR_API void logSrMonitor (MonitorData data, bool srDisplay)
 logs the virtual rectangle, virtual position and the srDisplay boolean More...
 
DIMENCOSR_API void printMonitorList (std::vector< MonitorData > monitors)
 logs all members for a given list of MonitorData More...
 
DIMENCOSR_API bool getKnownMonitors (const std::vector< MonitorData > &monitors, std::vector< MonitorData > &knownMonitors)
 Gets a list of SR displays from a list of displays. Clears knownMonitors and appends SR monitors found in monitors. More...
 
DIMENCOSR_API bool getDDCCISupportedMonitors (const std::vector< MonitorData > &monitors, std::vector< DDCCISettings > &DDCCISupportedMonitors)
 gets a list of SR displays that support DDC/CI. Clears DDCCISupportedMonitors and appends the DDC/CI settings of SR displays known to support DDC/CI. More...
 
DIMENCOSR_API bool disableAttachDetachNotifications ()
 returns true if attach/detach notifications should be disabled for the currently attached monitors. This function assumes only one SR device is attached at a time, it uses the list disableAttachDetachNotificationsByProductCode which should only contain laptop product codes. This function only verifies an SR device by EDID, so it is assumed any SR device will have an EDID that it does not share with non-SR devices. Because it can only verify an SR device by EDID it will only disable notifications related to FPC attach/detach and not monitor attach/detach. Which are events that should not happen for a laptop. More...
 
DIMENCOSR_API bool matchProductId (const std::string productCode, const MonitorData &monitorData)
 Check expected EDID productId for a given product code. More...
 
DIMENCOSR_API void addPreferredResolution (std::vector< MonitorData > &externalMonitors)
 add preferred resolution of the given monitors More...
 
DIMENCOSR_API void addCloneStatus (std::vector< MonitorData > &externalMonitors)
 add clone or duplicate status of connected monitors More...
 
DIMENCOSR_API bool monitorEquals (const SR::MonitorData &monitorA, const SR::MonitorData &monitorB)
 Compare two given monitors and see if they are the equal based on the EDID data in MonitorData. More...
 
DIMENCOSR_API bool monitorConfigurationEquals (const SR::MonitorData &monitorA, const SR::MonitorData &monitorB)
 Compare two given monitors and see if they are the equal based on the resolution and duplication values. Specifically, the rectangle, isDuplicated, and displayResolution members are compared. More...
 
DIMENCOSR_API bool hasNonNativeResolution (const SR::MonitorData &monitor)
 Compare the displayResolution and the nativeResolution of the given monitor. More...
 
DIMENCOSR_API std::vector< RECT > getMonitorRectangles (const std::vector< MonitorData > &monitors)
 Extract RECT rectangles from a list of MonitorData monitors. More...
 
DIMENCOSR_API void waitForChangeMonitorRectangles (std::vector< RECT > &monitorRectangles, unsigned int timeBetweenChecks, bool &active)
 Updates monitorRectangles with the rectangles of the monitors currently returned by getMonitorList() and blocks until this list has changed (as a set) More...
 
DIMENCOSR_API double getMonitorRefreshRate (HMONITOR monitorHandle)
 Return the refresh rate in hertz of the monitor that is represented by the given monitorHandle If the monitor handle is invalid or the refresh rate could otherwise not be retrieved a default value of 60 will be returned. More...
 

Detailed Description

Namespace containing all C++ Simulated Reality classes.

class for backwards compatibility of Weaving in DirectX 11 based SR applications

class to be used to add Weaving to DirectX 9 based SR applications

class to be used to add Weaving to DirectX 12 based SR applications

class to be used to add Weaving to DirectX 11 based SR applications

class to be used to add Weaving to DirectX 10 based SR applications

Copyright (C) 2022 Dimenco

This software has been provided under the Dimenco EULA. (End User License Agreement) You can find the agreement at https://www.dimenco.eu/eula

This source code is considered Protected Code under the definitions of the EULA.

Typedef Documentation

◆ CameraControlFunction

typedef UniqueCameraController() SR::CameraControlFunction(Camera *)

Type of function used for gaining control of camera sensor parameters.

◆ CameraCreateImplementationFunction

typedef Camera *() SR::CameraCreateImplementationFunction(SRContext &, SR_cameraDescriptor)

Type of function used to create a Camera implementation using a SR_cameraDescriptor and registering it to the SRContext

Enumeration Type Documentation

◆ Verbosity

enum SR::Verbosity : int

Verbosity level enumeration.

Enumerator
HighVerbosity 
MediumVerbosity 
LowVerbosity 
NoLogging 

Function Documentation

◆ addCloneStatus()

DIMENCOSR_API void SR::addCloneStatus ( std::vector< MonitorData > &  externalMonitors)

add clone or duplicate status of connected monitors

Parameters
externalMonitorslist of connected monitors which clone status will be added

◆ addPreferredResolution()

DIMENCOSR_API void SR::addPreferredResolution ( std::vector< MonitorData > &  externalMonitors)

add preferred resolution of the given monitors

Parameters
externalMonitorslist of connected monitors which preferred resolution would be added

◆ cameraControlFunctions()

DIMENCOSR_API std::map< std::string, CameraControlFunction * > & SR::cameraControlFunctions ( )

Map of camera type to functions to create cameras of that type.

Construct On First Use Idiom

Returns
Reference to a static std::map<std::string, CameraCreateImplementationFunction*>

◆ cameraCreateImplementationFunctions()

DIMENCOSR_API std::map< std::string, CameraCreateImplementationFunction * > & SR::cameraCreateImplementationFunctions ( )

Map of camera type to functions to create cameras of that type.

Construct On First Use Idiom

Returns
Reference to a static std::map<std::string, CameraCreateImplementationFunction*>

◆ cameraListImplementationFunctions()

DIMENCOSR_API std::vector< CameraListFunction * > & SR::cameraListImplementationFunctions ( )

Vector of functions to list camera descriptors of a specific type.

Construct On First Use Idiom3

Returns
Reference to a static std::vector<CameraListFunction*>

◆ disableAttachDetachNotifications()

DIMENCOSR_API bool SR::disableAttachDetachNotifications ( )

returns true if attach/detach notifications should be disabled for the currently attached monitors. This function assumes only one SR device is attached at a time, it uses the list disableAttachDetachNotificationsByProductCode which should only contain laptop product codes. This function only verifies an SR device by EDID, so it is assumed any SR device will have an EDID that it does not share with non-SR devices. Because it can only verify an SR device by EDID it will only disable notifications related to FPC attach/detach and not monitor attach/detach. Which are events that should not happen for a laptop.

Returns
true if attach/detach notifications should be disabled

◆ getDDCCISupportedMonitors()

DIMENCOSR_API bool SR::getDDCCISupportedMonitors ( const std::vector< MonitorData > &  monitors,
std::vector< DDCCISettings > &  DDCCISupportedMonitors 
)

gets a list of SR displays that support DDC/CI. Clears DDCCISupportedMonitors and appends the DDC/CI settings of SR displays known to support DDC/CI.

Parameters
[in]monitorsA list of active monitors
[out]DDCCISupportedMonitorsA list of SR displays known to support DDC/CI with their desired settings
Returns
true if one or more SR displays are found that support DDC/CI, otherwise false

◆ getDisplayResolution()

DIMENCOSR_API bool SR::getDisplayResolution ( LPCSTR  deviceName,
int &  height,
int &  width 
)

Get display resolution of the given monitor.

Parameters
[in]deviceNamename of the monitor
[out]heightmonitor's height set in display resolution
[out]widthmonitor's width set in display resolution

◆ getEdidData()

DIMENCOSR_API bool SR::getEdidData ( const HKEY &  hDevRegKey,
EdidData edid 
)

Gets edid data given a key from the registry and parses the data.

Parameters
hDevRegKeyWindows registry key. Assumed it is valid.
EdidDataA valid EdidData struct

TODO Parse the data TODO clean code

◆ getKnownMonitors()

DIMENCOSR_API bool SR::getKnownMonitors ( const std::vector< MonitorData > &  monitors,
std::vector< MonitorData > &  knownMonitors 
)

Gets a list of SR displays from a list of displays. Clears knownMonitors and appends SR monitors found in monitors.

Parameters
[in]monitorsA list of active monitors
[out]knownMonitorsA list of monitors known to be SR monitors
Returns
true if one or more SR displays are found, otherwise false

◆ getMonitorList()

DIMENCOSR_API bool SR::getMonitorList ( std::vector< MonitorData > &  monitors)

Gets all active monitor handles and EDID information.

Parameters
monitorsvector containing MonitorData structs

return true if found displays, otherwise false

◆ getMonitorRectangles()

DIMENCOSR_API std::vector< RECT > SR::getMonitorRectangles ( const std::vector< MonitorData > &  monitors)

Extract RECT rectangles from a list of MonitorData monitors.

◆ getMonitorRefreshRate()

DIMENCOSR_API double SR::getMonitorRefreshRate ( HMONITOR  monitorHandle)

Return the refresh rate in hertz of the monitor that is represented by the given monitorHandle If the monitor handle is invalid or the refresh rate could otherwise not be retrieved a default value of 60 will be returned.

Parameters
monitorHandleis a HMONITOR monitor handle
Returns
The refresh rate in hertz of the monitorHandle provided.

◆ getNativeResolution()

DIMENCOSR_API bool SR::getNativeResolution ( const LUID  adapterLuid,
const UINT32  targetId,
DISPLAYCONFIG_TARGET_PREFERRED_MODE &  PreferredMode 
)

Gets preferred or recommended resolutions of the monitor.

Parameters
adapterLuidadpater luid of the target monitor
targetIdid of the monitor which resolution will be selected
PreferredModeresolution of the target monitor will be added here
Returns
true if getting the configuration is successful otherwise false

◆ GetPathInfo()

DIMENCOSR_API HRESULT SR::GetPathInfo ( HMONITOR  hMonitor,
_Out_ DISPLAYCONFIG_PATH_INFO *  pPathInfo 
)

Gets path of the given monitor handler.

Parameters
hMonitorhandler of the monitor
pPathInfocontains information about display configuration path
Returns
HRESULT success if monitor information retrieval is successful otherwise fail

◆ hasNonNativeResolution()

DIMENCOSR_API bool SR::hasNonNativeResolution ( const SR::MonitorData monitor)

Compare the displayResolution and the nativeResolution of the given monitor.

Parameters
monitorA valid MonitorData object
Returns
True if both the displayResolution and the nativeResolution of the given monitorData are equal.

◆ isProductCodeSupported()

DIMENCOSR_API bool SR::isProductCodeSupported ( std::string  productCode)

checks if the given productCode is supported

Parameters
productCodethe productCode to check
Returns
true if the productCode is supported, false otherwise.

◆ logSrMonitor()

DIMENCOSR_API void SR::logSrMonitor ( MonitorData  data,
bool  srDisplay 
)

logs the virtual rectangle, virtual position and the srDisplay boolean

Parameters
dataA valid MonitorData structure
srDisplaywheter data is an SR display

◆ matchProductId()

DIMENCOSR_API bool SR::matchProductId ( const std::string  productCode,
const MonitorData monitorData 
)

Check expected EDID productId for a given product code.

Parameters
[in]productCodeidentifying an SR product, such as AJ, D1 or AN
[in]monitorDatastruct containing EDID data to check
Returns
true if the productCode matches the EDID in monitorData or false otherwise

Will also return false if the product code is not known

◆ monitorConfigurationEquals()

DIMENCOSR_API bool SR::monitorConfigurationEquals ( const SR::MonitorData monitorA,
const SR::MonitorData monitorB 
)

Compare two given monitors and see if they are the equal based on the resolution and duplication values. Specifically, the rectangle, isDuplicated, and displayResolution members are compared.

Parameters
monitorAA valid MonitorData object
monitorBA valid MonitorData object
Returns
True if both given monitors are equal based on resolution and duplication values.

◆ monitorEquals()

DIMENCOSR_API bool SR::monitorEquals ( const SR::MonitorData monitorA,
const SR::MonitorData monitorB 
)

Compare two given monitors and see if they are the equal based on the EDID data in MonitorData.

Parameters
monitorAA valid MonitorData object
monitorBA valid MonitorData object
Returns
True if both given monitors are equal based on the EDID data.

◆ printMonitorList()

DIMENCOSR_API void SR::printMonitorList ( std::vector< MonitorData monitors)

logs all members for a given list of MonitorData

Parameters
monitorsA valid vector of MonitorData objects

◆ waitForChangeMonitorRectangles()

DIMENCOSR_API void SR::waitForChangeMonitorRectangles ( std::vector< RECT > &  monitorRectangles,
unsigned int  timeBetweenChecks,
bool &  active 
)

Updates monitorRectangles with the rectangles of the monitors currently returned by getMonitorList() and blocks until this list has changed (as a set)

Parameters
monitorRectanglesis a reference to a vector of RECTs that will be updated, this function blocks until the contents of this vector has changed (as a set).
timeBetweenChecksis an integer expressing the number of milliseconds to wait between attempts to get the monitor list
activeis a reference to a boolean that reflects whether the function should keep waiting, if it is ever set to false the function will stop blocking