VR-Forces 4.8 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtCloudLayerRecord.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2008 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 /******************************************************************************
6 ** $RCSfile: DtCloudLayerRecord.h,v $ $Revision: 1.4 $ $State: Exp $
7 ******************************************************************************/
8 
12 
13 #pragma once
15 
16 namespace makArchives
17 {
21  {
22  public:
25 
28 
30  DtCloudLayerRecord& operator=(const DtCloudLayerRecord& orig);
31 
34 
35  //Test for equality.
36  bool operator==(const DtCloudLayerRecord& other) const;
37 
38  //Test for inequality.
39  bool operator!=(const DtCloudLayerRecord& other) const;
40 
41  //Is the cloud layer visible.
42  void setEnabledFlag(bool enabled);
43  bool enabledFlag() const;
44 
45  // Does the cloud layer extend forever
46  void setInfiniteFlag(bool infinite);
47  bool infiniteFlag() const;
48 
49  //The type of cloud layer.
50  void setType(const std::string& type );
51  const std::string& type() const;
52 
53  //Location
54  void setPosition(double x, double y, double z);
55  void setPosition(double position[3]);
56 
58  const double* position() const;
59 
60  //Size
61  void setWidth(double w);
62  void setLength(double l);
63  void setThickness(double t);
64 
65  double width() const;
66  double length() const;
67  double thickness() const;
68 
69  //Parameters
70  void setDensity(float density);
71  float density() const;
72 
73  protected:
74 
75  friend class boost::serialization::access;
76 
80  template<class Archive>
81  void serialize(Archive & ar, const unsigned int version)
82  {
83  ar & BOOST_SERIALIZATION_NVP(myEnabledFlag);
84  ar & BOOST_SERIALIZATION_NVP(myType);
85 
86  if(version < 1)
87  {
88  ar & boost::serialization::make_nvp("myOriginX", myPosition[0]);
89  ar & boost::serialization::make_nvp("myOriginY", myPosition[1]);
90  ar & boost::serialization::make_nvp("myAltitude", myPosition[2]);
91  }
92  else
93  {
94  ar & BOOST_SERIALIZATION_NVP(myPosition);
95  }
96 
97  ar & BOOST_SERIALIZATION_NVP(myWidth);
98  ar & BOOST_SERIALIZATION_NVP(myLength);
99  ar & BOOST_SERIALIZATION_NVP(myThickness);
100 
101  ar & BOOST_SERIALIZATION_NVP(myDensity);
102  if (version > 1)
103  {
104  ar & BOOST_SERIALIZATION_NVP(myInfiniteFlag);
105  }
106  }
107 
108  //Is the cloud layer visible.
110 
111  //The type of cloud layer.
112  std::string myType;
113 
114  //Location
115  double myPosition[3];
116 
117  //Size
118  double myWidth;
119  double myLength;
120  double myThickness;
121 
122  //Parameters
123  float myDensity;
125  };
126 }
127 
129 
130 
double myLength
Definition: DtCloudLayerRecord.h:119
double myThickness
Definition: DtCloudLayerRecord.h:120
float myDensity
Definition: DtCloudLayerRecord.h:123
double myWidth
Definition: DtCloudLayerRecord.h:118
DT_DLL_terrainCS bool operator==(const DtDegMinSec &lhs, const DtDegMinSec &rhs)
Contains DLL export macros.
BOOST_CLASS_VERSION(makArchives::DtDiGuySettingsRecord, 2)
void serialize(Archive &ar, const unsigned int version)
When the class Archive corresponds to an output archive, the &amp; operator is defined similar to &lt;&lt;...
Definition: DtCloudLayerRecord.h:81
Record of a single cloud layer&#39;s settings.
Definition: DtCloudLayerRecord.h:20
std::string myType
Definition: DtCloudLayerRecord.h:112
bool myInfiniteFlag
Definition: DtCloudLayerRecord.h:124
bool myEnabledFlag
Definition: DtCloudLayerRecord.h:109
DT_DLL_terrainCS bool operator!=(const DtDegMinSec &lhs, const DtDegMinSec &rhs)
#define DT_DLL_MAKARCHIVES
Definition: makArchives.h:31

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)