VR-Forces Development_Version Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
DtCigiBaseEntity.h
Go to the documentation of this file.
1 /*********************************************************************
2 ** Copyright (c) 2014 MaK Technologies, Inc.
3 ** All rights reserved.
4 *********************************************************************/
5 
9 
10 #pragma once
11 
12 #include <vrvCigi/vrvCigi.h>
13 
14 #include <vrvCore/DtUniqueID.h>
17 
18 #include <matrix/geodeticCoord.h>
19 #include <matrix/vlTaitBryan.h>
20 
21 namespace makVrv
22 {
23  class DtAgentManagerInterface;
24  class DtCigiConnection;
25  class DtModelAgent;
26  class DtSceneObjectAgent;
27  class DtGroundClampingUpdaterAgent;
28  class DtDeadReckonUpdaterAgent;
29  class DtEmbarkationUpdaterAgent;
30 
31 
37  {
38  public:
42  DtAgentManagerInterface& sceneInterface, int entityId,
43  int entityType);
44 
46  virtual ~DtCigiBaseEntity();
47 
49  virtual DtUniqueID uniqueId() const;
50 
52  virtual int cigiId() const;
53 
54  // Do anything that needs to happen AFTER the entity is constructed
55  // The base class pushes the uniqueID down to the scene object
56  virtual void init();
57 
59  virtual void setVisible(bool yesNo);
60 
62  virtual void setDeadReckoningOn(bool onOff);
63 
67  virtual void setPosition(const DtGeodeticCoord& pos, bool force=false);
68 
70  virtual const DtGeodeticCoord& position() const;
71 
73  virtual const DtVector& localPosition() const;
74 
78  virtual void setOrientation(const DtTaitBryan& orientation, bool force=false);
79 
81  virtual const DtTaitBryan& orientation() const;
82 
87  virtual void setLinearRate(const DtVector& rate, bool useWorldCoordinates = true);
88 
93  virtual void setAngularRate(const DtVector& rate, bool useWorldCoordinates = true);
94 
96  virtual void setRelativeTo(DtCigiBaseEntity* parent);
97 
99  virtual void setRelativePosition(const DtVector& pos);
100 
103  virtual void setRelativeOrientation(const DtTaitBryan& orient);
104 
109  virtual void slot_deadReckoningAllowed(bool allowed);
110 
112  virtual void setAlpha(int alpha);
113 
116  virtual int alpha() const;
117 
119  virtual void setInheritAlpha(bool inherit);
120 
122  virtual void slot_alphaChanged(int alpha, DtUniqueID id);
123 
125  virtual void setGroundClampingOn( DtGroundClampingUpdater::GroundClampingMode clampType );
126 
128  boost::signal<void (int, DtUniqueID)> signal_alphaChanged;
129 
130  protected:
132  virtual void startDeadReckoning();
133 
135  virtual void endDeadReckoning();
136 
138  virtual void startEmbarked();
139 
141  virtual void endEmbarked();
142 
144  virtual void startGroundClamping();
145 
147  virtual void endGroundClamping();
148 
149  virtual void buildGroundClampingUpdater();
150 
151  protected:
152  DtSceneObjectAgent* mySceneObject;
153  DtModelAgent* myModel;
154 
155  DtDeadReckonUpdaterAgent* myDeadReckonUpdaterAgent;
156  DtGroundClampingUpdaterAgent* myGroundClampingUpdaterAgent;
157  DtEmbarkationUpdaterAgent* myEmbarkationUpdaterAgent;
158 
162 
163  DtGeodeticCoord myLastPosition;
165 
166  DtTaitBryan myLastOrientation;
169 
172 
175 
178 
181 
183  int myAlpha;
185 
187  };
188 
189 
193  {
194  public:
195 
198  {
199  }
200 
203  {
204  }
205 
207  virtual DtCigiObjectCreator* clone() const = 0;
208 
210  virtual DtCigiBaseEntity* create(DtCigiConnection& connection,
211  DtAgentManagerInterface& sceneInterface, int entityId,
212  int entityType) const = 0;
213 
214  };
215 
216  template <typename CigiObject>
218  {
219  public:
220 
223  {
224  }
225 
228  {
229  }
230 
231  virtual DtCigiObjectCreator* clone() const
232  {
234  }
235 
237  virtual DtCigiBaseEntity* create( DtCigiConnection& connection,
238  DtAgentManagerInterface& sceneInterface, int entityId,
239  int entityType ) const
240  {
241  return new CigiObject (connection, sceneInterface, entityId,
242  entityType );
243  }
244  };
245 }

Document ID: Generated on Tue Mar 8 22:13:38 EST 2016 from SVN revision 162938
Copyright © 2005-2015 VT MÄK. All Rights Reserved (www.mak.com)