WSF
WsfZoneReference Class Reference

#include <WsfZoneReference.hpp>

Inheritance diagram for WsfZoneReference:
Collaboration diagram for WsfZoneReference:

Public Member Functions

 WsfZoneReference ()=delete
 WsfZoneReference (const std::string &aSharedZoneName)
WsfZoneReferenceoperator= (const WsfZoneReference &)=delete
 ~WsfZoneReference () override=default
WsfZoneClone () const override
 The standard Clone() method (virtual copy constructor).
void Initialize (const WsfScenario &aScenario) override
bool PointIsInside (WsfSimulation *aSimulationPtr, const double aViewedPointWCS[3], const double aEyePointWCS[3], const double aLookHeading, const double aDeltaDownRange=0.0) override
double Area () override
 return the area of the polygon
WsfGeoPoint Reference () override
 return the geopoint of the reference point
WsfGeoPoint Centroid () override
 return the geopoint of the centroid
void MaxPoint (double &aX, double &aY, double &aAlt) override
void MinPoint (double &aX, double &aY, double &aAlt) override
void DebugDrawZone (WsfDraw &aDraw) override
 draw the zone using WsfDraw
void DebugDrawCentroid (WsfDraw &aDraw) override
 draw the centroid using WsfDraw in an x
void DebugDrawBounds (WsfDraw &aDraw) override
 draw the bounding box using WsfDraw
ut::optional< UtColor > GetFillColor () const override
ut::optional< UtColor > GetLineColor () const override
const std::map< WsfStringId, double > & GetModifierList () const override
 Get the modifier list for WsfZoneAttenuation.
double ModifierValue (const std::string &aModifierName) const override
 returns the value of the modifier matching the given name
WsfStringId GetReferencedZoneName () const
WsfZoneGetReferencedZone () const
Public Member Functions inherited from WsfZone
 WsfZone ()
WsfZoneoperator= (const WsfZone &)=delete
 ~WsfZone () override=default
WsfComponentCloneComponent () const override
int GetComponentInitializationOrder () const override
WsfStringId GetComponentName () const override
const int * GetComponentRoles () const override
void * QueryInterface (int aRole) override
void ComponentParentChanged (WsfPlatform *aPlatformPtr) override
WsfPlatformGetPlatform () const
bool ProcessInput (UtInput &aInput) override
bool Initialize (double aSimTime) override
virtual double CheckIntersections (const double aLLA1[3], const double aLLA2[3])
virtual bool GetLatLonExtrema (double &aSouthernLat, double &aWesternLon, double &aNorthernLat, double &aEasternLon) const
void SetGlobalName (WsfStringId aGlobalName)
 Set the global model that this zone was cloned from.
WsfStringId GetGlobalName () const
virtual void DrawBounds (WsfDraw &aDraw)
virtual void DrawCentroid (WsfDraw &aDraw)
virtual void Draw (WsfDraw &aDraw)
virtual void DrawRelative (WsfDraw &aDraw, const double aEyePointWCS[3], const double aLookHeading)
virtual void DebugDrawZoneRelative (WsfDraw &aDraw, const double aEyePointWCS[3], const double aLookHeading)
bool IsInitialized () const
void SetFillColor (const std::string &aColor)
void SetFillColor (const UtColor &aColor)
void SetLineColor (const std::string &aColor)
void SetLineColor (const UtColor &aColor)
Public Member Functions inherited from WsfObject
 WsfObject ()
 This is the constructor for the WsfObject class.
 ~WsfObject () override
 This is the destructor for the WsfObject class.
const char * GetScriptClassName () const override
const std::string & GetType () const
WsfStringId GetTypeId () const
 Get the string ID of the 'type' of the object.
void SetType (WsfStringId aType)
const std::string & GetBaseType () const
WsfStringId GetBaseTypeId () const
const TypeListGetTypeList () const
bool IsA_TypeOf (WsfStringId aType) const
WsfObjectoperator= (const WsfObject &aRhs)
 Assignment operator.
template<typename T>
void Serialize (T &aBuff)
 For XIO (de)serialization.
const std::string & GetName () const
WsfStringId GetNameId () const
void SetName (WsfStringId aName)
Public Member Functions inherited from WsfComponentT< WsfPlatform >
 WsfComponentT ()
 WsfComponentT (const WsfComponentT &) noexcept
