VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtPropRecord.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2008 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 
9 
10 #ifndef DtPropRecord_H_
11 #define DtPropRecord_H_
12 
14 
15 namespace makArchives
16 {
20  {
21  public:
22 
24  DtPropRecord();
25 
27  ~DtPropRecord();
28 
30  DtPropRecord(const DtPropRecord& orig);
31 
32  bool operator==(const DtPropRecord& orig) const;
33  bool operator!=(const DtPropRecord& orig) const;
34 
36  DtPropRecord& operator=(const DtPropRecord& orig);
37 
39  void setName(const std::string& name);
40 
42  const std::string& name() const;
43 
45  void setPosition(double x, double y, double z);
46 
48  void getPosition(double& xOut, double& yOut, double& zOut) const;
49 
51  void setOrientation(double x, double y, double z, double w);
52 
54  void getOrientation(double& xOut, double& yOut, double& zOut, double& wOut) const;
55 
57  void setPropType(const std::string& propType);
58 
60  const std::string& propType() const;
61 
63  void setModelDefOrNodeAddress(const std::string& modelDefOrNodeAddress);
64 
66  const std::string& modelDefOrNodeAddress() const;
67 
69  void setIsModelDef(bool bIsModelDef);
70 
72  bool isModelDef() const;
73 
75  void setColor(float r,float g, float b,float alpha);
76 
78  void getColor(float& r,float& g, float& b,float& alpha) const;
79 
81  void setIsVisible(bool flag);
82 
84  bool isVisible() const;
85 
86  protected:
87 
89  friend class boost::serialization::access;
90 
94  template<class Archive>
95  void serialize(Archive & ar, const unsigned int version)
96  {
97  ar & BOOST_SERIALIZATION_NVP(myName);
98  ar & BOOST_SERIALIZATION_NVP(myPosX);
99  ar & BOOST_SERIALIZATION_NVP(myPosY);
100  ar & BOOST_SERIALIZATION_NVP(myPosZ);
101  ar & BOOST_SERIALIZATION_NVP(myOrientationX);
102  ar & BOOST_SERIALIZATION_NVP(myOrientationY);
103  ar & BOOST_SERIALIZATION_NVP(myOrientationZ);
104  ar & BOOST_SERIALIZATION_NVP(myOrientationW);
105  ar & BOOST_SERIALIZATION_NVP(myPropType);
106  ar & BOOST_SERIALIZATION_NVP(myModelDefOrNodeAddress);
107  ar & BOOST_SERIALIZATION_NVP(myIsModelDefFlag);
108  ar & BOOST_SERIALIZATION_NVP(myColorR);
109  ar & BOOST_SERIALIZATION_NVP(myColorG);
110  ar & BOOST_SERIALIZATION_NVP(myColorB);
111  ar & BOOST_SERIALIZATION_NVP(myColorA);
112  ar & BOOST_SERIALIZATION_NVP(myIsVisible);
113  }
114 
115  protected:
116 
117  std::string myName;
118 
119  double myPosX;
120  double myPosY;
121  double myPosZ;
126  std::string myPropType;
129  float myColorR;
130  float myColorG;
131  float myColorB;
132  float myColorA;
134 
135  };
136 
137  typedef std::vector<DtPropRecord> DtPropRecords;
138 }
139 
140 #endif
141 
std::string myPropType
Definition: DtPropRecord.h:126
std::vector< DtPropRecord > DtPropRecords
Definition: DtPropRecord.h:137
DT_DLL_terrainCS bool operator==(const DtDegMinSec &lhs, const DtDegMinSec &rhs)
float myColorR
Definition: DtPropRecord.h:129
double myOrientationY
Definition: DtPropRecord.h:123
double myOrientationW
Definition: DtPropRecord.h:125
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: DtPropRecord.h:95
Contains DLL export macros.
double myPosY
Definition: DtPropRecord.h:120
bool myIsModelDefFlag
Definition: DtPropRecord.h:128
float myColorA
Definition: DtPropRecord.h:132
float myColorB
Definition: DtPropRecord.h:131
A DtPropRecord contains the information to recreate a prop.
Definition: DtPropRecord.h:19
std::string myName
Definition: DtPropRecord.h:117
double myOrientationZ
Definition: DtPropRecord.h:124
float myColorG
Definition: DtPropRecord.h:130
std::string myModelDefOrNodeAddress
Definition: DtPropRecord.h:127
double myOrientationX
Definition: DtPropRecord.h:122
DT_DLL_terrainCS bool operator!=(const DtDegMinSec &lhs, const DtDegMinSec &rhs)
bool myIsVisible
Definition: DtPropRecord.h:133
double myPosX
Definition: DtPropRecord.h:119
double myPosZ
Definition: DtPropRecord.h:121
#define DT_DLL_MAKARCHIVES
Definition: makArchives.h:31

Document ID: Generated on Tue Sep 24 19:28:17 EDT 2024 from SVN revision 269799
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)