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

DtObserverModeManager is responsible for loading and saving observer modes, and providing a mechanism to look up observer mode information by observer mode ID. More...

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

Public Types

typedef std::map< int,
DtObserverMode
ObserverModes
 Type returned when retrieving all observer modes. More...
 

Public Member Functions

virtual ~DtObserverModeManager ()
 DTOR. More...
 
const ObserverModesobserverModes () const
 Accessor for the map of observer modes. More...
 
int numberOfObserverModes () const
 get the number of Observer Modes More...
 
virtual int createObserverMode (const std::string &stringKey, const std::string &displayName)
 Add a observer mode. More...
 
virtual int cloneObserverMode (int modeKeyOrig, const std::string &newStringKey, const std::string &newDisplayName)
 Create a new observer mode based on an existing one. More...
 
virtual int createModeKey (const std::string &stringKey)
 Get a key without adding the observer to the manager. More...
 
virtual void removeObserverMode (int mode)
 Remove a observer mode. More...
 
int lookupObserverModeKey (const std::string &stringKey) const
 Looks up the int key for the observer mode with the given name. More...
 
const std::string * findObserverModeStringKey (int modeKey) const
 Find the observer mode string for a int key. More...
 
bool getObserverModeById (int modeKey, DtObserverMode &result) const
 Get a observer mode. More...
 
bool getObserverModeByName (const std::string &observerModeName, DtObserverMode &result)
 Gets a reference to the observer mode with the given name. More...
 
std::string name (int modeKey) const
 Get the observer mode's display name. More...
 
void setName (int modeKey, const std::string &name)
 Set the observer mode's display name. More...
 
int modelSet (int modeKey) const
 get the model set for the specified mode More...
 
void setModelSet (int modeKey, int modelSet)
 This specifies the model set for the indicated observer mode. More...
 
std::string keyMap (int modeKey) const
 get the key map for the specified mode More...
 
void setKeyMap (int modeKey, const std::string &keyMap)
 This specifies the key map for the indicated observer mode. More...
 
void setIs2D (int modeKey, bool trueOrFalse)
 Set if the observer mode is 2D or not (3D) More...
 
bool is2D (int modeKey) const
 Get if the observer mode is 2D. More...
 
void setSensor (int modeKey, const std::string &sensorName)
 Set the sensor used for the observer mode. More...
 
std::string sensor (int modeKey) const
 Get the sensor used for the observer mode. More...
 
void setGainPrecision (int modeKey, int precision)
 Set the observer mode's gain precision. More...
 
int gainPrecision (int modeKey) const
 Get the observer mode's gain precision. More...
 
void setModelScaleFactor (int modeKey, double modelScaleFactor)
 Set the observer mode's model scale factor. More...
 
double modelScaleFactor (int modeKey) const
 Get the observer mode's model scale factor. More...
 
void setModelScaleType (int modeKey, const std::string &modelScaleType)
 Set the observer mode's model scale type. More...
 
const std::string & modelScaleType (int modeKey) const
 Get the observer mode's model scale type. More...
 
void setMaxModelScaleFactor (int modeKey, double maxModelScaleFactor)
 Set the observer mode's max model scale factor. More...
 
double maxModelScaleFactor (int modeKey) const
 Get the observer mode's max model scale factor. More...
 
void setMaxLinearModelScaleFactor (int modeKey, double maxLinearModelScaleFactor)
 Set the observer mode's max Linear model scale factor. More...
 
double maxLinearModelScaleFactor (int modeKey) const
 Get the observer mode's max model scale factor. More...
 
void setOrbitSpeedGain (int modeKey, int gain)
 Set the default orbit speed gain. More...
 
int orbitSpeedGain (int modeKey) const
 Get the default orbit speed gain. More...
 
void setLinearScaledSpeedGain (int modeKey, int gain)
 Set the default linear scaled speed gain. More...
 
