VR-Forces 4.1 Class Documentation
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  //The type of cloud layer.
46  void setType(const std::string& type );
47  const std::string& type() const;
48 
49  //Location
50  void setPosition(double x, double y, double z);
51  void setPosition(double position[3]);
52 
54  const double* position() const;
55 
56  //Size
57  void setWidth(double w);
58  void setLength(double l);
59  void setThickness(double t);
60 
61  double width() const;
62  double length() const;
63  double thickness() const;
64 
65  //Parameters
66  void setDensity(float density);
67  float density() const;
68 
69  protected:
70 
71  friend class boost::serialization::access;
72 
76  template<class Archive>
77  void serialize(Archive & ar, const unsigned int version)
78  {
79  ar & BOOST_SERIALIZATION_NVP(myEnabledFlag);
80  ar & BOOST_SERIALIZATION_NVP(myType);
81 
82  if(version < 1)
83  {
84  ar & boost::serialization::make_nvp("myOriginX", myPosition[0]);
85  ar & boost::serialization::make_nvp("myOriginY", myPosition[1]);
86  ar & boost::serialization::make_nvp("myAltitude", myPosition[2]);
87  }
88  else
89  {
90  ar & BOOST_SERIALIZATION_NVP(myPosition);
91  }
92 
93  ar & BOOST_SERIALIZATION_NVP(myWidth);
94  ar & BOOST_SERIALIZATION_NVP(myLength);
95  ar & BOOST_SERIALIZATION_NVP(myThickness);
96 
97  ar & BOOST_SERIALIZATION_NVP(myDensity);
98  }
99 
100  //Is the cloud layer visible.
102 
103  //The type of cloud layer.
104  std::string myType;
105 
106  //Location
107  double myPosition[3];
108 
109  //Size
110  double myWidth;
111  double myLength;
112  double myThickness;
113 
114  //Parameters
115  float myDensity;
116  };
117 }
118 
120 
121 

Document ID: Generated on Tue Jan 29 18:21:16 EST 2013 from SVN revision 123193
Copyright © 2005-2013 VT MÄK Inc. All Rights Reserved (www.mak.com)