VR-Forces 5.0.3 Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtDouglasSeaScale.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2021 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 
10 
11 #pragma once
12 
13 #include <vrvUtil/vrvUtil.h>
14 
15 #include <vrvUtil/DtUnicode.h>
16 
17 #include <string>
18 #include <vector>
19 
20 namespace makVrv
21 {
22 
23 
29  {
30  public:
31 
33  enum class Scale
34  {
35  CalmGlassy = 0,
36  CalmRippled,
37  Smooth,
38  Slight,
39  Moderate,
40  Rough,
41  VeryRough,
42  High,
43  VeryHigh,
44  Phenomenal,
45  MaxDouglasSeaScale
46  };
47 
48  DtDouglasSeaState(DtDouglasSeaState::Scale enumIndex = Scale::CalmGlassy,
49  DtUnicode name = DtUnicode(),
50  float minimum = 0.0, float maximum = 0.0);
51 
54 
57  static DtUnicode convertIndexToName(DtDouglasSeaState::Scale index);
58  static DtDouglasSeaState::Scale convertNameToIndex(DtUnicode name);
60 
64  static float convertIndexToWaveHeight(DtDouglasSeaState::Scale index);
65  static DtDouglasSeaState::Scale convertWaveHeightToIndex(float height);
67 
69 
70  private:
73  float myMinimum;
74  float myMaximum;
75 
76  typedef std::vector<DtDouglasSeaState> SeaStateList;
78  };
79 
80 
87  {
88  public:
92  {
93  public:
94  Swell(float length = 0, float height = 0);
95  Swell(const Swell& other);
96  Swell& operator =(const Swell& other);
97 
98  bool operator !=(const Swell& other) const;
99  bool operator ==(const Swell& other) const;
100  bool operator >(const Swell& other) const;
101  bool operator >=(const Swell& other) const;
102  bool operator <(const Swell& other) const;
103  bool operator <=(const Swell& other) const;
104 
105  float length() const;
106  float height() const;
107 
108  private:
109  float myLength;
110  float myHeight;
111  };
112 
114  enum class Scale
115  {
116  NoSwell = 0,
117  VeryLow,
118  Low,
119  Light,
120  Moderate,
121  ModerateRough,
122  Rough,
123  High,
124  VeryHigh,
125  Confused,
126  MaxDouglasSwellScale
127  };
128 
129  DtDouglasSwellState(DtDouglasSwellState::Scale enumIndex = Scale::NoSwell,
130  DtUnicode name = DtUnicode(), const Swell& value = Swell(),
131  const Swell& minimum = Swell(), const Swell& maximum = Swell());
132 
135 
138  static DtUnicode convertIndexToName(DtDouglasSwellState::Scale index);
139  static DtDouglasSwellState::Scale convertNameToIndex(DtUnicode name);
141 
145  static Swell convertIndexToSwell(DtDouglasSwellState::Scale index);
146  static DtDouglasSwellState::Scale convertSwellToIndex(const Swell& swell);
148 
150 
151  private:
157 
158  typedef std::vector<DtDouglasSwellState> SwellStateList;
160  };
161 
162 }
DtUnicode myName
Definition: DtDouglasSeaScale.h:153
A unicode string. DtUnicode stores a UTF-16 encoded unicode string. Code Point, a Unicode character...
Definition: DtUnicode.h:33
#define DT_DLL_VRVUTIL
Definition: vrvUtil.h:34
float myMaximum
Definition: DtDouglasSeaScale.h:74
bool operator>(const DtTemporaryAgentManager::AgentParameters &lhs, const DtTemporaryAgentManager::AgentParameters &rhs)
Definition: DtTemporaryAgentManager.h:76
Swell myMaximum
Definition: DtDouglasSeaScale.h:156
The DtDouglasSeaState is a utility class for converting wave heights to/from the Douglas Sea Scale as...
Definition: DtDouglasSeaScale.h:28
DtUnicode myName
Definition: DtDouglasSeaScale.h:72
float myMinimum
Definition: DtDouglasSeaScale.h:73
Contains DLL export macros.
static SwellStateList myStates
Definition: DtDouglasSeaScale.h:159
The DtDouglasSwellState is a utility class for converting sea-swell lengths and heights to/from the D...
Definition: DtDouglasSeaScale.h:86
Scale
Definition: DtDouglasSeaScale.h:33
float myLength
Definition: DtDouglasSeaScale.h:109
Scale
Definition: DtDouglasSeaScale.h:114
std::vector< DtDouglasSwellState > SwellStateList
Definition: DtDouglasSeaScale.h:158
Swell myValue
Definition: DtDouglasSeaScale.h:154
DtDouglasSwellState::Scale myIndex
Definition: DtDouglasSeaScale.h:152
A class describing the profile of a sea-swell.
Definition: DtDouglasSeaScale.h:91
DtDouglasSeaState::Scale myIndex
Definition: DtDouglasSeaScale.h:71
bool operator==(const DtTextureAtlasIndexParser::StringOrFloatAttrib &lhs, const DtTextureAtlasIndexParser::StringOrFloatAttrib &rhs)
needed for search comparison code
Definition: DtTextureAtlasIndexParser.h:153
float myHeight
Definition: DtDouglasSeaScale.h:110
static SeaStateList myStates
Definition: DtDouglasSeaScale.h:77
Swell myMinimum
Definition: DtDouglasSeaScale.h:155
DT_DLL_terrainCS bool operator!=(const DtDegMinSec &lhs, const DtDegMinSec &rhs)
std::vector< DtDouglasSeaState > SeaStateList
Definition: DtDouglasSeaScale.h:76

Document ID: Generated on Thu Jun 1 17:58:13 EDT 2023 from SVN revision 255404
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)