VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
dynamicTerrainLinearDeformationController.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2016 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 
9 
12 
13 #pragma once
14 
16 #include <tbb/spin_mutex.h>
18 
25 class DtKeyValuePairList;
26 
27 namespace makVrf
28 {
29  class DtDynamicTerrainStateComponent;
30 }
31 
32 namespace makVrfEvents
33 {
34  class DtDetonationEvent;
35  class DtEvent;
36 }
42 {
43 private:
50 
51 public:
52 
53  typedef unsigned DtIndexType;
54 
57  DtSimulationServices* simManager, DtComponentDescriptor* desc=0, DtReaderWriterRegistry *parentRegistry=0);
58 
61 
62  virtual bool init() override;
63 
65  virtual void registerCallbacks();
66 
68  virtual void deregisterCallbacks();
69 
71  virtual const char* type() const override;
72 
74  virtual void tick() override;
75 
76  virtual void checkForUpdates();
77 
78  virtual void updateForPublishedChange(const DtSimObjectReference& ref, bool shouldUpdateVertices, bool shouldUpdateStateProperties);
79 
81  static DtSimComponent* creator(const DtString& name, DtLocalObject* owner, DtSimulationServices* simManager,
82  DtComponentDescriptor* desc = 0, DtReaderWriterRegistry* parentRegistry = 0);
83 
84 protected:
85 
86  virtual void addChangesToKeyValuePairList(const DtSimObjectReference& object, DtKeyValuePairList& kvp);
87  virtual void populateLinearGeometry(const DtSimObjectReference& object, DtTerrainLinearGeometry& tlg);
88 protected:
89 
90 
91  virtual void processSimObjectAdded(DtSimObjectReference object);
92  virtual void processSimObjectDeleted(DtSimObjectReference object);
93  virtual void processSimObjectStateDataUpdated(const makVrf::DtFrameStateInterface* fsi);
94 
95 protected:
96  boost::signals2::scoped_connection mySimObjectAddedConnection;
97  boost::signals2::scoped_connection mySimObjectDeletedConnection;
98 
100 
102 
103  std::map<DtSimObjectReference, unsigned> myUUIDToIndexMap;
104  std::set<DtSimObjectReference> mySkipVerticeModified;
106  tbb::spin_mutex myMutex;
107  std::set<DtSimObjectReference> myObjectsWhoseStatePropertiesWereModifiedSet;
108 
109 
110  std::vector<makVrf::DtDynamicTerrainStateComponent*> myDynamicTerrainStateComponents;
111 
112 };
DtDynamicTerrainLinearDeformationControllerDescriptor * myDynamicTerrainLinearDeformationDescriptor
Definition: dynamicTerrainLinearDeformationController.h:99
#define DT_DLL_vrfmodel
This file is used to determine how to build.
Definition: vrfmodelDefines.h:24
Definition: munitionTerrainDeformationEntry.h:13
std::vector< makVrf::DtDynamicTerrainStateComponent * > myDynamicTerrainStateComponents
Definition: dynamicTerrainLinearDeformationController.h:110
Definition: keyValuePairList.h:18
The DtSimObjectReference is a shared pointer that can be used amongst many object for access to the u...
Definition: simObjectReference.h:26
A readable, writable type whose name is the name of a component and that has a list of component name...
Definition: componentDescriptor.h:49
std::set< DtSimObjectReference > mySkipVerticeModified
Definition: dynamicTerrainLinearDeformationController.h:104
std::set< DtSimObjectReference > myObjectsWhoseStatePropertiesWereModifiedSet
Definition: dynamicTerrainLinearDeformationController.h:107
Definition: readerWriterRegistry.h:39
DtDynamicTerrainLinearDeformationController is a controller that calculates and publishes terrain cha...
Definition: dynamicTerrainLinearDeformationController.h:41
boost::signals2::scoped_connection mySimObjectDeletedConnection
Definition: dynamicTerrainLinearDeformationController.h:97
virtual bool init()
Calls createPorts and createPortGroups Initializes myLastTickSimTime.
std::map< DtSimObjectReference, unsigned > myUUIDToIndexMap
Definition: dynamicTerrainLinearDeformationController.h:103
Definition: terrainLinearGeometry.h:24
A readable/writable list of detonation powers listed by type.
Definition: powerRangeDeterminantList.h:18
virtual void tick()
This gives the thread of control to the component. The component is ticked once each simulation from ...
Used to map soil types to OSG Earth Landcover strings.
Definition: vrfSoilToOsgEarthLandCoverMap.h:19
DtSimComponent & operator=(const DtSimComponent &orig)
assignment operator, not implemented
Instances of DtDynamicTerrainLinearDeformationControllerDescriptor are used to specify the parameters...
Definition: dynamicTerrainLinearDeformationControllerDescriptor.h:20
Central access point of all non-object-specific the services and managers that are available for use ...
Definition: simulationServices.h:94
The DtSimComponent class is the base class for the entire simulation model component hierarchy...
Definition: simComponent.h:91
unsigned DtIndexType
Definition: dynamicTerrainLinearDeformationController.h:53
DtSimCommand which causes all dynamic terrain damage to be removed at the specified geometry...
Definition: dynamicTerrainCommand.h:194
Contains the DtSimComponent class declaration.
unsigned myNextLinearDeformationIndex
Definition: dynamicTerrainLinearDeformationController.h:105
tbb::spin_mutex myMutex
Definition: dynamicTerrainLinearDeformationController.h:106
DtU32 myLinearDeformationEventIncrement
Definition: dynamicTerrainLinearDeformationController.h:101
boost::signals2::scoped_connection mySimObjectAddedConnection
Definition: dynamicTerrainLinearDeformationController.h:96
This is a simple base class that will be used to return a pointer to current or next frame state...
Definition: stateComponent.h:291
virtual const char * type() const =0
Returns a string identifies the class type of component. Type values are defined in compTypes...
A locally simulated VRF object. Holds all internal and external data for the object, and provides access to both the current frame and next frame state data for the object. All current frame data is read-only, and next-frame data can be written to. No thread safety guarantees are made on this object during the simulation frame and it should only be accessed by the thread that is simulating the object.
Definition: localObject.h:86

Document ID: Generated on Wed Mar 27 22:49:11 EDT 2024 from SVN revision 264633
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)