VR-Forces Developer's Guide
 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 
9 
10 #ifndef DtProp_H_
11 #define DtProp_H_
12 
13 #include <vrvCore/vrvCore.h>
14 
16 #include <vrvCore/DtUniqueID.h>
17 
19 #include <string>
20 
21 #include <matrix/vlVector.h>
22 
23 namespace makVrv
24 {
25  class DtDe;
26  class DtModelAgent;
27  class DtSceneObjectAgent;
28  class DtScribeBoxModelAgent;
29  class DtAgentManagerInterface;
30  class DtTerrainTreeSettings;
31 
35  {
36  public:
37 
39  DtProp(DtDe& de, DtAgentManagerInterface& agentManagerInterface,
40  const std::string& propType, const std::string& name);
41 
42  private:
43 
45  DtProp(const DtProp& copy);
46 
48  DtProp& operator=(const DtProp& copy);
49 
50  public:
51 
53  virtual ~DtProp();
54 
56  void destroy();
57 
59  bool operator==(const DtProp& prop) const;
60 
62  bool getRecord(makArchives::DtPropRecord& recOut) const;
63 
65  void setFromRecord(const makArchives::DtPropRecord& rec);
66 
68  void setColorFilter(float r, float g, float b, float a);
69 
71  void setVisible(bool isVisible);
72 
74  void setScribed(bool isSelected);
75 
77  bool scribed() const;
78 
80 
82  DtUniqueID uniqueID() const;
83 
85  void getPosition(double& x, double& y, double& z) const;
86 
88  void setPosition(double x, double y, double z);
89 
91  void getOrientation(double& x, double& y, double& z, double& w) const;
92 
94  void setOrientation(double x, double y, double z, double w);
95 
97  void setOrientation(double psi, double theta, double phi);
98 
100  const std::string& propType() const;
101 
103  void setPropType(const std::string& proptype);
104 
106  const std::string& modelDefinition() const;
107 
109  void setModelDefinition(const std::string& modelDefinition);
110 
112  void setExternalNodeLocation(const std::string& searchExpression, unsigned int index);
113 
115  const std::string& searchExp() const;
116 
118  unsigned int searchIndex() const;
119 
121  void setTerrainTreeSettings(DtTerrainTreeSettings* terrainTreeSettings);
122 
124  const DtTerrainTreeSettings* terrainTreeSettings(void) const;
125 
127  float red() const;
129  float green() const;
130  float blue() const;
131  float alpha() const;
133 
135  const std::string& name() const;
136 
138  void setName(const std::string& name);
139 
140  bool isVisible() const;
141 
143  const DtSceneObjectAgent* sceneObject() const;
146 
148  DtSceneObjectAgent* sceneObject();
151 
153  const DtModelAgent* model() const;
154 
156  DtModelAgent* model();
157 
159  bool operator!=(const DtProp& prop) const;
160 
161  protected:
162 
166  friend class DtTerrainLayer;
167 
168  virtual void selectionChanged( const DtSelectionManager::IdSet& selected,
169  const DtSelectionManager::IdSet& deselected );
170 
171  protected:
172 
174 
175  std::string myPropType;
176  DtSceneObjectAgent* mySceneObject;
177  DtModelAgent* myObjectModel;
178  DtScribeBoxModelAgent* myScribeBoxModel;
179 
181  std::string myModelDefinition;
182 
184  std::string mySearchExp;
185  unsigned int mySearchIndex;
186 
188  std::string myName;
189 
192 
194  float myAlpha;
195  float myR;
196  float myG;
197  float myB;
198 
203  double myPosX;
204  double myPosY;
205  double myPosZ;
206 
207  //The Loaded orientation quaternion (x,y,z,w).
212 
213  //Runtime state.
215 
217 
219  };
220 
221 }
222 
223 #endif
224 
double myOrientationX
Definition: DtProp.h:208
bool myIsTreeFlag
Definition: DtProp.h:214
float myR
Definition: DtProp.h:195
float myAlpha
Color components.
Definition: DtProp.h:194
double myPosX
Position set by DtPropRecord on load. Need because trees require a position when they are added...
Definition: DtProp.h:203
DtSceneObjectAgent * mySceneObject
Definition: DtProp.h:176
DtScribeBoxModelAgent * myScribeBoxModel
Definition: DtProp.h:178
Contains makVrv:DtSelectionManager class.
bool myIsVisible
Whether the prop is visible.
Definition: DtProp.h:191
The DtTerrainlayer is the base implementation of a layer of data which makes up the terrain...
Definition: DtTerrainLayer.h:33
DtDe & myDe
Definition: DtProp.h:173
Contains makArchives::DtPropRecord class.
Facade object for a scene prop.
Definition: DtProp.h:34
std::string myPropType
Definition: DtProp.h:175
DtModelAgent * myObjectModel
Definition: DtProp.h:177
float myG
Definition: DtProp.h:196
DtAgentManagerInterface & myAgentManagerInterface
Definition: DtProp.h:218
unsigned int mySearchIndex
Definition: DtProp.h:185
double myPosZ
Definition: DtProp.h:205
A DtPropRecord contains the information to recreate a prop.
Definition: DtPropRecord.h:19
#define DT_DLL_VRVCORE
Definition: vrvCore.h:20
unsigned long long DtUniqueID
Definition: DtUniqueID.h:19
double myOrientationW
Definition: DtProp.h:211
DtTerrainTreeSettings * myTerrainTreeSettings
Definition: DtProp.h:216
bool operator==(const DtTextureAtlasIndexParser::StringOrFloatAttrib &lhs, const DtTextureAtlasIndexParser::StringOrFloatAttrib &rhs)
needed for search comparison code
Definition: DtTextureAtlasIndexParser.h:160
double myOrientationZ
Definition: DtProp.h:210
Contains makVrv::DtUniqueID type.
double myOrientationY
Definition: DtProp.h:209
The abstract interface necessary for agents.
Definition: DtAgentManagerInterface.h:33
std::string myModelDefinition
The model definition.
Definition: DtProp.h:181
float myB
Definition: DtProp.h:197
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. It owns a DtRenderer, DtDeCommunicator, as well as a DtDisplay and other things.
Definition: DtDe.h:76
DT_DLL_terrainCS bool operator!=(const DtDegMinSec &lhs, const DtDegMinSec &rhs)
std::string myName
The prop&#39;s unique name.
Definition: DtProp.h:188
std::string mySearchExp
The expression that was used to find the prop.
Definition: DtProp.h:184
double myPosY
Definition: DtProp.h:204
std::set< DtUniqueID > IdSet
Definition: DtSelectionManager.h:32
Contains DLL export macros.

Document ID: Generated on Thu Oct 23 22:29:17 EDT 2025 from SVN revision 280951
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)