![]() |
VR-Forces 4.1 Class Documentation
|
This manager will manage settings for intervisibility objects. More...

Public Member Functions | |
| virtual | ~DtIntervisibilitySettingsManager () |
| DTOR. | |
Setters/getters for settings | |
| void | setIntervisibilityEnabled (bool enabled) |
| Sets whether intervisibility objects are globally seen/hidden. | |
| bool | intervisibilityEnabled () const |
| Gets whether intervisibility objects are globally seen/hidden. | |
| void | setLeftClickMakesObjectsPermanent (bool enabled) |
| Sets whether left-clicking places object or starts a new one. | |
| bool | leftClickMakesObjectsPermanent () const |
| Gets whether left-clicking places object or starts a new one. | |
| void | setOriginIntervisibilityElevation (double height) |
| Sets the distance above the origin to place the intervisibility line (in meters). | |
| double | originIntervisibilityElevation () const |
| Gets the distance above the origin the intervisibility line is placed (in meters). | |
| void | setEndPointIntervisibilityElevation (double height) |
| Sets the distance above the end point to place the intervisibility line (in meters). | |
| double | endPointIntervisibilityElevation () const |
| Gets the distance above the end point the intervisibility line is placed (in meters). | |
| void | setFanModeSamplingRate (double radAngle) |
| Sets the angle between fan mode samples (in radians). | |
| double | fanModeSamplingRate () const |
| Gets the angle between fan mode samples (in radians). | |
| void | setEntityFanUpdateRate (double interval) |
| Sets the time between entity fan mode updates (in seconds). | |
| double | entityFanUpdateRate () const |
| Gets the time between entity fan mode updates (in seconds). | |
| void | setHatLinesEnabled (bool hatEnabled) |
| Sets whether height above terrain lines are enabled. | |
| bool | hatLinesEnabled () const |
| Gets whether height above terrain lines are enabled. | |
| void | setHatLinesOnSelectionOnly (bool selOnly) |
| Sets whether HAT lines are shown only when the object is selected. | |
| bool | hatLinesOnSelectionOnly () const |
| Gets whether HAT lines are shown only when the object is selected. | |
| void | setVisibleColor (float r, float g, float b, float a) |
| Sets the color of the visible portion of the intervisibility line. | |
| void | visibleColor (float &r, float &g, float &b, float &a) const |
| Gets the color of the visible portion of the intervisibility line. | |
| void | setBlockedColor (float r, float g, float b, float a) |
| Sets the color of the blocked portion of the intervisibility line. | |
| void | blockedColor (float &r, float &g, float &b, float &a) const |
| Gets the color of the blocked portion of the intervisibility line. | |
| void | setCircleColor (float r, float g, float b, float a) |
| Sets the color of the circle outline of a fan, grid line or entity intervisibility. | |
| void | circleColor (float &r, float &g, float &b, float &a) const |
| Gets the color of the circle outline of a fan, grid line or entity intervisibility. | |
| void | setRangeInfoLabelsEnabled (bool enabled) |
| Sets whether intervisibility lines display range ruler information. | |
| bool | rangeInfoLabelsEnabled () const |
| Gets whether intervisibility lines display range ruler information. | |
| void | setRangeInfoLabelBackgroundColor (float r, float g, float b) |
| Sets the background color for the range info labels. | |
| void | rangeInfoLabelBackgroundColor (float &r, float &g, float &b) |
| Gets the background color for the range info labels. | |
| void | setRangeInfoLabelBackgroundOpacity (float opacity) |
| Sets the opacity/transparency level for the range info label backgrounds. | |
| float | rangeInfoLabelBackgroundOpacity () const |
| Gets the opacity/transparency level for the range info label backgrounds. | |
| void | setRangeInfoAltChangeFieldEnabled (bool enabled) |
| Sets whether the range info's altitude change field is enabled. | |
| bool | rangeInfoAltChangeFieldEnabled () const |
| Gets whether the range info's altitude change field is enabled. | |
| void | setRangeInfoLocationFieldEnabled (bool enabled) |
| Sets whether the range info's location field is enabled. | |
| bool | rangeInfoLocationFieldEnabled () const |
| Gets whether the range info's location field is enabled. | |
| void | setRangeInfoHeadingFieldEnabled (bool enabled) |
| Sets whether the range info's heading field is enabled. | |
| bool | rangeInfoHeadingFieldEnabled () const |
| Gets whether the range info's heading field is enabled. | |
| void | setRangeInfoRangeFieldEnabled (bool enabled) |
| Sets whether the range info's range field is enabled. | |
| bool | rangeInfoRangeFieldEnabled () const |
| Gets whether the range info's range field is enabled. | |
Archiving methods | |
| virtual void | setFromRecord (const makArchives::DtIntervisibilitySettingsRecord &rec) |
| Use the settings from the given settings record. | |
| virtual void | getRecord (makArchives::DtIntervisibilitySettingsRecord &rec) const |
| Populate the given record with the current settings. | |
Methods for checking if object (object type) is attachable. | |
| virtual bool | isAttachableObjectType (DtElementEntry::ObjectType t) const |
| Checks whether the given object type is one that can be attached to. | |
| virtual bool | isAttachableObjectType (DtUniqueID elementId) const |
| Checks whether the entity with the given element id can be attached to. | |
Public Member Functions inherited from makVrv::DtBaseSettingsManager< makArchives::DtIntervisibilitySettingsRecord > | |
| 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::DtIntervisibilitySettingsRecord > | |
| 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 DtDeSettings * | settings () |
| Accessor for the manager's DtDeSettings object. | |
| virtual const DtDeSettings * | settings () const |
| Accessor for the manager's DtDeSettings object (const). | |
| virtual DtSettingsBackup * | settingsBackup () |
| Accessor for the manager's settings backup. | |
| virtual const DtSettingsBackup * | settingsBackup () 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. | |
Public Member Functions inherited from makVrv::DtVirtualBaseClass | |
| DtVirtualBaseClass () | |
| Do nothing constructor. | |
| virtual | ~DtVirtualBaseClass () |
| Virtual do nothing destructor. | |
Static Public Member Functions | |
| static DtIntervisibilitySettingsManager & | instance (DtDe &de) |
| Get an instance of the settings manager. | |
Public Attributes | |
Boost signals for changed settings | |
| boost::signal< void(bool)> | signal_intervisibilityEnabledSet |
| boost::signal< void(bool)> | signal_leftClickMakesObjectsPermanentSet |
| boost::signal< void(double)> | signal_originIntervisibilityElevationSet |
| boost::signal< void(double)> | signal_endPointIntervisibilityElevationSet |
| boost::signal< void(double)> | signal_fanModeSamplingRateSet |
| boost::signal< void(double)> | signal_entityFanUpdateRateSet |
| boost::signal< void(bool)> | signal_hatLinesEnabledSet |
| boost::signal< void(bool)> | signal_hatLinesOnSelectionOnlySet |
| boost::signal< void(float r, float g, float b, float a)> | signal_visibleColorSet |
| boost::signal< void(float r, float g, float b, float a)> | signal_blockedColorSet |
| boost::signal< void(float r, float g, float b, float a)> | signal_circleColorSet |
| boost::signal< void(bool)> | signal_rangeInfoLabelsEnabledSet |
| boost::signal< void(float r, float g, float b, float a)> | signal_rangeInfoBackgroundColorSet |
| boost::signal< void(bool)> | signal_rangeInfoAltChangeFieldEnabledChanged |
| boost::signal< void(bool)> | signal_rangeInfoLocationFieldEnabledChanged |
| boost::signal< void(bool)> | signal_rangeInfoHeadingFieldEnabledChanged |
| boost::signal< void(bool)> | signal_rangeInfoRangeFieldEnabledChanged |
Protected Member Functions | |
| DtIntervisibilitySettingsManager (DtDe &de) | |
| Protected CTOR ( use instance(..) ). | |
Protected Attributes | |
| bool | myIntervisibilityEnabled |
| bool | myLeftClickMakesObjectsPermanent |
| bool | myHatLinesEnabled |
| bool | myHatLinesOnSelectionOnly |
| double | myOriginIntervisibilityElevation |
| double | myEndPointIntervisibilityElevation |
| double | myFanModeSamplingRate |
| double | myEntityFanUpdateRate |
| float | myVisibleColor [4] |
| float | myBlockedColor [4] |
| float | myCircleColor [4] |
| bool | myRangeInfoLabelsEnabled |
| float | myRangeInfoBackgroundColor [4] |
| bool | myRangeInfoAltChangeFieldEnabled |
| bool | myRangeInfoLocationFieldEnabled |
| bool | myRangeInfoHeadingFieldEnabled |
| bool | myRangeInfoRangeFieldEnabled |
Friends | |
| template<typename ManagerClass > | |
| ManagerClass & | defaultManagerInstanceFunction (DtDe &, bool) |
| Befriend the manager instance functions for instance retreival/creation. | |
| template<typename ManagerClass > | |
| void | defaultManagerRegisterInstanceFunction (DtDe &, ManagerClass *) |
| Befriend the manager instance functions for instance retreival/creation. | |
Additional Inherited Members | |
Protected Types inherited from makVrv::DtBaseSettingsManager< makArchives::DtIntervisibilitySettingsRecord > | |
| typedef DtRecordSettingsBackup < DtBaseSettingsManager < makArchives::DtIntervisibilitySettingsRecord > , makArchives::DtIntervisibilitySettingsRecord > | RecordBackupType |
This manager will manage settings for intervisibility objects.
|
virtual |
DTOR.
|
protected |
Protected CTOR ( use instance(..) ).
|
static |
Get an instance of the settings manager.
| void makVrv::DtIntervisibilitySettingsManager::setIntervisibilityEnabled | ( | bool | enabled | ) |
Sets whether intervisibility objects are globally seen/hidden.
| bool makVrv::DtIntervisibilitySettingsManager::intervisibilityEnabled | ( | ) | const |
Gets whether intervisibility objects are globally seen/hidden.
| void makVrv::DtIntervisibilitySettingsManager::setLeftClickMakesObjectsPermanent | ( | bool | enabled | ) |
Sets whether left-clicking places object or starts a new one.
| bool makVrv::DtIntervisibilitySettingsManager::leftClickMakesObjectsPermanent | ( | ) | const |
Gets whether left-clicking places object or starts a new one.
| void makVrv::DtIntervisibilitySettingsManager::setOriginIntervisibilityElevation | ( | double | height | ) |
Sets the distance above the origin to place the intervisibility line (in meters).
| double makVrv::DtIntervisibilitySettingsManager::originIntervisibilityElevation | ( | ) | const |
Gets the distance above the origin the intervisibility line is placed (in meters).
| void makVrv::DtIntervisibilitySettingsManager::setEndPointIntervisibilityElevation | ( | double | height | ) |
Sets the distance above the end point to place the intervisibility line (in meters).
| double makVrv::DtIntervisibilitySettingsManager::endPointIntervisibilityElevation | ( | ) | const |
Gets the distance above the end point the intervisibility line is placed (in meters).
| void makVrv::DtIntervisibilitySettingsManager::setFanModeSamplingRate | ( | double | radAngle | ) |
Sets the angle between fan mode samples (in radians).
| double makVrv::DtIntervisibilitySettingsManager::fanModeSamplingRate | ( | ) | const |
Gets the angle between fan mode samples (in radians).
| void makVrv::DtIntervisibilitySettingsManager::setEntityFanUpdateRate | ( | double | interval | ) |
Sets the time between entity fan mode updates (in seconds).
Zero (0) default means check as fast as possible.
| double makVrv::DtIntervisibilitySettingsManager::entityFanUpdateRate | ( | ) | const |
Gets the time between entity fan mode updates (in seconds).
Zero (0) default means check as fast as possible.
| void makVrv::DtIntervisibilitySettingsManager::setHatLinesEnabled | ( | bool | hatEnabled | ) |
Sets whether height above terrain lines are enabled.
| bool makVrv::DtIntervisibilitySettingsManager::hatLinesEnabled | ( | ) | const |
Gets whether height above terrain lines are enabled.
| void makVrv::DtIntervisibilitySettingsManager::setHatLinesOnSelectionOnly | ( | bool | selOnly | ) |
Sets whether HAT lines are shown only when the object is selected.
| bool makVrv::DtIntervisibilitySettingsManager::hatLinesOnSelectionOnly | ( | ) | const |
Gets whether HAT lines are shown only when the object is selected.
| void makVrv::DtIntervisibilitySettingsManager::setVisibleColor | ( | float | r, |
| float | g, | ||
| float | b, | ||
| float | a | ||
| ) |
Sets the color of the visible portion of the intervisibility line.
| void makVrv::DtIntervisibilitySettingsManager::visibleColor | ( | float & | r, |
| float & | g, | ||
| float & | b, | ||
| float & | a | ||
| ) | const |
Gets the color of the visible portion of the intervisibility line.
| void makVrv::DtIntervisibilitySettingsManager::setBlockedColor | ( | float | r, |
| float | g, | ||
| float | b, | ||
| float | a | ||
| ) |
Sets the color of the blocked portion of the intervisibility line.
| void makVrv::DtIntervisibilitySettingsManager::blockedColor | ( | float & | r, |
| float & | g, | ||
| float & | b, | ||
| float & | a | ||
| ) | const |
Gets the color of the blocked portion of the intervisibility line.
| void makVrv::DtIntervisibilitySettingsManager::setCircleColor | ( | float | r, |
| float | g, | ||
| float | b, | ||
| float | a | ||
| ) |
Sets the color of the circle outline of a fan, grid line or entity intervisibility.
| void makVrv::DtIntervisibilitySettingsManager::circleColor | ( | float & | r, |
| float & | g, | ||
| float & | b, | ||
| float & | a | ||
| ) | const |
Gets the color of the circle outline of a fan, grid line or entity intervisibility.
| void makVrv::DtIntervisibilitySettingsManager::setRangeInfoLabelsEnabled | ( | bool | enabled | ) |
Sets whether intervisibility lines display range ruler information.
| bool makVrv::DtIntervisibilitySettingsManager::rangeInfoLabelsEnabled | ( | ) | const |
Gets whether intervisibility lines display range ruler information.
| void makVrv::DtIntervisibilitySettingsManager::setRangeInfoLabelBackgroundColor | ( | float | r, |
| float | g, | ||
| float | b | ||
| ) |
Sets the background color for the range info labels.
| void makVrv::DtIntervisibilitySettingsManager::rangeInfoLabelBackgroundColor | ( | float & | r, |
| float & | g, | ||
| float & | b | ||
| ) |
Gets the background color for the range info labels.
| void makVrv::DtIntervisibilitySettingsManager::setRangeInfoLabelBackgroundOpacity | ( | float | opacity | ) |
Sets the opacity/transparency level for the range info label backgrounds.
| float makVrv::DtIntervisibilitySettingsManager::rangeInfoLabelBackgroundOpacity | ( | ) | const |
Gets the opacity/transparency level for the range info label backgrounds.
| void makVrv::DtIntervisibilitySettingsManager::setRangeInfoAltChangeFieldEnabled | ( | bool | enabled | ) |
Sets whether the range info's altitude change field is enabled.
| bool makVrv::DtIntervisibilitySettingsManager::rangeInfoAltChangeFieldEnabled | ( | ) | const |
Gets whether the range info's altitude change field is enabled.
| void makVrv::DtIntervisibilitySettingsManager::setRangeInfoLocationFieldEnabled | ( | bool | enabled | ) |
Sets whether the range info's location field is enabled.
| bool makVrv::DtIntervisibilitySettingsManager::rangeInfoLocationFieldEnabled | ( | ) | const |
Gets whether the range info's location field is enabled.
| void makVrv::DtIntervisibilitySettingsManager::setRangeInfoHeadingFieldEnabled | ( | bool | enabled | ) |
Sets whether the range info's heading field is enabled.
| bool makVrv::DtIntervisibilitySettingsManager::rangeInfoHeadingFieldEnabled | ( | ) | const |
Gets whether the range info's heading field is enabled.
| void makVrv::DtIntervisibilitySettingsManager::setRangeInfoRangeFieldEnabled | ( | bool | enabled | ) |
Sets whether the range info's range field is enabled.
| bool makVrv::DtIntervisibilitySettingsManager::rangeInfoRangeFieldEnabled | ( | ) | const |
Gets whether the range info's range field is enabled.
|
virtual |
Use the settings from the given settings record.
Implements makVrv::DtBaseSettingsManager< makArchives::DtIntervisibilitySettingsRecord >.
|
virtual |
Populate the given record with the current settings.
Implements makVrv::DtBaseSettingsManager< makArchives::DtIntervisibilitySettingsRecord >.
|
virtual |
Checks whether the given object type is one that can be attached to.
|
virtual |
Checks whether the entity with the given element id can be attached to.
|
friend |
Befriend the manager instance functions for instance retreival/creation.
Befriend the manager instance functions for instance retrieval/creation.
Befriend the manager instance functions for instance retreival/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); }
|
friend |
Befriend the manager instance functions for instance retreival/creation.
Befriend the manager instance functions for instance retrieval/creation.
Befriend the manager instance functions for instance retreival/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));
| boost::signal<void (bool)> makVrv::DtIntervisibilitySettingsManager::signal_intervisibilityEnabledSet |
| boost::signal<void (bool)> makVrv::DtIntervisibilitySettingsManager::signal_leftClickMakesObjectsPermanentSet |
| boost::signal<void (double)> makVrv::DtIntervisibilitySettingsManager::signal_originIntervisibilityElevationSet |
| boost::signal<void (double)> makVrv::DtIntervisibilitySettingsManager::signal_endPointIntervisibilityElevationSet |
| boost::signal<void (double)> makVrv::DtIntervisibilitySettingsManager::signal_fanModeSamplingRateSet |
| boost::signal<void (double)> makVrv::DtIntervisibilitySettingsManager::signal_entityFanUpdateRateSet |
| boost::signal<void (bool)> makVrv::DtIntervisibilitySettingsManager::signal_hatLinesEnabledSet |
| boost::signal<void (bool)> makVrv::DtIntervisibilitySettingsManager::signal_hatLinesOnSelectionOnlySet |
| boost::signal<void (float r, float g, float b, float a)> makVrv::DtIntervisibilitySettingsManager::signal_visibleColorSet |
| boost::signal<void (float r, float g, float b, float a)> makVrv::DtIntervisibilitySettingsManager::signal_blockedColorSet |
| boost::signal<void (float r, float g, float b, float a)> makVrv::DtIntervisibilitySettingsManager::signal_circleColorSet |
| boost::signal<void (bool)> makVrv::DtIntervisibilitySettingsManager::signal_rangeInfoLabelsEnabledSet |
| boost::signal<void (float r, float g, float b, float a)> makVrv::DtIntervisibilitySettingsManager::signal_rangeInfoBackgroundColorSet |
| boost::signal<void (bool)> makVrv::DtIntervisibilitySettingsManager::signal_rangeInfoAltChangeFieldEnabledChanged |
| boost::signal<void (bool)> makVrv::DtIntervisibilitySettingsManager::signal_rangeInfoLocationFieldEnabledChanged |
| boost::signal<void (bool)> makVrv::DtIntervisibilitySettingsManager::signal_rangeInfoHeadingFieldEnabledChanged |
| boost::signal<void (bool)> makVrv::DtIntervisibilitySettingsManager::signal_rangeInfoRangeFieldEnabledChanged |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |