VR-Vantage
Loading...
Searching...
No Matches
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
23namespace makVrv
24{
25 class DtDe;
26 class DtModelAgent;
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
63
66
68 void setColorFilter(float r, float g, float b, float a);
69
72
74 void setScribed(bool isSelected);
75
77 bool scribed() const;
78
80
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
122
125
127
128 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
146
148
151
153 const DtModelAgent* model() const;
154
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;
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
Contains makArchives::DtPropRecord class.
Contains makVrv:DtSelectionManager class.
Contains makVrv::DtUniqueID type.
A DtPropRecord contains the information to recreate a prop.
Definition DtPropRecord.h:20
The abstract interface necessary for agents.
Definition DtAgentManagerInterface.h:34
The DtDe is the core component of any VR-Vantage application. It owns a DtRenderer,...
Definition DtDe.h:77
Agent class for the scene object class: DtModel.
Definition DtModelAgent.hpp:27
void setColorFilter(float r, float g, float b, float a)
Set the multipliers for the prop's color.
DtTerrainTreeSettings * myTerrainTreeSettings
Definition DtProp.h:216
DtModelAgent * model()
Get the prop's distributed model driver.
float red() const
Get the current color filter components.
DtScribeBoxModelAgent * myScribeBoxModel
Definition DtProp.h:178
bool scribed() const
Get if the prop has a scribed bounding box.
const DtSceneObjectAgent * sceneObject() const
Get the prop's distributed scene object driver.
DtSceneObjectAgent * sceneObject()
Get the prop's distributed scene object driver.
void destroy()
Delete the contents of the prop.
double myPosX
Definition DtProp.h:203
std::string myPropType
Definition DtProp.h:175
void setOrientation(double psi, double theta, double phi)
Set the prop orientation in Euler angles.
void setExternalNodeLocation(const std::string &searchExpression, unsigned int index)
Set the location of the node moved to this prop from a terrain.
bool isVisible() const
unsigned int searchIndex() const
Get the index used to find the prop.
DtSceneObjectAgent * mySceneObject
Definition DtProp.h:176
float myB
Definition DtProp.h:197
void getPosition(double &x, double &y, double &z) const
Get the prop position.
float blue() const
const std::string & searchExp() const
Get the expression used to find the prop.
std::string myName
The prop's unique name.
Definition DtProp.h:188
DtAgentManagerInterface & myAgentManagerInterface
Definition DtProp.h:218
void setPropType(const std::string &proptype)
Change the prop type of this prop.
float myG
Definition DtProp.h:196
double myOrientationW
Definition DtProp.h:211
double myPosY
Definition DtProp.h:204
void setVisible(bool isVisible)
Set the prop visible or not.
void setName(const std::string &name)
Set the props name.
void getOrientation(double &x, double &y, double &z, double &w) const
Get the prop orientation.
const std::string & name() const
Get the prop's name.
std::string mySearchExp
The expression that was used to find the prop.
Definition DtProp.h:184
void setPosition(double x, double y, double z)
Set the prop position in scene coordinates.
void setFromRecord(const makArchives::DtPropRecord &rec)
Fill out this prop from the record.
DtProp(DtDe &de, DtAgentManagerInterface &agentManagerInterface, const std::string &propType, const std::string &name)
CTOR Construct a prop from a model definition.
void setModelDefinition(const std::string &modelDefinition)
Set the model definition of a prop.
DtProp(const DtProp &copy)
Copy CTOR.
bool getRecord(makArchives::DtPropRecord &recOut) const
Returns true if recOut was filled with all the information about this prop.
double myOrientationY
Definition DtProp.h:209
const std::string & modelDefinition() const
Get the model definition.
double myOrientationZ
Definition DtProp.h:210
DtDe & myDe
Definition DtProp.h:173
DtUniqueID uniqueID() const
Accessors.
const std::string & propType() const
Get type of prop (e.g. building, tree, ...).
DtModelAgent * myObjectModel
Definition DtProp.h:177
double myOrientationX
Definition DtProp.h:208
void setScribed(bool isSelected)
Set the prop has a scribed bounding box.
bool myIsTreeFlag
Definition DtProp.h:214
virtual ~DtProp()
DTOR.
void setTerrainTreeSettings(DtTerrainTreeSettings *terrainTreeSettings)
Set tree settings (for when the prop is a tree).
float myR
Definition DtProp.h:195
friend class DtTerrainLayer
Definition DtProp.h:166
DtProp & operator=(const DtProp &copy)
Assignment operator.
float green() const
float myAlpha
Color components.
Definition DtProp.h:194
const DtTerrainTreeSettings * terrainTreeSettings(void) const
Get the tree settings (for when the prop is a tree).
bool operator==(const DtProp &prop) const
Returns true IFF argument has same type and name.
float alpha() const
std::string myModelDefinition
The model definition.
Definition DtProp.h:181
bool myIsVisible
Whether the prop is visible.
Definition DtProp.h:191
void setOrientation(double x, double y, double z, double w)
Set the prop orientation.
const DtModelAgent * model() const
Get the prop's distributed model driver.
bool operator!=(const DtProp &prop) const
!= operator for props
double myPosZ
Definition DtProp.h:205
virtual void selectionChanged(const DtSelectionManager::IdSet &selected, const DtSelectionManager::IdSet &deselected)
unsigned int mySearchIndex
Definition DtProp.h:185
Agent class for the scene object class: DtSceneObject.
Definition DtSceneObjectAgent.hpp:32
Agent class for the scene object class: DtScribeBoxModel.
Definition DtScribeBoxModelAgent.hpp:25
std::set< DtUniqueID > IdSet
Definition DtSelectionManager.h:32
Class for setting and maintaining state for user-modifiable TerrainTree settings All of the TerrainTr...
Definition DtTerrainTreeSettings.h:29
Contains DtCreateSensorFieldOfViewCommand and DtCreateSensorFieldOfViewCommandCreator class declarati...
Definition DtGridLinesSettingsRecord.h:16
unsigned long long DtUniqueID
Definition DtUniqueID.h:19
Contains DLL export macros.
#define DT_DLL_VRVCORE
Definition vrvCore.h:20