int linearScaledSpeedGain (int modeKey) const
 Get the default linear scaled speed gain. More...
 
void setLinearUnscaledSpeedGain (int modeKey, int gain)
 Set the default linear unscaled speed gain. More...
 
int linearUnscaledSpeedGain (int modeKey) const
 Get the default linear unscaled speed gain. More...
 
void setRotationSpeedGain (int modeKey, int gain)
 Get and set the default rotation speed gain. More...
 
int rotationSpeedGain (int modeKey) const
 Get and set the default rotation speed gain. More...
 
void setObserverSetting (int modeKey, int settingKey, bool val)
 Set whether the given observer setting is enabled or not. More...
 
bool observerSetting (int modeKey, int settingKey) const
 Get whether the given observer setting is enabled for not. More...
 
void setSpeedScalingMode (int modeKey, DtObserverObject::SpeedScalingMode mode)
 Get and set the speed scaling mode. More...
 
DtObserverObject::SpeedScalingMode speedScalingMode (int modeKey) const
 
void setSpeedScalingMslModeOffset (int modeKey, double offset)
 Get and set the speed scaling MSL mode offset. More...
 
double speedScalingMslModeOffset (int modeKey) const
 
void setCameraShakeEnabled (int modeKey, bool enabled)
 Enable or disable camera shake. More...
 
bool cameraShakeEnabled (int modeKey) const
 
void setCameraShakeIntensity (int modeKey, double intensity)
 Get and set the camera shake intensity. More...
 
double cameraShakeIntensity (int modeKey) const
 
void setLodScaleCenterEnabled (int modeKey, bool enabled)
 Enable or disable the use of an lod scale center. More...
 
bool lodScaleCenterEnabled (int modeKey) const
 
void setLodScaleCenterMagMinLimit (int modeKey, double limit)
 Get and set the minimum view magnification that the lod scale will start being used. More...
 
double lodScaleCenterMagMinLimit (int modeKey) const
 
Setting Persistence Methods
virtual void loadDefaultSettings (bool loadOnlyDefaultSettings)
 Load the default settings. More...
 
virtual void loadDefaultSettings (bool loadOnlyDefaultSettings, bool merge)
 Load the default settings and merge if necessary. More...
 
virtual void importSettings (const std::string &filepath, bool merge)
 Import settings from the file and merge if necessary. More...
 
virtual void exportObserverMode (int modeKey, const std::string &filepath) const
 Export the specified observer mode to the named file. More...
 
virtual void setFromRecord (const makArchives::DtObserverModesRecord &record)
 Use the settings from the given settings record. More...
 
virtual void setFromRecord (const makArchives::DtObserverModesRecord &record, bool merge)
 Sets or merges the current settings with the given settings record. More...
 
virtual void setObserverModeFromRecord (const makArchives::DtObserverModesRecord &record, int modeKey)
 Use the observer mode settings from the given record. More...
 
virtual void getRecord (makArchives::DtObserverModesRecord &record) const
 Populate the given record with the current settings. More...
 
virtual
DtObserverModesSettingsBackup
observerModeSettingsBackup ()
 Return our settings backup object, properly cast to the derived version we are using. More...
 
- Public Member Functions inherited from makVrv::DtBaseSettingsManager< makArchives::DtObserverModesRecord >
 DtBaseSettingsManager (DtDe &de, const std::string &name, const std::string &displayName, const std::string &ext)
 CTOR. More...
 
virtual ~DtBaseSettingsManager ()
 Virtual DTOR. More...
 
- Public Member Functions inherited from makVrv::DtCommonBaseSettingsManager< makArchives::DtObserverModesRecord >
 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. More...
 
virtual ~DtCommonBaseSettingsManager ()
 Virtual DTOR. More...
 
virtual void autoSaveIfNecessary ()
 Saves the current settings as defaults if autosave is enabled. More...
 
virtual void setAutoSave (bool doit)
 Sets whether autosave is enabled for the settings manager. More...
 
