WSF
WsfZoneSet.hpp
Go to the documentation of this file.
1// ****************************************************************************
2// CUI
3//
4// The Advanced Framework for Simulation, Integration, and Modeling (AFSIM)
5//
6// Copyright 2003-2015 The Boeing Company. All rights reserved.
7//
8// The use, dissemination or disclosure of data in this file is subject to
9// limitation or restriction. See accompanying README and LICENSE for details.
10// ****************************************************************************
11
12#ifndef WSFZONESET_HPP
13#define WSFZONESET_HPP
14
15#include "wsf_export.h"
16
17#include <vector>
18
19class GeoIntersectDatabase;
20class UtInput;
21class WsfDraw;
22class WsfGeoPoint;
23#include "WsfZone.hpp"
24
25namespace wsf
26{
27class Terrain;
28}
29
35{
36public:
37 WsfZoneSet();
38 WsfZoneSet& operator=(const WsfZoneSet&) = delete;
39 ~WsfZoneSet() override;
40
41 WsfZone* Clone() const override;
42
43 void Initialize(const WsfScenario& aScenario) override;
44 bool ProcessInput(UtInput& aInput) override;
45
46 bool PointIsInside(WsfSimulation* aSimulationPtr,
47 const double aViewedPointWCS[3],
48 const double aEyePointWCS[3],
49 const double aLookHeading,
50 const double aDeltaDownRange = 0.0) override;
51
52 WsfGeoPoint Reference() override;
53
54 WsfZone* GetZoneAtIndex(int aIndex);
55 int GetNumZones() const { return static_cast<int>(mZonePtrs.size()); }
56 WsfZone* GetExclusionZoneAtIndex(const int aIndex);
57 int GetNumExclusionZones() const { return static_cast<int>(mExclusionZonePtrs.size()); }
58
59 double CheckIntersections(const double aLLA1[3], const double aLLA2[3]) override;
60
61 void DebugDrawZone(WsfDraw& aDraw) override;
62 void DebugDrawCentroid(WsfDraw& aDraw) override;
63 void DebugDrawBounds(WsfDraw& aDraw) override;
64
65protected:
67 WsfZoneSet(const WsfZoneSet& aSrc);
68
69 bool ConstructZoneDatabase();
70
71private:
72 void CalculateBoundingBox();
73 void CalculateArea();
74 void CalculateCentroid();
75
76 std::vector<WsfZone*> mZonePtrs;
77 std::vector<WsfZone*> mExclusionZonePtrs;
78 GeoIntersectDatabase* mIntersectDBPtr;
79
80 // the following set of variables are used to reconstruct the intersect database as needed
81 WsfStringId mAttenuationFileName;
82 bool mUseDTED;
83 WsfStringId mHeightParameter;
84 double mConstHeight;
85 WsfStringId mBaseAltitudeParameter;
86 double mConstBaseAltitude;
87 bool mGeocentric;
88 bool mBaseAltitiudeIsAGL;
89 wsf::Terrain* mTerrainPtr;
90};
91
92#endif
UtStringId WsfStringId
WsfStringId – the same thing as UtStringId.
Definition WsfStringId.hpp:23
#define WSF_EXPORT
Definition WsfXIO_Export.hpp:35
Provides the capability to draw shapes into the WSF replay file.
Definition WsfDraw.hpp:35
Definition WsfGeoPoint.hpp:29
Contains the data required to create a simulation, and acts as the entry point for input file process...
Definition WsfScenario.hpp:111
The main controller for a simulation.
Definition WsfSimulation.hpp:109
Definition WsfZoneSet.hpp:35
WsfZoneSet & operator=(const WsfZoneSet &)=delete
int GetNumZones() const
Definition WsfZoneSet.hpp:55
WsfZoneSet()
Constructor.
Definition WsfZoneSet.cpp:56
int GetNumExclusionZones() const
Definition WsfZoneSet.hpp:57
WsfZone * GetZoneAtIndex(int aIndex)
Definition WsfZoneSet.cpp:337
Definition WsfZone.hpp:63
virtual void DebugDrawBounds(WsfDraw &aDraw)
Definition WsfZone.hpp:139
bool Initialize(double aSimTime) override
Definition WsfZone.cpp:123
virtual double CheckIntersections(const double aLLA1[3], const double aLLA2[3])
Definition WsfZone.hpp:114
virtual void DebugDrawZone(WsfDraw &aDraw)
Definition WsfZone.hpp:141
WsfZone()
Definition WsfZone.cpp:21
virtual WsfGeoPoint Reference()=0
WsfZone * Clone() const override=0
The standard Clone() method (virtual copy constructor).
virtual bool PointIsInside(WsfSimulation *aSimulationPtr, const double aViewedPointWCS[3], const double aEyePointWCS[3], const double aLookHeading, const double aDeltaDownRange=0.0)
Definition WsfZone.cpp:160
virtual void DebugDrawCentroid(WsfDraw &aDraw)
Definition WsfZone.hpp:140
bool ProcessInput(UtInput &aInput) override
Definition WsfZone.cpp:78
Definition WsfTerrain.hpp:336
Function definitions for those who need run-time access to the version.
Definition WsfComm.cpp:32
Copyrights Multiple, All Rights Reserved