VR-Forces 5.0.2 Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
vrfAggregateStateRepository.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2004 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 
8 
9 #pragma once
10 
14 #include <vlpi/disEnums.h>
15 
17 class DtFormationState;
18 class DtFormation;
19 
21 {
22 private:
25 
27 
29  const DtVrfAggregateStateRepository & orig);
30 
31 public:
32 
33  DtVrfAggregateStateRepository (DtLocalObject* vrfObject, const DtString& rwName = DtString::nullString(),
34  DtReaderWriterRegistry* parentRegistry = 0);
35 
37 
45 
47  virtual DtString type() const;
48 
50  virtual std::list<DtString> allowableFormationNames() const;
51 
54  virtual void setBlockSetFormationChange(bool);
55  virtual bool blockSetFormationChange() const;
56 
58  virtual const int vrfMovingObjectStateRepositorySubType() const;
59 
61  virtual const int aggregateStateRepositorySubType() const;
62 
64  virtual void getSelf(DtlObjPtr args,
65  const DtReaderWriter::SearchPaths& searchPaths,
66  const DtVariableBindingsList& variableBindings);
67 
69  static DtVrfObjectStateRepository* creator (const DtString& name,
70  DtLocalObject* vrfObject, DtReaderWriterRegistry* parentRegistry);
71 
73  virtual void upgradeFromImport() override;
74 
75 protected:
76 
81  virtual void preGetSelf();
82  virtual void postGetSelf();
83 
84  virtual void setToLegacyRWData();
85  virtual void restoreFromLegacyRWData();
86  virtual void createLegacyRWData();
87 
88  virtual void updateSupportPoints(const DtVector& newPosition, const DtReal newHeading) override;
89 
90 protected:
92 
94 
95 public:
98  VRF4API_METHOD virtual const DtFormationState* formationState() const;
99  VRF4API_METHOD virtual DtFormationState* formationState();
100 
102 
103  VRF4API_METHOD virtual void setFormationName(const DtString& name);
109  VRF4API_METHOD virtual DtString formationName() const;
111 
117 
118  VRF4API_METHOD virtual void setAggregateState(enum DtAggregateState state);
119  VRF4API_METHOD virtual enum DtAggregateState aggregateState() const;
121 
122  VRF4API_METHOD virtual void setFormation(DtAggregateFormation formation);
123  VRF4API_METHOD virtual DtAggregateFormation formation() const;
124 
126  VRF4API_METHOD virtual double formationHalfLength();
127 
128  VRF4API_METHOD virtual bool aggregatedExtent(DtExtent& extent);
129 
131  VRF4API_METHOD virtual double totalMass() const;
133 };
134 
DtAggregateLocalObjectFacade myAggregateLocalObject
Definition: vrfAggregateStateRepository.h:93
Contains the DtVrfMovingObjectStateRepository class declaration.
virtual void initStatePropertiesNotToBeRestored()
Initializes the list of state properties which should not be restored.
Definition: formationState.h:41
Description: This repository holds all information that is common to all the forms of all objects wit...
Definition: vrfMovingObjectStateRepository.h:31
virtual double totalMass() const
Returns the current total mass of the entity.
bool myBlockSetFormationChange
Definition: vrfAggregateStateRepository.h:91
virtual void getSelf(DtlObjPtr args, const DtReaderWriter::SearchPaths &searchPaths, const DtVariableBindingsList &variableBindings)
Override getSelf to handle mapping of old pre-2.0 oob files. Maps the old variables for local and wor...
static DtVrfObjectStateRepository * creator(const DtString &name, DtLocalObject *vrfObject, DtReaderWriterRegistry *parentRegistry)
DtVrfMovingObjectStateRepository & operator=(const DtVrfMovingObjectStateRepository &orig)
Assignment Operator.
Definition: readerWriterRegistry.h:39
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
virtual const int vrfMovingObjectStateRepositorySubType() const
Returns DtVrfMovingObjectStateRepositorySubTypeBase.
virtual void createLegacyRWData()
Creates the legacy data used for any pre/put operation. Override this to create your legacy data atta...
Description: This repository is an internal repository accessible only by local objects. It holds all information that is common to all the forms of all entity/aggregate/control objects within VR-Forces.
Definition: vrfObjectStateRepository.h:90
virtual DtString type() const
returns DtSimObjectStateRepositoryType
#define DT_DLL_vrfobjcore
This file is used to determine how to build.
Definition: vrfobjcoreDefines.h:24
std::list< const DtRwVariableBindings * > DtVariableBindingsList
Definition: readerWriterRegistry.h:29
std::vector< DtFilename > SearchPaths
Definition: readerWriter.h:92
virtual void updateSupportPoints(const DtVector &newPosition, const DtReal newHeading)
When reading in a scenario, want to make sure the support points get set up properly. Note that this will make a blocking call to DtVrfObjectStateRepository::placePoints to allow all the necessary parts of the terrain to page in before the scenario load is complete.
virtual void postGetSelf()
Hook function called immediately following getSelf().
virtual void upgradeFromImport()
Called after the object has been imported from the scenario, but before any UUID resolution. Can be used to upgrade UUIDs that are non standard.
virtual void preGetSelf()
Hook function called immediately prior to getSelf().
Definition: vrfAggregateStateRepository.h:20
virtual void restoreFromLegacyRWData()
Contains the set of readable/writeable parameters associated with a pseudo-aggregate entities...
Definition: aggregateObjectParameters.h:29
#define VRF4API_METHOD
Include this header file to allow for the definition/usage of the ability to mark something as deprec...
Definition: vrf4XAPI.h:22
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 Sun Dec 4 20:22:03 EST 2022 from SVN revision 249613
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)