virtual bool autoSave () const
 Gets whether autosave is enabled for the settings manager. More...
 
virtual void setUseDefaultSettingsRecord (bool useit)
 Sets whether setting initialization should check for a default record. More...
 
virtual bool useDefaultSettingsRecord () const
 Gets whether setting initialization should check for a default record. More...
 
virtual DtDeSettingssettings ()
 Accessor for the manager's DtDeSettings object. More...
 
virtual const DtDeSettingssettings () const
 Accessor for the manager's DtDeSettings object (const). More...
 
virtual DtSettingsBackupsettingsBackup ()
 Accessor for the manager's settings backup. More...
 
virtual const DtSettingsBackupsettingsBackup () const
 Accessor for the manager's settings backup (const). More...
 
virtual void loadDefaults ()
 Initializes the settings and creates a backup. More...
 
virtual void saveDefaultSettings ()
 Saves the current settings' state as the default (on disk). More...
 
virtual void importSettings (const std::string &filePath)
 Load the settings' state from the given file. More...
 
virtual void exportSettings (const std::string &filePath) const
 Save the current settings' state to the given file. More...
 
virtual void getSplitRecord (std::vector< makArchives::DtObserverModesRecord > &rec, std::vector< std::string > &fileNames)
 For directory support, split the main record into different sub-records and give them each a file name. More...
 
virtual void addRecords (makArchives::DtObserverModesRecord &rec, makArchives::DtObserverModesRecord &combinedRec)
 For directory support, when reading in a directory, add the records from each file to the combined record. More...
 
- Public Member Functions inherited from makVrv::DtVirtualBaseClass
 DtVirtualBaseClass ()
 Do nothing constructor. More...
 
virtual ~DtVirtualBaseClass ()
 Virtual do nothing destructor. More...
 

Static Public Member Functions

static DtObserverModeManagerinstance (DtDe &de)
 Get an instance used to emit, or to connect. More...
 

Public Attributes

boost::signal< void(int)> observerModeKeyMapChanged
 signal that the indicated observer mode's key map changed More...
 
boost::signal< void(int)> observerModeModelSetChanged
 signal that the indicated observer mode's model set changed More...
 
boost::signal< void(int)> observerModeIs2DChanged
 
boost::signal< void(int)> observerModeNameChanged
 signal that the indicated observer mode's name changed More...
 
boost::signal< void(int)> observerModeSensorChanged
 signal that the indicated observer mode's sensor changed More...
 
boost::signal< void(int, int,
bool)> 
observerModeSettingChanged
 signal that the indicated observer mode's setting changed More...
 
boost::signal< void(int)> observerModeGainPrecisionChanged
 signal that the indicated observer mode's gain precision changed More...
 
boost::signal< void(int)> observerModeOrbitSpeedGainChanged
 signal that the indicated observer mode's orbit speed changed More...
 
boost::signal< void(int)> observerModeRotationSpeedGainChanged
 signal that the indicated observer mode's rotation speed changed More...
 
boost::signal< void(int)> observerModeLinearScaledSpeedGainChanged
 signal that the indicated observer mode's scaled linear speed changed More...
 
boost::signal< void(int)> observerModeLinearUnscaledSpeedGainChanged
 signal that the indicated observer mode's scaled linear speed changed More...
 
boost::signal< void(int)> observerModeModelScaleFactorChanged
 signal that the indicated observer mode's model scale factor changed More...
 
boost::signal< void(int)> observerModeModelScaleTypeChanged
 signal that the indicated observer mode's model scale type changed More...
 
boost::signal< void(int)> observerModeMaxModelScaleFactorChanged
 signal that the indicated observer mode's max model scale factor changed More...
 
boost::signal< void(int)> observerModeMaxLinearModelScaleFactorChanged
 signal that the indicated observer mode's max linear model scale factor changed More...
 
boost::signal< void(int)> observerModeSpeedScalingModeChanged
 signal that the indicated observer mode's speed scaling mode has changed More...
 
