![]() |
VR-Forces 4.0.4 Class Documentation
|
00001 /****************************************************************************** 00002 ** Copyright (c) 2008 MAK Technologies, Inc. 00003 ** All rights reserved. 00004 ******************************************************************************/ 00005 /****************************************************************************** 00006 ** $RCSfile: DtCloudLayerRecord.h,v $ $Revision: 1.4 $ $State: Exp $ 00007 ******************************************************************************/ 00008 00012 00013 #pragma once 00014 #include <makArchives/makArchives.h> 00015 00016 namespace makArchives 00017 { 00020 class DT_DLL_MAKARCHIVES DtCloudLayerRecord 00021 { 00022 public: 00024 DtCloudLayerRecord(); 00025 00027 DtCloudLayerRecord(const DtCloudLayerRecord& orig); 00028 00030 DtCloudLayerRecord& operator=(const DtCloudLayerRecord& orig); 00031 00033 ~DtCloudLayerRecord(); 00034 00035 //Test for equality. 00036 bool operator==(const DtCloudLayerRecord& other) const; 00037 00038 //Test for inequality. 00039 bool operator!=(const DtCloudLayerRecord& other) const; 00040 00041 //Is the cloud layer visible. 00042 void setEnabledFlag(bool enabled); 00043 bool enabledFlag() const; 00044 00045 //The type of cloud layer. 00046 void setType(const std::string& type ); 00047 const std::string& type() const; 00048 00049 //Location 00050 void setPosition(double x, double y, double z); 00051 void setPosition(double position[3]); 00052 00054 const double* position() const; 00055 00056 //Size 00057 void setWidth(double w); 00058 void setLength(double l); 00059 void setThickness(double t); 00060 00061 double width() const; 00062 double length() const; 00063 double thickness() const; 00064 00065 //Parameters 00066 void setDensity(float density); 00067 float density() const; 00068 00069 protected: 00070 00071 friend class boost::serialization::access; 00072 00076 template<class Archive> 00077 void serialize(Archive & ar, const unsigned int version) 00078 { 00079 ar & BOOST_SERIALIZATION_NVP(myEnabledFlag); 00080 ar & BOOST_SERIALIZATION_NVP(myType); 00081 00082 if(version < 1) 00083 { 00084 ar & boost::serialization::make_nvp("myOriginX", myPosition[0]); 00085 ar & boost::serialization::make_nvp("myOriginY", myPosition[1]); 00086 ar & boost::serialization::make_nvp("myAltitude", myPosition[2]); 00087 } 00088 else 00089 { 00090 ar & BOOST_SERIALIZATION_NVP(myPosition); 00091 } 00092 00093 ar & BOOST_SERIALIZATION_NVP(myWidth); 00094 ar & BOOST_SERIALIZATION_NVP(myLength); 00095 ar & BOOST_SERIALIZATION_NVP(myThickness); 00096 00097 ar & BOOST_SERIALIZATION_NVP(myDensity); 00098 } 00099 00100 //Is the cloud layer visible. 00101 bool myEnabledFlag; 00102 00103 //The type of cloud layer. 00104 std::string myType; 00105 00106 //Location 00107 double myPosition[3]; 00108 00109 //Size 00110 double myWidth; 00111 double myLength; 00112 double myThickness; 00113 00114 //Parameters 00115 float myDensity; 00116 }; 00117 } 00118 00119 BOOST_CLASS_VERSION(makArchives::DtCloudLayerRecord,1) 00120 00121