VR-Forces 4.10 Class Documentation
 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  typedef enum
34  {
35  CalmGlassy = 0,
45  MaxDouglasSeaScale
46 
47  } Scale;
48 
49  DtDouglasSeaState(unsigned int index = 0,
50  DtUnicode name = DtUnicode(),
51  float minimum = 0.0, float maximum = 0.0);
52 
55 
58  static DtUnicode convertIndexToName(unsigned int index);
59  static unsigned int convertNameToIndex(DtUnicode name);
61 
65  static float convertIndexToWaveHeight(unsigned int index);
66  static unsigned int convertWaveHeightToIndex(float height);
68 
70 
71  private:
72  unsigned int myIndex;
74  float myMinimum;
75  float myMaximum;
76 
77  typedef std::vector<DtDouglasSeaState> SeaStateList;
79  };
80 
81 
88  {
89  public:
93  {
94  public:
95  Swell(float length = 0, float height = 0);
96  Swell(const Swell& other);
97  Swell& operator =(const Swell& other);
98 
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  bool operator <=(const Swell& other) const;
105 
106  float length() const;
107  float height() const;
108 
109  private:
110  float myLength;
111  float myHeight;
112  };
113 
115  typedef enum
116  {
117  NoSwell = 0,
127  MaxDouglasSwellScale
128 
129  } Scale;
130 
131  DtDouglasSwellState(unsigned int index = 0,
132  DtUnicode name = DtUnicode(), const Swell& value = Swell(),
133  const Swell& minimum = Swell(), const Swell& maximum = Swell());
134 
137 
140  static DtUnicode convertIndexToName(unsigned int index);
141  static unsigned int convertNameToIndex(DtUnicode name);
143 
147  static Swell convertIndexToSwell(unsigned int index);
148  static unsigned int convertSwellToIndex(const Swell& swell);
150 
152 
153  private:
154  unsigned int myIndex;
159 
160  typedef std::vector<DtDouglasSwellState> SwellStateList;
162  };
163 
164 }
Definition: DtDouglasSeaScale.h:125
DtUnicode myName
Definition: DtDouglasSeaScale.h:155
Definition: DtDouglasSeaScale.h:37
A unicode string.
Definition: DtUnicode.h:33
unsigned int myIndex
Definition: DtDouglasSeaScale.h:72
#define DT_DLL_VRVUTIL
Definition: vrvUtil.h:34
Definition: DtDouglasSeaScale.h:38
float myMaximum
Definition: DtDouglasSeaScale.h:75
Swell myMaximum
Definition: DtDouglasSeaScale.h:158
The DtDouglasSeaState is a utility class for converting wave heights to/from the Douglas Sea Scale as...
Definition: DtDouglasSeaScale.h:28
Definition: DtDouglasSeaScale.h:36
Definition: DtDouglasSeaScale.h:119
DtUnicode myName
Definition: DtDouglasSeaScale.h:73
Definition: DtDouglasSeaScale.h:124
Definition: DtDouglasSeaScale.h:123
float myMinimum
Definition: DtDouglasSeaScale.h:74
Contains DLL export macros.
static SwellStateList myStates
Definition: DtDouglasSeaScale.h:161
The DtDouglasSwellState is a utility class for converting sea-swell lengths and heights to/from the D...
Definition: DtDouglasSeaScale.h:87
Definition: DtDouglasSeaScale.h:120
float myLength
Definition: DtDouglasSeaScale.h:110
Definition: DtDouglasSeaScale.h:121
Definition: DtDouglasSeaScale.h:44
Definition: DtDouglasSeaScale.h:126
std::vector< DtDouglasSwellState > SwellStateList
Definition: DtDouglasSeaScale.h:160
Definition: DtDouglasSeaScale.h:43
bool operator>(const DtObjectType &lhs, const DtSimulationModelSetLoader::EntityData &rhs)
Definition: simulationModelSetLoader.h:1292
Swell myValue
Definition: DtDouglasSeaScale.h:156
Definition: DtDouglasSeaScale.h:122
Definition: DtDouglasSeaScale.h:42
A class describing the profile of a sea-swell.
Definition: DtDouglasSeaScale.h:92
Definition: DtDouglasSeaScale.h:118
bool operator==(const DtTextureAtlasIndexParser::StringOrFloatAttrib &lhs, const DtTextureAtlasIndexParser::StringOrFloatAttrib &rhs)
needed for search comparison code
Definition: DtTextureAtlasIndexParser.h:153
float myHeight
Definition: DtDouglasSeaScale.h:111
Definition: DtDouglasSeaScale.h:39
static SeaStateList myStates
Definition: DtDouglasSeaScale.h:78
Swell myMinimum
Definition: DtDouglasSeaScale.h:157
DT_DLL_terrainCS bool operator!=(const DtDegMinSec &lhs, const DtDegMinSec &rhs)
unsigned int myIndex
Definition: DtDouglasSeaScale.h:154
Definition: DtDouglasSeaScale.h:41
std::vector< DtDouglasSeaState > SeaStateList
Definition: DtDouglasSeaScale.h:77
Definition: DtDouglasSeaScale.h:40

Document ID: Generated on Tue Sep 21 17:42:52 EDT 2021 from SVN revision 234861
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)