boost::signal< void(int)> observerModeSpeedScalingMslModeOffsetChanged
 signal that the indicated observer mode's speed scaling MSL mode offset has changed More...
 
boost::signal< void(int)> observerModeCameraShakeEnabledChanged
 signal that the camera shake has been enabled or disabled More...
 
boost::signal< void(int)> observerModeCameraShakeIntensityChanged
 signal that the camera shake intensity has changed More...
 
boost::signal< void(int)> observerModeLodScaleCenterEnabledChanged
 signal that the lod scale center has been enabled or disabled More...
 
boost::signal< void(int)> observerModeLodScaleCenterMagMinLimitChanged
 signal that the lod scale center view magnification min limit has changed More...
 
boost::signal< void(int)> observerModeAdded
 signal that the indicated observer mode was added More...
 
boost::signal< void(int)> observerModeToBeRemoved
 signal that the indicated observer mode is about to be removed More...
 

Protected Types

typedef std::map< std::string,
int
ObserverModesMap
 Map type for mapping observer mode names to integer keys. More...
 
- Protected Types inherited from makVrv::DtBaseSettingsManager< makArchives::DtObserverModesRecord >
typedef DtRecordSettingsBackup
< DtBaseSettingsManager
< makArchives::DtObserverModesRecord >
, makArchives::DtObserverModesRecord
RecordBackupType
 

Protected Member Functions

 DtObserverModeManager (DtDe &)
 CTOR. More...
 
DtObserverModegetObserverModePtr (int modeKey)
 Accessor for a pointer to the observer mode with the given key. More...
 
const DtObserverModegetObserverModeConstPtr (int modeKey) const
 Accessor for a pointer to the observer mode with the given key. More...
 
virtual void addObserverMode (const DtObserverMode &mode)
 Add an already filled out mode (such as one read from a file) More...
 
virtual void clear ()
 delete all the current visual modes More...
 
virtual void initializeBackup ()
 Creates a backup of the settings' current state. More...
 
virtual void slot_wireframeModeChanged (bool onOrOff)
 

Protected Attributes

DtStringKeyConvertermyStringKeyConverter
 
ObserverModes myObserverModes
 
ObserverModesMap myObserverModesMap
 
DtSignalConnectionManager mySignalConnections
 
- Protected Attributes inherited from makVrv::DtCommonBaseSettingsManager< makArchives::DtObserverModesRecord >
DtSignalConnectionManager myConnections
 
std::string myName
 
std::string myExtension
 
std::string myDisplayName
 
bool myUseDefaultSettingsRecordFlag
 
bool myAutoSaveFlag
 
DtSettingsBackupmySettingsBackup
 
DtDemyDe
 

Friends

class DtObserverModeManagerCreator
 Befriend the creator class so the manager can be instantiated properly. More...
 
template<typename ManagerClass >
ManagerClass & defaultManagerInstanceFunction (DtDe &, bool)
 Befriend the manager instance functions for instance retreival/creation. More...
 
template<typename ManagerClass >
void defaultManagerRegisterInstanceFunction (DtDe &, ManagerClass *)
 Befriend the manager instance functions for instance retreival/creation. More...
 

Detailed Description

DtObserverModeManager is responsible for loading and saving observer modes, and providing a mechanism to look up observer mode information by observer mode ID.

Member Typedef Documentation

Type returned when retrieving all observer modes.

typedef std::map<std::string,int> makVrv::DtObserverModeManager::ObserverModesMap
protected

Map type for mapping observer mode names to integer keys.

Constructor & Destructor Documentation

virtual makVrv::DtObserverModeManager::~DtObserverModeManager ( )
virtual

DTOR.

makVrv::DtObserverModeManager::DtObserverModeManager ( DtDe )
protected

CTOR.

Member Function Documentation

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

Get an instance used to emit, or to connect.

