WSF
WsfStandardOpticalSignature.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 WSFSTANDARDOPTICALSIGNATURE_HPP
13#define WSFSTANDARDOPTICALSIGNATURE_HPP
14
15#include <memory>
16#include <vector>
17
18class UtAzElLookup;
19class UtAzElTable;
20#include "wsf_mil_export.h"
21
22#include "UtAzElTypes.hpp"
24
26
28{
29public:
30 static WsfOpticalSignature* ObjectFactory(const std::string& aTypeName);
31
33
34 WsfOpticalSignature* Clone() const override;
35
36 bool InitializeType() override;
37
38 std::vector<WsfStringId> GetStateNames() const override;
39
40 bool ProcessInput(UtInput& aInput) override;
41
42 float GetSignature(double aSimTime, WsfStringId aStateId, double aAzimuth, double aElevation) override;
43
44 class State
45 {
46 public:
47 State(WsfStringId aStateId, UtAzElTable* aTablePtr);
48
50 UtAzElTable* mTablePtr;
51 };
52
53 const std::vector<State>& GetStates() const;
54
55private:
56 using StateIndex = std::vector<State>::size_type;
57
58 class SharedData
59 {
60 using InterpolationType = ut::azel::InterpolationType;
61
62 public:
63 SharedData() = default;
64 ~SharedData();
65
66 bool InitializeType(WsfObject& aBase);
67
68 bool IsA_ValidState(WsfStringId aId) const;
69
70 bool ProcessInput(UtInput& aInput, WsfObject& aBase);
71
72 bool AddTable(UtAzElTable* aTablePtr, WsfStringId aStateId);
73
74 void SelectTable(UtAzElLookup& aContext, WsfStringId aStateId);
75
76 WsfStringId mCurrentStateId{"default"};
77 StateIndex mDefaultStateIndex{0};
78 std::vector<State> mStates;
79
80 bool mInterpolateTables{true};
81 InterpolationType mInterpolationType{InterpolationType::cLinear};
82 };
83
84 std::shared_ptr<SharedData> mSharedDataPtr{new SharedData()};
85};
86
87#endif
UtStringId WsfStringId
WsfStringId – the same thing as UtStringId.
Definition WsfStringId.hpp:23
WsfObject()
This is the constructor for the WsfObject class.
Definition WsfObject.cpp:88
WsfOpticalSignature * Clone() const override=0
virtual float GetSignature(double aSimTime, WsfStringId aStateId, double aAzimuth, double aElevation)=0
WsfOpticalSignature()
Definition WsfOpticalSignature.cpp:32
bool ProcessInput(UtInput &aInput) override
Definition WsfSignature.cpp:74
virtual bool InitializeType()
Definition WsfSignature.cpp:40
virtual std::vector< WsfStringId > GetStateNames() const
get the list of all valid states belonging to the signature
Definition WsfSignature.hpp:43
virtual bool IsA_ValidState(WsfStringId aId) const
Definition WsfSignature.cpp:62
State(WsfStringId aStateId, UtAzElTable *aTablePtr)
Definition WsfStandardOpticalSignature.cpp:270
WsfStringId mStateId
Definition WsfStandardOpticalSignature.hpp:49
UtAzElTable * mTablePtr
Definition WsfStandardOpticalSignature.hpp:50
static WsfOpticalSignature * ObjectFactory(const std::string &aTypeName)
Factory method called by WsfOpticalSignatureTypes.
Definition WsfStandardOpticalSignature.cpp:27
const std::vector< State > & GetStates() const
Definition WsfStandardOpticalSignature.cpp:89
bool ProcessInput(UtInput &aInput) override
Definition WsfStandardOpticalSignature.cpp:63
bool InitializeType() override
Definition WsfStandardOpticalSignature.cpp:46
Copyrights Multiple, All Rights Reserved