VR-Forces 4.3.1 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator 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  }
103 
104  //Is the cloud layer visible.
106 
107  //The type of cloud layer.
108  std::string myType;
109 
110  //Location
111  double myPosition[3];
112 
113  //Size
114  double myWidth;
115  double myLength;
116  double myThickness;
117 
118  //Parameters
119  float myDensity;
121  };
122 }
123 
125 
126 

Document ID: Generated on Wed Jul 29 00:55:00 EDT 2015 from SVN revision 155257
Copyright © 2005-2015 VT MÄK. All Rights Reserved (www.mak.com)