const ObserverModes& makVrv::DtObserverModeManager::observerModes ( ) const

Accessor for the map of observer modes.

See Also
DtObserverModeManager::ObserverModes
int makVrv::DtObserverModeManager::numberOfObserverModes ( ) const

get the number of Observer Modes

virtual int makVrv::DtObserverModeManager::createObserverMode ( const std::string &  stringKey,
const std::string &  displayName 
)
virtual

Add a observer mode.

An modeKey will be assigned. The user can then set the key map and model set to use. Returns the modeKey assigned

virtual int makVrv::DtObserverModeManager::cloneObserverMode ( int  modeKeyOrig,
const std::string &  newStringKey,
const std::string &  newDisplayName 
)
virtual

Create a new observer mode based on an existing one.

An modeKey will be assigned; returns the modeKey assigned. Returns -1 if the clone fails.

virtual int makVrv::DtObserverModeManager::createModeKey ( const std::string &  stringKey)
virtual

Get a key without adding the observer to the manager.

This is used by DtObserverMode::setFromRecord, and not recommended for general use.

virtual void makVrv::DtObserverModeManager::removeObserverMode ( int  mode)
virtual

Remove a observer mode.

int makVrv::DtObserverModeManager::lookupObserverModeKey ( const std::string &  stringKey) const

Looks up the int key for the observer mode with the given name.

Returns
-1 if no observer mode with the given name exists.
const std::string* makVrv::DtObserverModeManager::findObserverModeStringKey ( int  modeKey) const

Find the observer mode string for a int key.

bool makVrv::DtObserverModeManager::getObserverModeById ( int  modeKey,
DtObserverMode result 
) const

Get a observer mode.

bool makVrv::DtObserverModeManager::getObserverModeByName ( const std::string &  observerModeName,
DtObserverMode result 
)

Gets a reference to the observer mode with the given name.

The return value indicates whether the result reference was populated with the requested observer mode. If false, the result has been untouched.

Returns
whether the reference passed in was populated with the mode.
std::string makVrv::DtObserverModeManager::name ( int  modeKey) const

Get the observer mode's display name.

void makVrv::DtObserverModeManager::setName ( int  modeKey,
const std::string &  name 
)

Set the observer mode's display name.

int makVrv::DtObserverModeManager::modelSet ( int  modeKey) const

get the model set for the specified mode

void makVrv::DtObserverModeManager::setModelSet ( int  modeKey,
int  modelSet 
)

This specifies the model set for the indicated observer mode.

std::string makVrv::DtObserverModeManager::keyMap ( int  modeKey) const

get the key map for the specified mode

void makVrv::DtObserverModeManager::setKeyMap ( int  modeKey,
const std::string &  keyMap 
)

This specifies the key map for the indicated observer mode.

void makVrv::DtObserverModeManager::setIs2D ( int  modeKey,
bool  trueOrFalse 
)

Set if the observer mode is 2D or not (3D)

bool makVrv::DtObserverModeManager::is2D ( int  modeKey) const

Get if the observer mode is 2D.

void makVrv::DtObserverModeManager::setSensor ( int  modeKey,
const std::string &  sensorName 
)

Set the sensor used for the observer mode.

std::string makVrv::DtObserverModeManager::sensor ( int  modeKey) const

Get the sensor used for the observer mode.

void makVrv::DtObserverModeManager::setGainPrecision ( int  modeKey,
int  precision 
)

Set the observer mode's gain precision.

int makVrv::DtObserverModeManager::gainPrecision ( int  modeKey) const

Get the observer mode's gain precision.

void makVrv::DtObserverModeManager::setModelScaleFactor ( int  modeKey,
double  modelScaleFactor 
)

Set the observer mode's model scale factor.

double makVrv::DtObserverModeManager::modelScaleFactor ( int  modeKey) const

Get the observer mode's model scale factor.

void makVrv::DtObserverModeManager::setModelScaleType ( int  modeKey,
const std::string &  modelScaleType 
)

