VR-Forces 4.8 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) 2013 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 
10 
11 #pragma once
12 
13 #include <vrvUtil/vrvUtil.h>
14 
15 #include <string>
16 #include <vector>
17 
18 namespace makVrv
19 {
20 
21 
27  {
28  public:
29 
31  typedef enum
32  {
33  CalmGlassy = 0,
43  MaxDouglasSeaScale
44 
45  } Scale;
46 
47  DtDouglasSeaState(unsigned int index = 0,
48  const std::string& name = std::string(""),
49  float minimum = 0.0, float maximum = 0.0);
50 
53 
56  static std::string convertIndexToName(unsigned int index);
57  static unsigned int convertNameToIndex(const std::string& name);
59 
63  static float convertIndexToWaveHeight(unsigned int index);
64  static unsigned int convertWaveHeightToIndex(float height);
66 
68 
69  private:
70  unsigned int myIndex;
71  std::string myName;
72  float myMinimum;
73  float myMaximum;
74 
75  typedef std::vector<DtDouglasSeaState> SeaStateList;
77  };
78 
79 
86  {
87  public:
91  {
92  public:
93  Swell(float length = 0, float height = 0);
94  Swell(const Swell& other);
95  Swell& operator =(const Swell& other);
96 
97  bool operator !=(const Swell& other) const;
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 
104  float length() const;
105  float height() const;
106 
107  private:
108  float myLength;
109  float myHeight;
110  };
111 
113  typedef enum
114  {
115  NoSwell = 0,
125  MaxDouglasSwellScale
126 
127  } Scale;
128 
129  DtDouglasSwellState(unsigned int index = 0,
130  const std::string& name = std::string(""), const Swell& value = Swell(),
131  const Swell& minimum = Swell(), const Swell& maximum = Swell());
132 
135 
138  static std::string convertIndexToName(unsigned int index);
139  static unsigned int convertNameToIndex(const std::string& name);
141 
145  static Swell convertIndexToSwell(unsigned int index);
146  static unsigned int convertSwellToIndex(const Swell& swell);
148 
150 
151  private:
152  unsigned int myIndex;
153  std::string myName;
157 
158  typedef std::vector<DtDouglasSwellState> SwellStateList;
160  };
161 
162 }
Definition: DtDouglasSeaScale.h:123
std::string myName
Definition: DtDouglasSeaScale.h:71
Definition: DtDouglasSeaScale.h:35
unsigned int myIndex
Definition: DtDouglasSeaScale.h:70
#define DT_DLL_VRVUTIL
Definition: vrvUtil.h:34
Definition: DtDouglasSeaScale.h:36
float myMaximum
Definition: DtDouglasSeaScale.h:73
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:26
Definition: DtDouglasSeaScale.h:34
Definition: DtDouglasSeaScale.h:117
Definition: DtDouglasSeaScale.h:122
Definition: DtDouglasSeaScale.h:121
float myMinimum
Definition: DtDouglasSeaScale.h:72
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:85
Definition: DtDouglasSeaScale.h:118
float myLength
Definition: DtDouglasSeaScale.h:108
Definition: DtDouglasSeaScale.h:119
std::string myName
Definition: DtDouglasSeaScale.h:153
Definition: DtDouglasSeaScale.h:42
Definition: DtDouglasSeaScale.h:124
std::vector< DtDouglasSwellState > SwellStateList
Definition: DtDouglasSeaScale.h:158
Definition: DtDouglasSeaScale.h:41
bool operator>(const DtObjectType &lhs, const DtSimulationModelSetLoader::EntityData &rhs)
Definition: simulationModelSetLoader.h:1236
Swell myValue
Definition: DtDouglasSeaScale.h:154
Definition: DtDouglasSeaScale.h:120
Definition: DtDouglasSeaScale.h:40
A class describing the profile of a sea-swell.
Definition: DtDouglasSeaScale.h:90
Definition: DtDouglasSeaScale.h:116
bool operator==(const DtTextureAtlasIndexParser::StringOrFloatAttrib &lhs, const DtTextureAtlasIndexParser::StringOrFloatAttrib &rhs)
needed for search comparison code
Definition: DtTextureAtlasIndexParser.h:153
float myHeight
Definition: DtDouglasSeaScale.h:109
Definition: DtDouglasSeaScale.h:37
static SeaStateList myStates
Definition: DtDouglasSeaScale.h:76
Swell myMinimum
Definition: DtDouglasSeaScale.h:155
DT_DLL_terrainCS bool operator!=(const DtDegMinSec &lhs, const DtDegMinSec &rhs)
unsigned int myIndex
Definition: DtDouglasSeaScale.h:152
Definition: DtDouglasSeaScale.h:39
std::vector< DtDouglasSeaState > SeaStateList
Definition: DtDouglasSeaScale.h:75
Definition: DtDouglasSeaScale.h:38

Document ID: Generated on Thu Aug 27 10:56:05 EDT 2020 from SVN revision 217100
Copyright © 2005-2020 MAK Technologies. All Rights Reserved (www.mak.com)