VR-Forces 4.6 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Static Public Member Functions | Protected Attributes | Private Member Functions | Friends
makVrv::DtVirtualRealitySettingsManager Class Reference

Contains the DtVirtualRealitySettingsManager class declaration. More...

Inheritance diagram for makVrv::DtVirtualRealitySettingsManager:
Inheritance graph
[legend]

Public Member Functions

virtual ~DtVirtualRealitySettingsManager ()
 DTOR.
Setting Getters/Setters
void setEnabled (bool enabled)
 sets wheter VR is in enabled or not
bool enabled () const
 gets whether VR is currently enabled
void setMirroring (makArchives::DtVirtualRealitySettingsRecord::DtMirroring enabled)
 Enables/disables mirroring of an HMD eye channel on a monitor so other people can see what the user of the HMD is seeing.
makArchives::DtVirtualRealitySettingsRecord::DtMirroring mirroring () const
 Get the current state of mirroring the HMD to a monitor.
void setMirrorChannel (const std::string &channelName)
 Sets the display channel using a window and channel name (i.e.
std::string mirrorChannel () const
 Gets the mirror display channel using a window and channel name (i.e. "Window 1:Channel 1")
void setAttachedObserver (const std::string &obsName)
 Sets the observer that the HMD is attached to.
std::string attachedObserver ()
 gets the names of the current attached observer
void setFlipOverlays (bool flip)
 flip overlays on the vertical axis.
bool flipOverlays () const
 get the flip overlays settings
Setting persistence methods.

Use the settings from the given settings record.

void setFromRecord (const makArchives::DtVirtualRealitySettingsRecord &rec)
 Set the current settings' state from the given record (abstract).
void getRecord (makArchives::DtVirtualRealitySettingsRecord &rec) const
 Populate the given record with the current settings.
- Public Member Functions inherited from makVrv::DtBaseSettingsManager< makArchives::DtVirtualRealitySettingsRecord >
 DtBaseSettingsManager (DtDe &de, const std::string &name, const std::string &displayName, const std::string &ext)
 CTOR.
virtual ~DtBaseSettingsManager ()
 Virtual DTOR.
virtual void initializeBackup ()
 Creates a backup of the settings' current state.
- Public Member Functions inherited from makVrv::DtCommonBaseSettingsManager< makArchives::DtVirtualRealitySettingsRecord >
 DtCommonBaseSettingsManager (DtDe &de, const std::string &name, const std::string &displayName, const std::string &ext)
 CTOR The name, displayName, and extension parameters are used for creating the settings object (DtDeSettings) and backup, and for constructing the filename when readin/writing the records to disk.
virtual ~DtCommonBaseSettingsManager ()
 Virtual DTOR.
virtual void autoSaveIfNecessary ()
 Saves the current settings as defaults if autosave is enabled.
virtual void setAutoSave (bool doit)
 Sets whether autosave is enabled for the settings manager.
virtual bool autoSave () const
 Gets whether autosave is enabled for the settings manager.
virtual void setUseDefaultSettingsRecord (bool useit)
 Sets whether setting initialization should check for a default record.
virtual bool useDefaultSettingsRecord () const
 Gets whether setting initialization should check for a default record.
virtual DtDeSettingssettings ()
 Accessor for the manager's DtDeSettings object.
virtual const DtDeSettingssettings () const
 Accessor for the manager's DtDeSettings object (const).
virtual DtSettingsBackupsettingsBackup ()
 Accessor for the manager's settings backup.
virtual const DtSettingsBackupsettingsBackup () const
 Accessor for the manager's settings backup (const).
virtual void loadDefaults ()
 Initializes the settings and creates a backup.
virtual void saveDefaultSettings ()
 Saves the current settings' state as the default (on disk).
virtual void loadDefaultSettings (bool loadOnlyFactorySettings)
 Loads the default settings from disk.
virtual void importSettings (const std::string &filePath)
 Load the settings' state from the given file.
virtual void exportSettings (const std::string &filePath) const
 Save the current settings' state to the given file.
virtual void getSplitRecord (std::vector< makArchives::DtVirtualRealitySettingsRecord > &rec, std::vector< std::string > &fileNames)
 For directory support, split the main record into different sub-records and give them each a file name.
virtual void addRecords (makArchives::DtVirtualRealitySettingsRecord &rec, makArchives::DtVirtualRealitySettingsRecord &combinedRec)
 For directory support, when reading in a directory, add the records from each file to the combined record.
- Public Member Functions inherited from makVrv::DtVirtualBaseClass
 DtVirtualBaseClass ()
 Do nothing constructor.
virtual ~DtVirtualBaseClass ()
 Virtual do nothing destructor.

Static Public Member Functions

static
DtVirtualRealitySettingsManager
instance (DtDe &de)
 Get an instance of the settings manager.

Public Attributes

Boost signals for changed settings

signaled when VR is enabled or disabled

boost::signal< void(bool)> signal_enabledChanged
boost::signal< void(makArchives::DtVirtualRealitySettingsRecord::DtMirroring)> signal_mirroringChanged
 signals when the HMD mirror state changes
boost::signal< void(std::string)> signal_mirrorChannelChanged
 signaled when the channel that the user wants to display the HMD mirror on changes
boost::signal< void(std::string)> signal_attachedObserverChanged
 signaled when the attached observer changes
boost::signal< void(bool)> signal_flipOverlaysChanged
 signaled with the flip overlay changes

Protected Attributes

makArchives::DtVirtualRealitySettingsRecord mySettingsRecord
DtDemyDe

Private Member Functions

 DtVirtualRealitySettingsManager (DtDe &)
 Protected CTOR ( use instance(..) )
 DtVirtualRealitySettingsManager (const DtVirtualRealitySettingsManager &orig)
 prevent copy constructor
DtVirtualRealitySettingsManageroperator= (const DtVirtualRealitySettingsManager &orig)
 prevent assignment operator

Friends

template<typename ManagerClass >
ManagerClass & defaultManagerInstanceFunction (DtDe &, bool)
 Befriend the manager instance functions for instance retrieval / creation.
template<typename ManagerClass >
void defaultManagerRegisterInstanceFunction (DtDe &, ManagerClass *)
 Befriend the manager instance functions for instance retrieval / creation.

Additional Inherited Members

- Protected Types inherited from makVrv::DtBaseSettingsManager< makArchives::DtVirtualRealitySettingsRecord >
typedef DtRecordSettingsBackup
< DtBaseSettingsManager
< makArchives::DtVirtualRealitySettingsRecord >
, makArchives::DtVirtualRealitySettingsRecord
RecordBackupType

Detailed Description

Contains the DtVirtualRealitySettingsManager class declaration.

This class can be used to programatically enable/disable virtual reality and change the mirroring state.

Constructor & Destructor Documentation

makVrv::DtVirtualRealitySettingsManager::DtVirtualRealitySettingsManager ( DtDe )
private

Protected CTOR ( use instance(..) )

makVrv::DtVirtualRealitySettingsManager::DtVirtualRealitySettingsManager ( const DtVirtualRealitySettingsManager orig)
private

prevent copy constructor

virtual makVrv::DtVirtualRealitySettingsManager::~DtVirtualRealitySettingsManager ( )
virtual

DTOR.

Member Function Documentation

DtVirtualRealitySettingsManager& makVrv::DtVirtualRealitySettingsManager::operator= ( const DtVirtualRealitySettingsManager orig)
private

prevent assignment operator

static DtVirtualRealitySettingsManager& makVrv::DtVirtualRealitySettingsManager::instance ( DtDe de)
static

Get an instance of the settings manager.

void makVrv::DtVirtualRealitySettingsManager::setEnabled ( bool  enabled)

sets wheter VR is in enabled or not

bool makVrv::DtVirtualRealitySettingsManager::enabled ( ) const

gets whether VR is currently enabled

void makVrv::DtVirtualRealitySettingsManager::setMirroring ( makArchives::DtVirtualRealitySettingsRecord::DtMirroring  enabled)

Enables/disables mirroring of an HMD eye channel on a monitor so other people can see what the user of the HMD is seeing.

makArchives::DtVirtualRealitySettingsRecord::DtMirroring makVrv::DtVirtualRealitySettingsManager::mirroring ( ) const

Get the current state of mirroring the HMD to a monitor.

void makVrv::DtVirtualRealitySettingsManager::setMirrorChannel ( const std::string &  channelName)

Sets the display channel using a window and channel name (i.e.

"Window 1:Channel 1") that will mirror what the HMD is seeing.

std::string makVrv::DtVirtualRealitySettingsManager::mirrorChannel ( ) const

Gets the mirror display channel using a window and channel name (i.e. "Window 1:Channel 1")

void makVrv::DtVirtualRealitySettingsManager::setAttachedObserver ( const std::string &  obsName)

Sets the observer that the HMD is attached to.

std::string makVrv::DtVirtualRealitySettingsManager::attachedObserver ( )

gets the names of the current attached observer

void makVrv::DtVirtualRealitySettingsManager::setFlipOverlays ( bool  flip)

flip overlays on the vertical axis.

Some devices expect the textures to be submitted with the uv min in the top left corner, some want it in the bottom left corner.

bool makVrv::DtVirtualRealitySettingsManager::flipOverlays ( ) const

get the flip overlays settings

void makVrv::DtVirtualRealitySettingsManager::setFromRecord ( const makArchives::DtVirtualRealitySettingsRecord record)
virtual

Set the current settings' state from the given record (abstract).

Implements makVrv::DtBaseSettingsManager< makArchives::DtVirtualRealitySettingsRecord >.

void makVrv::DtVirtualRealitySettingsManager::getRecord ( makArchives::DtVirtualRealitySettingsRecord rec) const
virtual

Populate the given record with the current settings.

Implements makVrv::DtBaseSettingsManager< makArchives::DtVirtualRealitySettingsRecord >.

Friends And Related Function Documentation

template<typename ManagerClass >
ManagerClass& defaultManagerInstanceFunction ( DtDe de,
bool  allowedInSlave 
)
friend

Befriend the manager instance functions for instance retrieval / creation.

Befriend the manager instance functions for instance retrieval / creation.

Befriend the manager instance functions for instance retrieval and creation.

Befriend the manager instance functions for instance retreival/creation.

Befriend the manager instance functions for instance retrieval/creation.

  Manager requirements:
  1) Static instance function
  2) Protected DtSignalConnectionManager named myConnections.
  3) Member functioned called loadDefaults which takes no arguments.
     and loads the default settings of the manager or factory from disk.
  4) define defaultManagerInstanceFunction as friend.
  5) define defaultManagerRegisterInstanceFunction as friend (see below).
  5) Protected Constructor which only takes a DtDe reference.
  @code 