Set the observer mode's model scale type.

const std::string& makVrv::DtObserverModeManager::modelScaleType ( int  modeKey) const

Get the observer mode's model scale type.

void makVrv::DtObserverModeManager::setMaxModelScaleFactor ( int  modeKey,
double  maxModelScaleFactor 
)

Set the observer mode's max model scale factor.

double makVrv::DtObserverModeManager::maxModelScaleFactor ( int  modeKey) const

Get the observer mode's max model scale factor.

void makVrv::DtObserverModeManager::setMaxLinearModelScaleFactor ( int  modeKey,
double  maxLinearModelScaleFactor 
)

Set the observer mode's max Linear model scale factor.

double makVrv::DtObserverModeManager::maxLinearModelScaleFactor ( int  modeKey) const

Get the observer mode's max model scale factor.

void makVrv::DtObserverModeManager::setOrbitSpeedGain ( int  modeKey,
int  gain 
)

Set the default orbit speed gain.

int makVrv::DtObserverModeManager::orbitSpeedGain ( int  modeKey) const

Get the default orbit speed gain.

void makVrv::DtObserverModeManager::setLinearScaledSpeedGain ( int  modeKey,
int  gain 
)

Set the default linear scaled speed gain.

int makVrv::DtObserverModeManager::linearScaledSpeedGain ( int  modeKey) const

Get the default linear scaled speed gain.

void makVrv::DtObserverModeManager::setLinearUnscaledSpeedGain ( int  modeKey,
int  gain 
)

Set the default linear unscaled speed gain.

int makVrv::DtObserverModeManager::linearUnscaledSpeedGain ( int  modeKey) const

Get the default linear unscaled speed gain.

void makVrv::DtObserverModeManager::setRotationSpeedGain ( int  modeKey,
int  gain 
)

Get and set the default rotation speed gain.

int makVrv::DtObserverModeManager::rotationSpeedGain ( int  modeKey) const

Get and set the default rotation speed gain.

void makVrv::DtObserverModeManager::setSpeedScalingMode ( int  modeKey,
DtObserverObject::SpeedScalingMode  mode 
)

Get and set the speed scaling mode.

DtObserverObject::SpeedScalingMode makVrv::DtObserverModeManager::speedScalingMode ( int  modeKey) const
void makVrv::DtObserverModeManager::setSpeedScalingMslModeOffset ( int  modeKey,
double  offset 
)

Get and set the speed scaling MSL mode offset.

double makVrv::DtObserverModeManager::speedScalingMslModeOffset ( int  modeKey) const
void makVrv::DtObserverModeManager::setCameraShakeEnabled ( int  modeKey,
bool  enabled 
)

Enable or disable camera shake.

bool makVrv::DtObserverModeManager::cameraShakeEnabled ( int  modeKey) const
void makVrv::DtObserverModeManager::setCameraShakeIntensity ( int  modeKey,
double  intensity 
)

Get and set the camera shake intensity.

double makVrv::DtObserverModeManager::cameraShakeIntensity ( int  modeKey) const
void makVrv::DtObserverModeManager::setLodScaleCenterEnabled ( int  modeKey,
bool  enabled 
)

Enable or disable the use of an lod scale center.

bool makVrv::DtObserverModeManager::lodScaleCenterEnabled ( int  modeKey) const
void makVrv::DtObserverModeManager::setLodScaleCenterMagMinLimit ( int  modeKey,
double  limit 
)

Get and set the minimum view magnification that the lod scale will start being used.

double makVrv::DtObserverModeManager::lodScaleCenterMagMinLimit ( int  modeKey) const
void makVrv::DtObserverModeManager::setObserverSetting ( int  modeKey,
int  settingKey,
bool  val 
)

Set whether the given observer setting is enabled or not.

Parameters
modeKeythe key for the observer mode the setting belongs to.
settingKeythe key for the setting to be set.
valthe new enabled state for the setting.
bool makVrv::DtObserverModeManager::observerSetting ( int  modeKey,
int  settingKey 
) const

