VR-Forces 4.8 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtDynamicTerrainObject.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2016 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 
9 
10 #pragma once
11 
12 #include <vrvCore/DtTickable.h>
13 #include <vrvCore/DtUniqueID.h>
15 
16 #include <matrix/vlVector.h>
17 
18 #include <boost/signals.hpp>
19 
20 #include <utility> // std::pair
21 #include <string>
22 
23 namespace makVrv
24 {
25  class DtDe;
26 
34  {
35  protected:
36 
41  {
42  public:
44  : myRequestHandle()
45  , myIsDirty(false)
46  , myRadius(1)
47  , myPriority(0)
48  {
49  }
50 
52  double myRadius;
53  std::list< std::pair<std::string, std::string> > myData;
54  double myPriority;
56  bool myIsDirty; // keep track so we don't get added to the dirty list multiple times
57  };
58 
60  typedef std::vector<DynamicTerrainItem*> DynamicTerrainVector;
61 
62  public:
63 
68 
69  //Not copyable
71 
72  //Not assignable
73  DtDynamicTerrainObject& operator =(const DtDynamicTerrainObject& copy);
74 
75  private:
78 
79  public:
81  virtual ~DtDynamicTerrainObject();
82 
85  virtual void update( DtTime tNow );
86 
97  virtual bool needsUpdate( DtTime tNow );
98 
100  inline DtUniqueID uniqueId() const
101  {
102  return myUniqueId;
103  }
105 
111  virtual void addGeometry( int index, const DtVector& location, double radius, double priority );
112 
114  virtual void changeGeometry( int index, const DtVector& location, double radius, double priority );
115 
117  virtual void clearData( int index );
118 
120  virtual void addData( int index, const std::string& key, const std::string& value, double priority );
121 
123 
124  protected:
126 
130  virtual void makeDirty( DynamicTerrainItem* item, int index );
131 
134  virtual DynamicTerrainItem* getDynamicTerrainItem( int index );
136 
137  protected:
138 
141 
144 
146  typedef std::list<int> DirtyList;
148  };
149 }
DtUniqueID myUniqueId
This distributed object&#39;s unique identifier.
Definition: DtDynamicTerrainObject.h:143
DtUniqueID uniqueId() const
Returns the distributed object id of this object.
Definition: DtDynamicTerrainObject.h:100
An abstract base class for objects that require updates.
Definition: DtTickable.h:26
DtDynamicTerrainWorld::RequestHandle myRequestHandle
Definition: DtDynamicTerrainObject.h:55
bool myIsDirty
Definition: DtDynamicTerrainObject.h:56
std::list< int > DirtyList
Definition: DtDynamicTerrainObject.h:146
std::vector< DynamicTerrainItem * > DynamicTerrainVector
Type definition for a vector of DynamicTerrainItems.
Definition: DtDynamicTerrainObject.h:60
DynamicTerrainVector myDynamicTerrainVector
Definition: DtDynamicTerrainObject.h:145
#define DT_DLL_VRVCORE
Definition: vrvCore.h:20
DtVector myLocation
Definition: DtDynamicTerrainObject.h:51
double myPriority
Definition: DtDynamicTerrainObject.h:54
DtDe & myDe
The display engine.
Definition: DtDynamicTerrainObject.h:140
double myRadius
Definition: DtDynamicTerrainObject.h:52
unsigned long long DtUniqueID
Definition: DtUniqueID.h:22
DynamicTerrainItem()
Definition: DtDynamicTerrainObject.h:43
Contains the declaration for makVrv::DtTickable.
Contains makVrv::DtDynamicTerrainWorld class.
Contains makVrv::DtUniqueID type.
The DtDe is the core component of any VR-Vantage application.
Definition: DtDe.h:69
DirtyList myDirtyList
Definition: DtDynamicTerrainObject.h:147
std::list< std::pair< std::string, std::string > > myData
Definition: DtDynamicTerrainObject.h:53
Abstract rotorWash object updater interface.
Definition: DtDynamicTerrainObject.h:33
Local class used only by DtDynamicTerrainObject for representing geometry and data.
Definition: DtDynamicTerrainObject.h:40
Resource handle for a change request which has been added to the system.
Definition: DtDynamicTerrainFeature.h:95

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)