15#include "wsf_export.h"
20#include "UtCallback.hpp"
144 void BeginIcons(
double aHeading,
const std::string& aIconName =
"Wedge");
145 void BeginEllipse(
double aHeading,
double aSemiMinor,
double aSemiMajor);
146 void BeginEllipsoid(
double aHeading,
double aPitch,
double aRoll,
double aRadiusA,
double aRadiusB,
double aRadiusC);
148 void BeginText(
const std::string& aText);
155 void SetId(
unsigned int aId) { mID = aId; }
157 unsigned int GetNewId();
199 void SetColor(
const UtColor& aColor) { mCurrentColor = aColor; }
202 const UtColor&
GetColor()
const {
return mCurrentColor; }
205 void SetColor(
double aRed,
double aGreen,
double aBlue,
double aAlpha = 1.0)
207 mCurrentColor.Set((
float)aRed, (
float)aGreen, (
float)aBlue, (
float)aAlpha);
210 void SetTarget(
const std::string& aTarget);
212 void SetLayer(
const std::string& aLayer);
214 void Erase(
unsigned int aId);
222 static std::unique_ptr<UtScriptClass> CreateScriptClass(
const std::string& aClassName, UtScriptTypes* aScriptTypesPtr);
236 unsigned int EventCount()
const {
return (
unsigned int)mEvents.size(); }
241 void VertexLLA(
double aLat,
double aLon,
double aAlt);
242 void VertexWCS(
const double aWCS[3]);
244 void VertexECS(
WsfPlatform& aPlatform,
double aLocationECS[3]);
245 void VertexNED(
WsfPlatform& aPlatform,
double aLocationNED[3]);
246 void VertexScreen(
const double aLocation[3]);
247 void VertexScreenPlat(
WsfPlatform& aPlatform,
double aLocation[3]);
255 void AddVertex(
const VertexObject& aVertex);
259 void SetCurrentState(DrawEvent& aEvent);
261 UtColor mCurrentColor;
270 double mCurrentHeading;
271 double mCurrentPitch;
273 double mCurrentAxisA;
274 double mCurrentAxisB;
275 double mCurrentAxisC;
276 std::vector<DrawEvent> mEvents;
277 std::string mCurrentText;
278 std::string mCurrentIconName;
282 BeginState mBeginState;
283 std::vector<VertexObject> mVertexBuffer;
309 const std::string& aTarget,
310 const std::string& aLayer,
311 std::vector<WsfDraw::DrawEvent>& aEvents);
333 void WriteToFile(
double aSimTime,
334 const std::string& aTarget,
335 const std::string& aLayer,
336 std::vector<WsfDraw::DrawEvent>& aEvents);
338 void Start()
override;
340 unsigned int mNextNewId;
341 std::vector<DrawCommand> mDrawCommands;
342 std::ofstream* mDrawFilePtr;
343 std::string mDrawFilePath;
UtStringId WsfStringId
WsfStringId – the same thing as UtStringId.
Definition WsfStringId.hpp:23
#define WSF_EXPORT
Definition WsfXIO_Export.hpp:35
WsfCloneableSimulationExtension()=default
Definition WsfDraw.hpp:290
WsfDrawManager & operator=(const WsfDrawManager &)=delete
void SendDrawUpdate(double aSimTime, const std::string &aTarget, const std::string &aLayer, std::vector< WsfDraw::DrawEvent > &aEvents)
Definition WsfDraw.cpp:168
UtCallbackListN< void(const std::string &, const std::string &, const WsfDraw::DrawEventList &)> DrawUpdate
Definition WsfDraw.hpp:306
WsfDrawManager * Clone() const override
Definition WsfDraw.cpp:386
unsigned int GetNewId()
Definition WsfDraw.hpp:302
WsfDrawManager()
Definition WsfDraw.cpp:66
bool ProcessInput(UtInput &aInput) override
Definition WsfDraw.cpp:91
static WsfDrawManager * Find(const WsfSimulation &aSimulation)
Definition WsfDraw.cpp:61
int GetLineStyle() const
Gets the style of lines drawn with DrawLine().
Definition WsfDraw.hpp:184
static double cFOREVER
Definition WsfDraw.hpp:37
std::string GetTarget() const
Definition WsfDraw.hpp:232
std::vector< DrawEvent > DrawEventList
Definition WsfDraw.hpp:132
double GetCurrentPitch() const
Definition WsfDraw.hpp:226
const UtColor & GetColor() const
Gets the color used to draw items.
Definition WsfDraw.hpp:202
DrawType
Definition WsfDraw.hpp:67
@ cNONE
Definition WsfDraw.hpp:77
@ cQUADRILATERAL
Definition WsfDraw.hpp:74
@ cPOINT
Definition WsfDraw.hpp:69
@ cTIMER
Definition WsfDraw.hpp:76
@ cELLIPSOID
Definition WsfDraw.hpp:73
@ cLINE
Definition WsfDraw.hpp:68
@ cTEXT
Definition WsfDraw.hpp:75
@ cELLIPSE
Definition WsfDraw.hpp:71
@ cICON
Definition WsfDraw.hpp:70
@ cERASE
Definition WsfDraw.hpp:72
VertexType
Definition WsfDraw.hpp:81
@ cRELATIVE_ECS
Definition WsfDraw.hpp:85
@ cRELATIVE_NED
Definition WsfDraw.hpp:86
@ cRELATIVE_ZERO
Definition WsfDraw.hpp:84
@ cUNSET_VERTEX
Definition WsfDraw.hpp:82
@ cABSOLUTE_SCREEN
Definition WsfDraw.hpp:87
@ cABSOLUTE_WCS
Definition WsfDraw.hpp:83
void SetTextSize(int aSize)
Sets the size of text.
Definition WsfDraw.hpp:172
void BeginEllipsoid(double aHeading, double aPitch, double aRoll, double aRadiusA, double aRadiusB, double aRadiusC)
Begin ellipsoid drawing mode. Draws a 3D ellipsoid at each vertex given by the following Vertex() com...
Definition WsfDraw.cpp:544
void SetId(WsfStringId aId)
Sets the ID given to items drawn.
Definition WsfDraw.hpp:160
int GetEllipseMode() const
Gets the style of an ellipse or ellipsoid.
Definition WsfDraw.hpp:196
double GetCurrentHeading() const
Definition WsfDraw.hpp:225
int GetTimerSize() const
Gets the size of points drawn with DrawPoint().
Definition WsfDraw.hpp:190
void SetLineStyle(LineStyle aStyle)
Sets the style of lines drawn with DrawLine().
Definition WsfDraw.hpp:181
void BeginPolyline()
Definition WsfDraw.cpp:509
void BeginLines()
Begins line drawing mode. Draws a line segment between each pair of Vertexes given by following Verte...
Definition WsfDraw.cpp:501
double GetCurrentAxisC() const
Definition WsfDraw.hpp:230
void SetLineSize(int aSize)
Sets the size (width) of lines drawn with DrawLine().
Definition WsfDraw.hpp:175
int GetUniqueId() const
Definition WsfDraw.hpp:234
void BeginEllipse(double aHeading, double aSemiMinor, double aSemiMajor)
Definition WsfDraw.cpp:532
double GetCurrentAxisB() const
Definition WsfDraw.hpp:229
void SetDuration(double aDuration)
Definition WsfDraw.hpp:218
WsfDraw(WsfDrawManager *aManagerPtr)
Definition WsfDraw.cpp:431
void SetEllipseMode(EllipseMode aMode)
Sets the style of an ellipse or ellipsoid.
Definition WsfDraw.hpp:193
void SetColor(double aRed, double aGreen, double aBlue, double aAlpha=1.0)
Sets the color used to draw items.
Definition WsfDraw.hpp:205
static WsfDrawManager * GetDrawManager(WsfSimulation &aSimulation)
Definition WsfDraw.cpp:930
WsfDraw & operator=(const WsfDraw &)=delete
LineStyle
Styles available for drawn lines.
Definition WsfDraw.hpp:56
@ cDASH_DOT
Definition WsfDraw.hpp:61
@ cDOTTED2
Definition WsfDraw.hpp:60
@ cDASH_DOT2
Definition WsfDraw.hpp:62
@ cDASHED
Definition WsfDraw.hpp:57
@ cLONG_DASHED
Definition WsfDraw.hpp:58
@ cSOLID
Definition WsfDraw.hpp:63
@ cDOTTED
Definition WsfDraw.hpp:59
void BeginPoints()
Begins point drawing mode. Draws a point at each vertex given by following Vertex() commands.
Definition WsfDraw.cpp:516
void SetTimerSize(int aSize)
Sets the size of timers drawn with DrawPoint().
Definition WsfDraw.hpp:187
void SetId(unsigned int aId)
Changes the ID assigned to new draw items. The sole purpose of Id is the Erase() method.
Definition WsfDraw.hpp:155
void BeginText(const std::string &aText)
Definition WsfDraw.cpp:567
std::string GetCurrentIconName() const
Definition WsfDraw.hpp:231
void SetColor(const UtColor &aColor)
Sets the color used to draw items.
Definition WsfDraw.hpp:199
static const unsigned int cSTRING_ID_MASK
Definition WsfDraw.hpp:38
int GetPointSize() const
Gets the size of points drawn with DrawPoint().
Definition WsfDraw.hpp:169
const DrawEvent & GetEvent(unsigned int aIndex) const
Definition WsfDraw.hpp:237
std::string GetLayer() const
Definition WsfDraw.hpp:233
void End()
Completes a drawing mode initiated with a Begin method.
Definition WsfDraw.cpp:582
void SetPointSize(int aSize)
Sets the size of points drawn with DrawPoint().
Definition WsfDraw.hpp:166
void BeginIcons(double aHeading, const std::string &aIconName="Wedge")
Begins icon drawing mode. Draws an icon each vertex given by following Vertex() commands.
Definition WsfDraw.cpp:523
BeginState
Definition WsfDraw.hpp:41
@ cBEGIN_ELLIPSOID
Definition WsfDraw.hpp:48
@ cBEGIN_NONE
Definition WsfDraw.hpp:42
@ cBEGIN_ELLIPSE
Definition WsfDraw.hpp:47
@ cBEGIN_POLYLINE
Definition WsfDraw.hpp:44
@ cBEGIN_ICONS
Definition WsfDraw.hpp:46
@ cBEGIN_QUADRILATERAL
Definition WsfDraw.hpp:49
@ cBEGIN_TEXT
Definition WsfDraw.hpp:50
@ cBEGIN_POINTS
Definition WsfDraw.hpp:45
@ cBEGIN_LINES
Definition WsfDraw.hpp:43
@ cBEGIN_TIMER
Definition WsfDraw.hpp:51
void BeginTimer()
Definition WsfDraw.cpp:575
double GetCurrentAxisA() const
Definition WsfDraw.hpp:228
unsigned int EventCount() const
Definition WsfDraw.hpp:236
double GetCurrentRoll() const
Definition WsfDraw.hpp:227
int GetLineSize() const
Gets the size (width) of lines drawn with DrawLine().
Definition WsfDraw.hpp:178
BeginState GetBeginState() const
Definition WsfDraw.hpp:152
double GetDuration() const
Definition WsfDraw.hpp:220
void BeginQuadrilateral()
Definition WsfDraw.cpp:561
EllipseMode
Definition WsfDraw.hpp:91
@ cELLIPSE_FILL
Definition WsfDraw.hpp:92
@ cELLIPSE_LINE
Definition WsfDraw.hpp:93
int GetId() const
Sets the ID given to items drawn.
Definition WsfDraw.hpp:163
The WSF Ext is code which is shared between common external interfaces like DIS and HLA.
Definition WsfExtInterface.hpp:183
A collection of WsfWaypoint objects that represent a path to be followed.
Definition WsfRoute.hpp:40
friend class WsfSimulation
Definition WsfSimulationExtension.hpp:43
The main controller for a simulation.
Definition WsfSimulation.hpp:109
Definition WsfStringId.hpp:29
Definition WsfDraw.hpp:111
VertexObject mVerts[4]
Definition WsfDraw.hpp:115
float mAxisA
Definition WsfDraw.hpp:127
unsigned int mID
Definition WsfDraw.hpp:113
std::string mIcon
Definition WsfDraw.hpp:121
int mEllipseMode
Definition WsfDraw.hpp:123
float mAxisC
Definition WsfDraw.hpp:129
float mRoll
Definition WsfDraw.hpp:126
int mLineStyle
Definition WsfDraw.hpp:120
float mAxisB
Definition WsfDraw.hpp:128
int mLineSize
Definition WsfDraw.hpp:117
int mTextSize
Definition WsfDraw.hpp:119
float mDuration
Definition WsfDraw.hpp:116
UtColor mColor
Definition WsfDraw.hpp:114
DrawType mDrawType
Definition WsfDraw.hpp:112
float mHeading
Definition WsfDraw.hpp:124
int mPointSize
Definition WsfDraw.hpp:118
float mPitch
Definition WsfDraw.hpp:125
std::string mText
Definition WsfDraw.hpp:122
Represents a vertex for a drawn item.
Definition WsfDraw.hpp:98
VertexObject()
Definition WsfDraw.hpp:99
size_t mPlatformIndex
Definition WsfDraw.hpp:106
VertexType mVertexType
Definition WsfDraw.hpp:105
UtVec3d mPosition
Definition WsfDraw.hpp:107