WsfComponentToperator= (const WsfComponentT &) noexcept
 ~WsfComponentT () override=default
ParentTypeGetComponentParent () const
void SetComponentParent (ParentType *aParentPtr)
Public Member Functions inherited from WsfComponent
virtual ~WsfComponent ()=default
template<typename T>
bool QueryInterfaceT (T *&aRolePtr)
bool ComponentHasRole (int aRole)
 Returns true if the component has the specified role.
virtual bool PreInitialize (double aSimTime)
virtual bool Initialize2 (double aSimTime)
virtual void PreInput ()
Public Member Functions inherited from WsfAuxDataEnabled
 WsfAuxDataEnabled ()=default
 WsfAuxDataEnabled (const WsfAuxDataEnabled &aSrc)=default
WsfAuxDataEnabledoperator= (const WsfAuxDataEnabled &aRhs)
 WsfAuxDataEnabled (WsfAuxDataEnabled &&)=default
WsfAuxDataEnabledoperator= (WsfAuxDataEnabled &&)=default
virtual ~WsfAuxDataEnabled () noexcept
void SetAuxData (const WsfAttributeContainer &aAuxData)
void DeleteAuxData ()
 Delete the aux data container from the object.
void MergeAuxData (const WsfAuxDataEnabled &aSrc)
 Merge the object's aux data with aux data from an existing object.
void UpdateAuxData (const WsfAuxDataEnabled &aSrc)
 Update the object's aux data with aux data from an existing object.
bool HasAuxData () const
 Returns true if this object has aux data.
bool ProcessInput (UtInput &aInput)
template<typename T>
void Serialize (T &aBuff)
 (De)serialization for XIO
WsfAttributeContainerGetAuxData ()
const WsfAttributeContainerGetAuxData () const noexcept
const WsfAttributeContainerGetAuxDataConst () const noexcept

Protected Member Functions

 WsfZoneReference (const WsfZoneReference &aSrc)
 Copy constructor.
 WsfZone (const WsfZone &aSrc)
 Copy constructor (for Clone()).
 WsfObject (const WsfObject &aSrc)
 Copy constructor (for Clone()).

Additional Inherited Members

Public Types inherited from WsfObject
typedef std::vector< WsfStringIdTypeList
 The list of types returned by GetTypeList.
Public Types inherited from WsfComponentT< WsfPlatform >
typedef WsfPlatform ParentType
 This is needed to support the WsfComponentList template.
Static Public Attributes inherited from WsfZone
static constexpr const char * cTYPE_KIND = "zone"
static constexpr double cUNSPECIFIED = 1.0E20
static constexpr double cHUGE = 9.9E20
static constexpr double cSMALL = -9.9E20
Static Public Attributes inherited from WsfAuxDataEnabled
static UtCallbackListN< void(const WsfAuxDataEnabled *)> AuxDataAccessed
static UtCallbackListN< void(const WsfAuxDataEnabled *)> AuxDataDestroyed
WsfPlatformmPlatformPtr
std::map< WsfStringId, double > mModifierList
double mMinAlt
double mMaxAlt
double mMinX
double mMaxX
double mMinY
double mMaxY
double mArea
Point mCentroid
bool mIsInitialized

Detailed Description

A reference (link) to a shared zone.

This class provides a mechanism to reference a shared zone. The referenced zone is expected to be static so the pointer is always valid. Any number of instances of this class may go in and out of scope, referring to the same Zone, but not affecting it in any way.

Constructor & Destructor Documentation

◆ WsfZoneReference() [1/3]

WsfZoneReference::WsfZoneReference ( )
delete

◆ WsfZoneReference() [2/3]

WsfZoneReference::WsfZoneReference ( const std::string & aSharedZoneName)

Constructor

Parameters
aSharedZoneNameThe name of the shared zone that will be referenced.

References WsfZone::WsfZone().

◆ ~WsfZoneReference()

WsfZoneReference::~WsfZoneReference ( )
overridedefault

References WsfZone::WsfZone().

◆ WsfZoneReference() [3/3]

WsfZoneReference::WsfZoneReference ( const WsfZoneReference & aSrc)
protected

Copy constructor.

References WsfZone::WsfZone(), and WsfZoneReference().

Member Function Documentation

◆ Area()