class Manager { public: static Manager& instance(DtDe& de); void loadDefaults(); protected: template <typename managerclass>=""> friend ManagerClass& defaultManagerInstanceFunction(DtDe& de, bool); template <typename managerclass>=""> friend void defaultManagerRegisterInstanceFunction(DtDe& de, ManagerClass* mgr) Manager(DtDe&); DtSignalConnectionManager myConnections; };

  Then simply in the implementation of instance call 
  defaultManagerInstanceFunction with the de object and return the return
  value.
  @code 

Manager& Manager::instance(DtDe& de) { return defaultManagerInstanceFunction<Manager>(de); }

template<typename ManagerClass >
void defaultManagerRegisterInstanceFunction ( DtDe de,
ManagerClass *  mgr 
)
friend

Befriend the manager instance functions for instance retrieval / creation.

Befriend the manager instance functions for instance retrieval / creation.

Befriend the manager instance functions for instance retrieval and creation.

Befriend the manager instance functions for instance retreival/creation.

Befriend the manager instance functions for instance retrieval/creation.

  @code 

static void Manager::registerInstance(DtDe& de, Manager* mgr) { defaultManagerRegisterInstanceFunction(de,mgr); } ...else where call. // Assuming class NewManager : public Manager Manager::registerInstance(de,new NewManager(de));

Member Data Documentation

boost::signal<void (bool)> makVrv::DtVirtualRealitySettingsManager::signal_enabledChanged
boost::signal<void(makArchives::DtVirtualRealitySettingsRecord::DtMirroring)> makVrv::DtVirtualRealitySettingsManager::signal_mirroringChanged

signals when the HMD mirror state changes

boost::signal<void (std::string)> makVrv::DtVirtualRealitySettingsManager::signal_mirrorChannelChanged

signaled when the channel that the user wants to display the HMD mirror on changes

boost::signal<void (std::string)> makVrv::DtVirtualRealitySettingsManager::signal_attachedObserverChanged

signaled when the attached observer changes

boost::signal<void(bool)> makVrv::DtVirtualRealitySettingsManager::signal_flipOverlaysChanged

signaled with the flip overlay changes

makArchives::DtVirtualRealitySettingsRecord makVrv::DtVirtualRealitySettingsManager::mySettingsRecord
protected
DtDe& makVrv::DtVirtualRealitySettingsManager::myDe
protected

The documentation for this class was generated from the following file:

Document ID: Generated on Thu Apr 12 03:15:37 EDT 2018 from SVN revision 187986
Copyright © 2005-2018 VT MÄK. All Rights Reserved (www.mak.com)