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 
37  virtual ~DtVrfAggregateStateRepository() override;
38 
45  virtual void initStatePropertiesNotToBeRestored() override;
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  {
75  return myFormationState;
76  }
77 
79  {
80  return myFormationState;
81  }
82 
83 protected:
84 
89  virtual void preGetSelf() override;
90  virtual void postGetSelf() override;
91 
92  virtual void setToLegacyRWData() override;
93  virtual void restoreFromLegacyRWData() override;
94  virtual void createLegacyRWData() override;
95 
96  virtual void updateSupportPoints(const DtVector& newPosition, const DtReal newHeading) override;
97 
98  virtual void tick() override;
99 
100 protected:
103 
105 
106 public:
108 
110 
111  VRF4API_METHOD virtual void setFormationName(const DtString& name);
117  VRF4API_METHOD virtual DtString formationName() const;
119 
125 
126  VRF4API_METHOD virtual void setAggregateState(enum DtAggregateState state);
127  VRF4API_METHOD virtual enum DtAggregateState aggregateState() const;
129 
130  VRF4API_METHOD virtual void setFormation(DtAggregateFormation formation);
131  VRF4API_METHOD virtual DtAggregateFormation formation() const;
132 
134  VRF4API_METHOD virtual double formationHalfLength();
135 
136  VRF4API_METHOD virtual bool aggregatedExtent(DtExtent& extent);
137 
139  VRF4API_METHOD virtual double totalMass() const override;
141 };
142 
DtAggregateLocalObjectFacade myAggregateLocalObject
Definition: vrfAggregateStateRepository.h:104
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:102
Definition: formationState.h:40
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:78
virtual double totalMass() const
Returns the current total mass of the entity.
bool myBlockSetFormationChange
Definition: vrfAggregateStateRepository.h:101
static DtVrfObjectStateRepository * creator(const DtString &name, DtLocalObject *vrfObject, DtReaderWriterRegistry *parentRegistry)
const DtFormationState & formationState() const
Definition: vrfAggregateStateRepository.h:73
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 DtString type() const override
returns DtSimObjectStateRepositoryType
virtual void preGetSelf() override
Hook function called immediately prior to getSelf().
Definition: vrfAggregateStateRepository.h:21
Contains the set of readable/writeable parameters associated with a pseudo-aggregate entities...
Definition: aggregateObjectParameters.h:29
virtual void updateSupportPoints(const DtVector &newPosition, const DtReal newHeading) override
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.
#define VRF4API_METHOD
Include this header file to allow for the definition/usage of the ability to mark something as deprec...
Definition: vrf4XAPI.h:23
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)