VR-Forces 4.0.4 Class Documentation
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]

List of all members.

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.

Detailed Description

This manager will manage settings for intervisibility objects.


Constructor & Destructor Documentation

DTOR.

Protected CTOR ( use instance(..) ).


Member Function Documentation

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.

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

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

Sets the angle between fan mode samples (in radians).

Gets the angle between fan mode samples (in radians).

Sets the time between entity fan mode updates (in seconds).

Zero (0) default means check as fast as possible.

Gets the time between entity fan mode updates (in seconds).

Zero (0) default means check as fast as possible.

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.

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.

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.

Use the settings from the given settings record.

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

Populate the given record with the current settings.

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

Checks whether the given object type is one that can be attached to.

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.

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.

 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 (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 (float r, float g, float b, float a)> makVrv::DtIntervisibilitySettingsManager::signal_rangeInfoBackgroundColorSet

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

Document ID: Generated on Fri Jun 29 16:33:32 EDT 2012 from SVN revision 116588
Copyright © 2005-2012 VT MÄK Inc. All Rights Reserved (www.mak.com)