VR-Forces 4.6.1 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 Member Functions | Protected Attributes | Friends
makVrv::DtIntervisibilitySettingsManager Class Reference

This manager will manage settings for intervisibility objects. More...

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

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 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::DtIntervisibilitySettingsRecord > &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::DtIntervisibilitySettingsRecord &rec, makArchives::DtIntervisibilitySettingsRecord &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
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

Detailed Description

This manager will manage settings for intervisibility objects.

Constructor & Destructor Documentation

virtual makVrv::DtIntervisibilitySettingsManager::~DtIntervisibilitySettingsManager ( )
virtual

DTOR.

makVrv::DtIntervisibilitySettingsManager::DtIntervisibilitySettingsManager ( DtDe de)
protected

Protected CTOR ( use instance(..) ).

Member Function Documentation

static DtIntervisibilitySettingsManager& makVrv::DtIntervisibilitySettingsManager::instance ( DtDe de)
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 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.

Friends And Related Function Documentation

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.
  @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 retreival/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::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
bool makVrv::DtIntervisibilitySettingsManager::myIntervisibilityEnabled
protected
bool makVrv::DtIntervisibilitySettingsManager::myLeftClickMakesObjectsPermanent
protected
bool makVrv::DtIntervisibilitySettingsManager::myHatLinesEnabled
protected
bool makVrv::DtIntervisibilitySettingsManager::myHatLinesOnSelectionOnly
protected
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
bool makVrv::DtIntervisibilitySettingsManager::myRangeInfoLabelsEnabled
protected
float makVrv::DtIntervisibilitySettingsManager::myRangeInfoBackgroundColor[4]
protected
bool makVrv::DtIntervisibilitySettingsManager::myRangeInfoAltChangeFieldEnabled
protected
bool makVrv::DtIntervisibilitySettingsManager::myRangeInfoLocationFieldEnabled
protected
bool makVrv::DtIntervisibilitySettingsManager::myRangeInfoHeadingFieldEnabled
protected
bool makVrv::DtIntervisibilitySettingsManager::myRangeInfoRangeFieldEnabled
protected

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

Document ID: Generated on Wed Jul 25 16:57:45 EDT 2018 from SVN revision 190790
Copyright © 2005-2018 VT MÄK. All Rights Reserved (www.mak.com)