VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
aggregateDecorator.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2020 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 
6 #pragma once
7 
11 #include <tbb/spin_rw_mutex.h>
12 #include <boost/signals2.hpp>
13 
16 class DtFormation;
17 
20 {
21 public:
23  virtual ~DtAggregateSimObjectDecorator() override;
24 
26  const std::vector<DtSimObjectReference>& subordinates() const;
27 
29  virtual double totalMass() const;
30 
31  virtual bool computeExtentFromParameters(const DtString& formationName, DtExtent& extent) const;
32 
33 protected:
34 
36  void subordinateManagerUpdated();
37 
38 protected:
41  mutable tbb::spin_rw_mutex myCurrentFrameSubordinatesMutex;
42  mutable std::vector<DtSimObjectReference> mySubordinates;
43  mutable boost::signals2::scoped_connection mySubordinatesChangedConnection;
44 
46 };
47 
50 {
51 public:
53 
54  virtual ~DtAggregateLocalObjectDecorator() override;
55 
56  virtual bool computeExtentFromParameters(const DtString& formationName, DtExtent& extent) const;
57  DtSubordinateManager* nextFrameSubordinateManager();
58 
59  virtual bool needsDesignatorReorder() const;
60 
61 protected:
65 };
66 
69 {
70 public:
71  virtual DtSimObjectDecorator* createDecorator(const DtSimObject* o) const override
72  { return new DtAggregateSimObjectDecorator(o); };
74  { return new DtAggregateLocalObjectDecorator(o); };
75 
76  virtual const char* DecoratorType() const override { return "DtAggregateDecorator"; };
77 };
78 
80  const DtString& formationName, DtExtent& extent);
81 
virtual DtLocalObjectDecorator * createDecorator(DtLocalObject *o) const override
Definition: aggregateDecorator.h:73
Objects may contain a collection of other objects, such as overlays or pseudo-aggregate entities...
Definition: subordinateManager.h:43
virtual DtSimObjectDecorator * createDecorator(const DtSimObject *o) const override
Definition: aggregateDecorator.h:71
std::vector< DtSimObjectReference > mySubordinates
Definition: aggregateDecorator.h:42
DT_DLL_vrfobjcore bool computeExtent(const DtSimulationServices *, const DtAggregateObjectParameters &parameterEntry, const DtString &formationName, DtExtent &extent)
The DtAggregateDecoratorCreator will create the appropriate type of aggregate proxy logic...
Definition: aggregateDecorator.h:68
This will keep track of the subordinates of the sim object supplied.
Definition: aggregateDecorator.h:19
Instances of DtFormation are a list of DtFormationEntry objects which make up an aggregate formation...
Definition: formation.h:22
The DtExtent represents an axis-aligned 3d bounding box.
Definition: extent.h:43
DtVrfSimulatedSimObjectFacade myVrfSimulatedSimObjectFacade
Definition: aggregateDecorator.h:45
#define DT_DLL_vrfobjcore
This file is used to determine how to build.
Definition: vrfobjcoreDefines.h:24
This class will contain the subordinate manager that is used to manage the subordinates of this objec...
Definition: aggregateDecorator.h:49
tbb::spin_rw_mutex myCurrentFrameSubordinatesMutex
Subordinate manager build from the subordinate component and updated when the subordinate component i...
Definition: aggregateDecorator.h:41
Central access point of all non-object-specific the services and managers that are available for use ...
Definition: simulationServices.h:96
Represents a single simulation object in the exercise. Object may be VRF simulation, or non-VRF simulated, and may be simulated by the local sim engine, or by a remote sim engine. Only public (external) state of the object is available. All data is read-only. All access to data of the object is thread safe within the simulation frame.
Definition: simObject.h:80
virtual const char * DecoratorType() const override
Definition: aggregateDecorator.h:76
Definition: decoratorBase.h:57
boost::signals2::scoped_connection mySubordinatesChangedConnection
Definition: aggregateDecorator.h:43
Definition: decoratorBase.h:30
Contains the set of readable/writeable parameters associated with a pseudo-aggregate entities...
Definition: aggregateObjectParameters.h:29
DtSubordinateManager * myNextFrameSubordinates
Subordinate manager build from the subordinate component and updated when the subordinate component i...
Definition: aggregateDecorator.h:64
Definition: decoratorBase.h:44
A locally simulated VRF object.
Definition: localObject.h:98

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)