A class that manages Oculus Rift DK2 devices.
More...
#include <SurgSim/Devices/Oculus/OculusScaffold.h>
|
bool | doInitialize () override |
|
bool | doStartUp () override |
|
bool | doUpdate (double dt) override |
| Implementation of actual work function for this thread, this has a default implementation to handle destruction better, as it could be called while the thread is under destruction, if left unimplemented this would trigger a call to a pure virtual function. More...
|
|
A class that manages Oculus Rift DK2 devices.
- See also
- SurgSim::Devices::OculusDevice
◆ ~OculusScaffold()
SurgSim::Devices::OculusScaffold::~OculusScaffold |
( |
| ) |
|
◆ OculusScaffold()
SurgSim::Devices::OculusScaffold::OculusScaffold |
( |
| ) |
|
|
private |
◆ buildDeviceInputData()
Builds the data layout for the application input (i.e. device output).
◆ doInitialize()
bool SurgSim::Devices::OculusScaffold::doInitialize |
( |
| ) |
|
|
overrideprotectedvirtual |
◆ doRegisterDevice()
bool SurgSim::Devices::OculusScaffold::doRegisterDevice |
( |
DeviceData * |
info | ) |
|
|
private |
Do the Oculus SDK specific registration.
- Parameters
-
- Returns
- true on success, false on failure.
◆ doStartUp()
bool SurgSim::Devices::OculusScaffold::doStartUp |
( |
| ) |
|
|
overrideprotectedvirtual |
◆ doUpdate()
bool SurgSim::Devices::OculusScaffold::doUpdate |
( |
double |
dt | ) |
|
|
overrideprotectedvirtual |
Implementation of actual work function for this thread, this has a default implementation to handle destruction better, as it could be called while the thread is under destruction, if left unimplemented this would trigger a call to a pure virtual function.
- Returns
- false when the thread is done, this will stop execution
Reimplemented from SurgSim::Framework::BasicThread.
◆ finalizeSdk()
bool SurgSim::Devices::OculusScaffold::finalizeSdk |
( |
| ) |
|
|
private |
Finalizes (de-initializes) Oculus SDK.
- Returns
- true on success; false otherwise.
◆ getOrCreateSharedInstance()
std::shared_ptr< OculusScaffold > SurgSim::Devices::OculusScaffold::getOrCreateSharedInstance |
( |
| ) |
|
|
staticprivate |
Gets or creates the scaffold shared by all OculusDevice instances.
The scaffold is managed using a SharedInstance object, so it will be destroyed when all devices are released.
- Returns
- the scaffold object.
◆ initializeSdk()
bool SurgSim::Devices::OculusScaffold::initializeSdk |
( |
| ) |
|
|
private |
Initializes Oculus SDK.
- Returns
- true on success; false otherwise.
◆ registerDevice()
bool SurgSim::Devices::OculusScaffold::registerDevice |
( |
OculusDevice * |
device | ) |
|
|
private |
Registers the specified device object.
- Parameters
-
device | The device object to be used, which should have a unique name. |
- Returns
- True if the initialization succeeds, false if it fails.
◆ unregisterDevice()
bool SurgSim::Devices::OculusScaffold::unregisterDevice |
( |
const OculusDevice * |
device | ) |
|
|
private |
Unregisters the specified device object.
- Parameters
-
- Returns
- true on success, false on failure.
◆ OculusDevice
◆ m_logger
Logger used by the scaffold and all devices.
◆ m_state
std::unique_ptr<StateData> SurgSim::Devices::OculusScaffold::m_state |
|
private |
The documentation for this class was generated from the following files: