![]() |
VR-Forces 4.0.4 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. | |
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. | |
This manager will manage settings for intervisibility objects.
| virtual makVrv::DtIntervisibilitySettingsManager::~DtIntervisibilitySettingsManager | ( | ) | [virtual] |
DTOR.
| makVrv::DtIntervisibilitySettingsManager::DtIntervisibilitySettingsManager | ( | DtDe & | de | ) | [protected] |
Protected CTOR ( use instance(..) ).
| static DtIntervisibilitySettingsManager& makVrv::DtIntervisibilitySettingsManager::instance | ( | DtDe & | de | ) | [static] |
Get an instance of the settings manager.
Sets whether intervisibility objects are globally seen/hidden.
Gets whether intervisibility objects are globally seen/hidden.
Sets whether left-clicking places object or starts a new one.
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).
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).
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.
Gets whether height above terrain lines are enabled.
Sets whether HAT lines are shown only when the object is selected.
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.
Sets whether intervisibility lines display range ruler information.
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.
Gets the opacity/transparency level for the range info label backgrounds.
Sets whether the range info's altitude change field is enabled.
Gets whether the range info's altitude change field is enabled.
Sets whether the range info's location field is enabled.
Gets whether the range info's location field is enabled.
Sets whether the range info's heading field is enabled.
Gets whether the range info's heading field is enabled.
Sets whether the range info's range field is enabled.
Gets whether the range info's range field is enabled.
| virtual void makVrv::DtIntervisibilitySettingsManager::setFromRecord | ( | const makArchives::DtIntervisibilitySettingsRecord & | rec | ) | [virtual] |
Use the settings from the given settings record.
Implements makVrv::DtBaseSettingsManager< makArchives::DtIntervisibilitySettingsRecord >.
| virtual void makVrv::DtIntervisibilitySettingsManager::getRecord | ( | makArchives::DtIntervisibilitySettingsRecord & | rec | ) | const [virtual] |
Populate the given record with the current settings.
Implements makVrv::DtBaseSettingsManager< makArchives::DtIntervisibilitySettingsRecord >.
| virtual bool makVrv::DtIntervisibilitySettingsManager::isAttachableObjectType | ( | DtElementEntry::ObjectType | t | ) | const [virtual] |
Checks whether the given object type is one that can be attached to.
| virtual bool makVrv::DtIntervisibilitySettingsManager::isAttachableObjectType | ( | DtUniqueID | elementId | ) | const [virtual] |
Checks whether the entity with the given element id can be attached to.
| 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.
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); }
| 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.
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 |
double makVrv::DtIntervisibilitySettingsManager::myOriginIntervisibilityElevation [protected] |
double makVrv::DtIntervisibilitySettingsManager::myEndPointIntervisibilityElevation [protected] |
double makVrv::DtIntervisibilitySettingsManager::myFanModeSamplingRate [protected] |
double makVrv::DtIntervisibilitySettingsManager::myEntityFanUpdateRate [protected] |
float makVrv::DtIntervisibilitySettingsManager::myVisibleColor[4] [protected] |
float makVrv::DtIntervisibilitySettingsManager::myBlockedColor[4] [protected] |
float makVrv::DtIntervisibilitySettingsManager::myCircleColor[4] [protected] |
float makVrv::DtIntervisibilitySettingsManager::myRangeInfoBackgroundColor[4] [protected] |