VR-Forces 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 "vrfutil/formationState.h"
15 #include <vlpi/disEnums.h>
16 
18 class DtFormationState;
19 class DtFormation;
20 
22 {
23 private:
26 
28 
30  const DtVrfAggregateStateRepository & orig);
31 
32 public:
33 
34  DtVrfAggregateStateRepository (DtLocalObject* vrfObject, const DtString& rwName = DtString::nullString(),
35  DtReaderWriterRegistry* parentRegistry = 0);
36 
38 
46 
48  virtual DtString type() const override;
49 
51  virtual std::list<DtString> allowableFormationNames() const;
52 
55  virtual void setBlockSetFormationChange(bool);
56  virtual bool blockSetFormationChange() const;
57 
59  virtual const int vrfMovingObjectStateRepositorySubType() const override;
60 
62  virtual const int aggregateStateRepositorySubType() const;
63 
65  virtual void getSelf(DtlObjPtr args,
66  const DtReaderWriter::SearchPaths& searchPaths,
67  const DtVariableBindingsList& variableBindings) override;
68 
70  static DtVrfObjectStateRepository* creator (const DtString& name,
71  DtLocalObject* vrfObject, DtReaderWriterRegistry* parentRegistry);
72 
74  virtual void upgradeFromImport() override;
75 
77  {
78  return myFormationState;
79  }
80 
82  {
83  return myFormationState;
84  }
85 
86 protected:
87 
92  virtual void preGetSelf() override;
93  virtual void postGetSelf() override;
94 
95  virtual void setToLegacyRWData() override;
96  virtual void restoreFromLegacyRWData() override;
97  virtual void createLegacyRWData() override;
98 
99  virtual void updateSupportPoints(const DtVector& newPosition, const DtReal newHeading) override;
100 
101  virtual void tick() override;
102 
103 protected:
106 
108 
109 public:
111 
113 
114  VRF4API_METHOD virtual void setFormationName(const DtString& name);
120  VRF4API_METHOD virtual DtString formationName() const;
122 
128 
129  VRF4API_METHOD virtual void setAggregateState(enum DtAggregateState state);
130  VRF4API_METHOD virtual enum DtAggregateState aggregateState() const;
132 
133  VRF4API_METHOD virtual void setFormation(DtAggregateFormation formation);
134  VRF4API_METHOD virtual DtAggregateFormation formation() const;
135 
137  VRF4API_METHOD virtual double formationHalfLength();
138 
139  VRF4API_METHOD virtual bool aggregatedExtent(DtExtent& extent);
140 
142  VRF4API_METHOD virtual double totalMass() const;
144 };
145 
DtAggregateLocalObjectFacade myAggregateLocalObject
Definition: vrfAggregateStateRepository.h:107
virtual void postGetSelf() override
Hook function called immediately following getSelf().
Contains the DtVrfMovingObjectStateRepository class declaration.
virtual void initStatePropertiesNotToBeRestored()
Initializes the list of state properties which should not be restored.
DtFormationState myFormationState
Definition: vrfAggregateStateRepository.h:105
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
DtFormationState & formationState()
Definition: vrfAggregateStateRepository.h:81
virtual double totalMass() const
Returns the current total mass of the entity.
bool myBlockSetFormationChange
Definition: vrfAggregateStateRepository.h:104
static DtVrfObjectStateRepository * creator(const DtString &name, DtLocalObject *vrfObject, DtReaderWriterRegistry *parentRegistry)
const DtFormationState & formationState() const
Definition: vrfAggregateStateRepository.h:76
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.
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:91
virtual void setToLegacyRWData() override
virtual void restoreFromLegacyRWData() override
#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 tick() override
Tick function.
virtual void createLegacyRWData() override
Creates the legacy data used for any pre/put operation. Override this to create your legacy data atta...
virtual void getSelf(DtlObjPtr args, const DtReaderWriter::SearchPaths &searchPaths, const DtVariableBindingsList &variableBindings) override
Override getSelf to handle mapping of old pre-2.0 oob files. Maps the old variables for local and wor...
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 DtString type() const override
returns DtSimObjectStateRepositoryType
virtual void preGetSelf() override
Hook function called immediately prior to 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.
Definition: vrfAggregateStateRepository.h:21
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 Wed Mar 27 22:49:11 EDT 2024 from SVN revision 264633
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)