Get whether the given observer setting is enabled for not.

Parameters
modeKeythe key for the observer mode the setting belongs to.
settingKeythe key for the setting to retrieve the state for.
Returns
whether the given setting is enabled or not.
virtual void makVrv::DtObserverModeManager::loadDefaultSettings ( bool  loadOnlyDefaultSettings)
virtual

Load the default settings.

Reimplemented from makVrv::DtCommonBaseSettingsManager< makArchives::DtObserverModesRecord >.

virtual void makVrv::DtObserverModeManager::loadDefaultSettings ( bool  loadOnlyDefaultSettings,
bool  merge 
)
virtual

Load the default settings and merge if necessary.

virtual void makVrv::DtObserverModeManager::importSettings ( const std::string &  filepath,
bool  merge 
)
virtual

Import settings from the file and merge if necessary.

virtual void makVrv::DtObserverModeManager::exportObserverMode ( int  modeKey,
const std::string &  filepath 
) const
virtual

Export the specified observer mode to the named file.

virtual void makVrv::DtObserverModeManager::setFromRecord ( const makArchives::DtObserverModesRecord record)
virtual

Use the settings from the given settings record.

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

virtual void makVrv::DtObserverModeManager::setFromRecord ( const makArchives::DtObserverModesRecord record,
bool  merge 
)
virtual

Sets or merges the current settings with the given settings record.

If the merge parameter is false, the settings are cleared then the record settings are added (essentially a regular set). If the merge parameter is true, the settings are merged with the current settings.

virtual void makVrv::DtObserverModeManager::setObserverModeFromRecord ( const makArchives::DtObserverModesRecord record,
int  modeKey 
)
virtual

Use the observer mode settings from the given record.

virtual void makVrv::DtObserverModeManager::getRecord ( makArchives::DtObserverModesRecord record) const
virtual

Populate the given record with the current settings.

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

virtual DtObserverModesSettingsBackup* makVrv::DtObserverModeManager::observerModeSettingsBackup ( )
virtual

Return our settings backup object, properly cast to the derived version we are using.

DtObserverMode* makVrv::DtObserverModeManager::getObserverModePtr ( int  modeKey)
protected

Accessor for a pointer to the observer mode with the given key.

Returns
a pointer to the observer mode, or NULL if there isn't one.
const DtObserverMode* makVrv::DtObserverModeManager::getObserverModeConstPtr ( int  modeKey) const
protected

Accessor for a pointer to the observer mode with the given key.

Returns
a const pointer to the observer mode, or NULL if there isn't one.
virtual void makVrv::DtObserverModeManager::addObserverMode ( const DtObserverMode mode)
protectedvirtual

Add an already filled out mode (such as one read from a file)

Note that if the mode already exists, it overwrites it.

virtual void makVrv::DtObserverModeManager::clear ( )
protectedvirtual

delete all the current visual modes

virtual void makVrv::DtObserverModeManager::initializeBackup ( )
protectedvirtual

Creates a backup of the settings' current state.

Reimplemented from makVrv::DtBaseSettingsManager< makArchives::DtObserverModesRecord >.

virtual void makVrv::DtObserverModeManager::slot_wireframeModeChanged ( bool  onOrOff)
protectedvirtual

Friends And Related Function Documentation

friend class DtObserverModeManagerCreator
friend

Befriend the creator class so the manager can be instantiated properly.

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

Befriend the manager instance functions for instance retreival/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.

* 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.

* 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 retreival/creation.

Befriend the manager instance functions for instance retreival/creation.

Befriend the manager instance functions for instance retrieval/creation.

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

Member Data Documentation

boost::signal<void (int)> makVrv::DtObserverModeManager::observerModeKeyMapChanged

signal that the indicated observer mode's key map changed

