VR-Forces 4.8 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtProp.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2008 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 /******************************************************************************
6 ** $RCSfile: DtProp.h,v $ $Revision: 1.35 $ $State: Exp $
7 ******************************************************************************/
8 
12 
13 #ifndef DtProp_H_
14 #define DtProp_H_
15 
16 #include <vrvCore/vrvCore.h>
17 
19 #include <vrvCore/DtUniqueID.h>
20 
22 #include <string>
23 
24 #include <matrix/vlVector.h>
25 
26 namespace makVrv
27 {
28  class DtDe;
29  class DtModelAgent;
30  class DtSceneObjectAgent;
31  class DtScribeBoxModelAgent;
32  class DtAgentManagerInterface;
33  class DtTerrainTreeSettings;
34 
38  {
39  public:
40 
42  DtProp(DtDe& de, DtAgentManagerInterface& agentManagerInterface,
43  const std::string& propType, const std::string& name);
44 
45  private:
46 
48  DtProp(const DtProp& copy);
49 
51  DtProp& operator=(const DtProp& copy);
52 
53  public:
54 
56  virtual ~DtProp();
57 
59  void destroy();
60 
62  bool operator==(const DtProp& prop) const;
63 
65  bool getRecord(makArchives::DtPropRecord& recOut) const;
66 
68  void setFromRecord(const makArchives::DtPropRecord& rec);
69 
71  void setColorFilter(float r, float g, float b, float a);
72 
74  void setVisible(bool isVisible);
75 
77  void setScribed(bool isSelected);
78 
80  bool scribed() const;
81 
83 
85  DtUniqueID uniqueID() const;
86 
88  void getPosition(double& x, double& y, double& z) const;
89 
91  void setPosition(double x, double y, double z);
92 
94  void getOrientation(double& x, double& y, double& z, double& w) const;
95 
97  void setOrientation(double x, double y, double z, double w);
98 
100  void setOrientation(double psi, double theta, double phi);
101 
103  const std::string& propType() const;
104 
106  void setPropType(const std::string& proptype);
107 
109  const std::string& modelDefinition() const;
110 
112  void setModelDefinition(const std::string& modelDefinition);
113 
115  void setExternalNodeLocation(const std::string& searchExpression, unsigned int index);
116 
118  const std::string& searchExp() const;
119 
121  unsigned int searchIndex() const;
122 
124  void setTerrainTreeSettings(DtTerrainTreeSettings* terrainTreeSettings);
125 
127  const DtTerrainTreeSettings* terrainTreeSettings(void) const;
128 
130  float red() const;
132  float green() const;
133  float blue() const;
134  float alpha() const;
136 
138  const std::string& name() const;
139 
141  void setName(const std::string& name);
142 
143  bool isVisible() const;
144 
146  const DtSceneObjectAgent* sceneObject() const;
149 
151  DtSceneObjectAgent* sceneObject();
154 
156  const DtModelAgent* model() const;
157 
159  DtModelAgent* model();
160 
162  bool operator!=(const DtProp& prop) const;
163 
164  protected:
165 
169  friend class DtTerrainLayer;
170 
171  virtual void selectionChanged( const DtSelectionManager::IdSet& selected,
172  const DtSelectionManager::IdSet& deselected );
173 
174  protected:
175 
177 
178  std::string myPropType;
179  DtSceneObjectAgent* mySceneObject;
180  DtModelAgent* myObjectModel;
181  DtScribeBoxModelAgent* myScribeBoxModel;
182 
184  std::string myModelDefinition;
185 
187  std::string mySearchExp;
188  unsigned int mySearchIndex;
189 
191  std::string myName;
192 
195 
197  float myAlpha;
198  float myR;
199  float myG;
200  float myB;
201 
206  double myPosX;
207  double myPosY;
208  double myPosZ;
209 
210  //The Loaded orientation quaternion (x,y,z,w).
215 
216  //Runtime state.
218 
220 
222  };
223 
224 }
225 
226 #endif
227 
double myOrientationX
Definition: DtProp.h:211
bool myIsTreeFlag
Definition: DtProp.h:217
float myR
Definition: DtProp.h:198
float myAlpha
Color components.
Definition: DtProp.h:197
double myPosX
Position set by DtPropRecord on load.
Definition: DtProp.h:206
DtSceneObjectAgent * mySceneObject
Definition: DtProp.h:179
DtScribeBoxModelAgent * myScribeBoxModel
Definition: DtProp.h:181
Contains makVrv:DtSelectionManager class.
bool myIsVisible
Whether the prop is visible.
Definition: DtProp.h:194
The DtTerrainlayer is the base implementation of a layer of data which makes up the terrain...
Definition: DtTerrainLayer.h:36
DtDe & myDe
Definition: DtProp.h:176
Contains makArchives::DtPropRecord class.
Facade object for a scene prop.
Definition: DtProp.h:37
std::string myPropType
Definition: DtProp.h:178
DtModelAgent * myObjectModel
Definition: DtProp.h:180
float myG
Definition: DtProp.h:199
DtAgentManagerInterface & myAgentManagerInterface
Definition: DtProp.h:221
unsigned int mySearchIndex
Definition: DtProp.h:188
double myPosZ
Definition: DtProp.h:208
A DtPropRecord contains the information to recreate a prop.
Definition: DtPropRecord.h:22
#define DT_DLL_VRVCORE
Definition: vrvCore.h:20
unsigned long long DtUniqueID
Definition: DtUniqueID.h:22
double myOrientationW
Definition: DtProp.h:214
DtTerrainTreeSettings * myTerrainTreeSettings
Definition: DtProp.h:219
bool operator==(const DtTextureAtlasIndexParser::StringOrFloatAttrib &lhs, const DtTextureAtlasIndexParser::StringOrFloatAttrib &rhs)
needed for search comparison code
Definition: DtTextureAtlasIndexParser.h:153
double myOrientationZ
Definition: DtProp.h:213
Contains makVrv::DtUniqueID type.
double myOrientationY
Definition: DtProp.h:212
The abstract interface necessary for agents.
Definition: DtAgentManagerInterface.h:36
std::string myModelDefinition
The model definition.
Definition: DtProp.h:184
float myB
Definition: DtProp.h:200
Class for setting and maintaining state for user-modifiable TerrainTree settings All of the TerrainTr...
Definition: DtTerrainTreeSettings.h:28
The DtDe is the core component of any VR-Vantage application.
Definition: DtDe.h:69
DT_DLL_terrainCS bool operator!=(const DtDegMinSec &lhs, const DtDegMinSec &rhs)
std::string myName
The prop&#39;s unique name.
Definition: DtProp.h:191
std::string mySearchExp
The expression that was used to find the prop.
Definition: DtProp.h:187
double myPosY
Definition: DtProp.h:207
std::set< DtUniqueID > IdSet
Definition: DtSelectionManager.h:32
Contains DLL export macros.

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)