double WsfZoneReference::Area ( )
overridevirtual

return the area of the polygon

Reimplemented from WsfZone.

◆ Centroid()

WsfGeoPoint WsfZoneReference::Centroid ( )
overridevirtual

return the geopoint of the centroid

Reimplemented from WsfZone.

◆ Clone()

WsfZone * WsfZoneReference::Clone ( ) const
overridevirtual

The standard Clone() method (virtual copy constructor).

Implements WsfZone.

References WsfZone::WsfZone(), and WsfZoneReference().

◆ DebugDrawBounds()

void WsfZoneReference::DebugDrawBounds ( WsfDraw & aDraw)
overridevirtual

draw the bounding box using WsfDraw

Reimplemented from WsfZone.

◆ DebugDrawCentroid()

void WsfZoneReference::DebugDrawCentroid ( WsfDraw & aDraw)
overridevirtual

draw the centroid using WsfDraw in an x

Reimplemented from WsfZone.

◆ DebugDrawZone()

void WsfZoneReference::DebugDrawZone ( WsfDraw & aDraw)
overridevirtual

draw the zone using WsfDraw

Reimplemented from WsfZone.

◆ GetFillColor()

ut::optional< UtColor > WsfZoneReference::GetFillColor ( ) const
overridevirtual

Reimplemented from WsfZone.

◆ GetLineColor()

ut::optional< UtColor > WsfZoneReference::GetLineColor ( ) const
overridevirtual

Reimplemented from WsfZone.

◆ GetModifierList()

const std::map< WsfStringId, double > & WsfZoneReference::GetModifierList ( ) const
overridevirtual

Get the modifier list for WsfZoneAttenuation.

returns the list of modifiers

Reimplemented from WsfZone.

◆ GetReferencedZone()

WsfZone * WsfZoneReference::GetReferencedZone ( ) const
inline

References WsfZone::WsfZone().

◆ GetReferencedZoneName()

WsfStringId WsfZoneReference::GetReferencedZoneName ( ) const
inline

◆ Initialize()

void WsfZoneReference::Initialize ( const WsfScenario & aScenario)
overridevirtual

This method is called to initialize the zone for use. This form is called from scenario initialization for globally defined zones.

An empty zone to be used if the referenced zone does not exist

Reimplemented from WsfZone.

References WsfZoneDefinition::cCIRCULAR, WsfObjectTypeList< T >::Find(), WsfZoneTypes::Get(), WsfZone::Initialize(), WsfZone::mIsInitialized, WsfZoneDefinition::SetRadialBounds(), and WsfZoneDefinition::SetShapeType().

◆ MaxPoint()

void WsfZoneReference::MaxPoint ( double & aX,
double & aY,
double & aAlt )
overridevirtual

Reimplemented from WsfZone.

◆ MinPoint()

void WsfZoneReference::MinPoint ( double & aX,
double & aY,
double & aAlt )
overridevirtual

Reimplemented from WsfZone.

◆ ModifierValue()

double WsfZoneReference::ModifierValue ( const std::string & aModifierName) const
overridevirtual

returns the value of the modifier matching the given name

Reimplemented from WsfZone.

◆ operator=()

WsfZoneReference & WsfZoneReference::operator= ( const WsfZoneReference & )
delete

References WsfZoneReference().

◆ PointIsInside()

bool WsfZoneReference::PointIsInside ( WsfSimulation * aSimulationPtr,
const double aViewedPointWCS[3],
const double aEyePointWCS[3],
const double aLookHeading,
const double aDeltaDownRange = 0.0 )
overridevirtual

Is the point inside the zone?

Parameters
aSimulationPtrthe simulation
aViewedPointWCSthe point which is being tested for containment in the zone.
aEyePointWCSis the potential reference point for a relative Zone.
aLookHeadingthe current heading (for relative references)
aDeltaDownRangeis an (optional) delta to slide the Zone away from the eyepoint. (Used to adjust the Zone location for off-design conditions.)
Returns
'true' if the point is inside the Zone or 'false' otherwise.

Reimplemented from WsfZone.

◆ Reference()

WsfGeoPoint WsfZoneReference::Reference ( )
overridevirtual

return the geopoint of the reference point

Implements WsfZone.


The documentation for this class was generated from the following files:
Copyrights Multiple, All Rights Reserved