boost::signal<void (int)> makVrv::DtObserverModeManager::observerModeModelSetChanged

signal that the indicated observer mode's model set changed

boost::signal<void (int)> makVrv::DtObserverModeManager::observerModeIs2DChanged
boost::signal<void (int)> makVrv::DtObserverModeManager::observerModeNameChanged

signal that the indicated observer mode's name changed

boost::signal<void (int)> makVrv::DtObserverModeManager::observerModeSensorChanged

signal that the indicated observer mode's sensor changed

boost::signal<void (int, int,bool)> makVrv::DtObserverModeManager::observerModeSettingChanged

signal that the indicated observer mode's setting changed

boost::signal<void (int)> makVrv::DtObserverModeManager::observerModeGainPrecisionChanged

signal that the indicated observer mode's gain precision changed

boost::signal<void (int)> makVrv::DtObserverModeManager::observerModeOrbitSpeedGainChanged

signal that the indicated observer mode's orbit speed changed

boost::signal<void (int)> makVrv::DtObserverModeManager::observerModeRotationSpeedGainChanged

signal that the indicated observer mode's rotation speed changed

boost::signal<void (int)> makVrv::DtObserverModeManager::observerModeLinearScaledSpeedGainChanged

signal that the indicated observer mode's scaled linear speed changed

boost::signal<void (int)> makVrv::DtObserverModeManager::observerModeLinearUnscaledSpeedGainChanged

signal that the indicated observer mode's scaled linear speed changed

boost::signal<void (int)> makVrv::DtObserverModeManager::observerModeModelScaleFactorChanged

signal that the indicated observer mode's model scale factor changed

boost::signal<void (int)> makVrv::DtObserverModeManager::observerModeModelScaleTypeChanged

signal that the indicated observer mode's model scale type changed

boost::signal<void (int)> makVrv::DtObserverModeManager::observerModeMaxModelScaleFactorChanged

signal that the indicated observer mode's max model scale factor changed

boost::signal<void (int)> makVrv::DtObserverModeManager::observerModeMaxLinearModelScaleFactorChanged

signal that the indicated observer mode's max linear model scale factor changed

boost::signal<void (int)> makVrv::DtObserverModeManager::observerModeSpeedScalingModeChanged

signal that the indicated observer mode's speed scaling mode has changed

boost::signal<void (int)> makVrv::DtObserverModeManager::observerModeSpeedScalingMslModeOffsetChanged

signal that the indicated observer mode's speed scaling MSL mode offset has changed

boost::signal<void (int)> makVrv::DtObserverModeManager::observerModeCameraShakeEnabledChanged

signal that the camera shake has been enabled or disabled

boost::signal<void (int)> makVrv::DtObserverModeManager::observerModeCameraShakeIntensityChanged

signal that the camera shake intensity has changed

boost::signal<void(int)> makVrv::DtObserverModeManager::observerModeLodScaleCenterEnabledChanged

signal that the lod scale center has been enabled or disabled

boost::signal<void(int)> makVrv::DtObserverModeManager::observerModeLodScaleCenterMagMinLimitChanged

signal that the lod scale center view magnification min limit has changed

boost::signal<void (int)> makVrv::DtObserverModeManager::observerModeAdded

signal that the indicated observer mode was added

boost::signal<void (int)> makVrv::DtObserverModeManager::observerModeToBeRemoved

signal that the indicated observer mode is about to be removed

DtStringKeyConverter* makVrv::DtObserverModeManager::myStringKeyConverter
protected
ObserverModes makVrv::DtObserverModeManager::myObserverModes
protected
ObserverModesMap makVrv::DtObserverModeManager::myObserverModesMap
protected
DtSignalConnectionManager makVrv::DtObserverModeManager::mySignalConnections
protected

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

Document ID: Generated on Thu Aug 27 10:56:05 EDT 2020 from SVN revision 217100
Copyright © 2005-2020 MAK Technologies. All Rights Reserved (www.mak.com)