10 #include <vrfOM/sets/writeDIGuyAppearanceRepository.hpp>
11 #include <vrfOM/sets/readDIGuyAppearanceRepository.hpp>
12 #include <legionStandardOM/sets/writeLifeformRepository.hpp>
13 #include <legionStandardOM/sets/readLifeformRepository.hpp>
14 #include <vlpi/patchIdentifier.h>
15 #include <matrix/vlVector.h>
86 virtual const DtString diguyAppearance()
const override;
88 virtual void setDiguyAppearance(
const DtString&)
override;
91 virtual const DtString diguyType()
const override;
93 virtual void setDiguyType(
const DtString&)
override;
96 virtual const DtString diguyHeadAppearance()
const override;
98 virtual void setDiguyHeadAppearance(
const DtString&)
override;
101 virtual const DtString diguyItemAppearance()
const override;
103 virtual void setDiguyItemAppearance(
const DtString&)
override;
106 virtual const DtPatchIdentifier diguyPrimaryUnitPatch()
const override;
108 virtual void setDiguyPrimaryUnitPatch(
const DtPatchIdentifier& )
override;
111 virtual const DtPatchIdentifier diguySecondaryUnitPatch()
const override;
113 virtual void setDiguySecondaryUnitPatch(
const DtPatchIdentifier& )
override;
116 virtual const DtPatchIdentifier diguyRankPatch()
const override;
118 virtual void setDiguyRankPatch(
const DtPatchIdentifier& )
override;
121 virtual const DtString diguyCharacterName()
const override;
123 virtual void setDiguyCharacterName(
const DtString& )
override;
126 virtual const DtString diguyAction()
const override;
128 virtual void setDiguyAction(
const DtString&)
override;
131 virtual const double bodyWeight()
const override;
133 virtual void setBodyWeight(
const double&)
override;
136 virtual const bool diguyUsingAnimationOffset()
const override;
138 virtual void setDiguyUsingAnimationOffset(
const bool&)
override;
141 virtual const float diguyTransitionSpeed()
const override;
143 virtual void setDiguyTransitionSpeed(
const float&)
override;
146 virtual const DtVector diguyAnimationOffset()
const override;
148 virtual void setDiguyAnimationOffset(
const DtVector&)
override;
153 virtual void setDiguyType(
const DtString& newType,
const DtString& newAppearance )
override;
156 virtual void makeWritable()
override;
159 virtual void makeReadOnly()
override;
182 virtual const DtString diguyAppearance()
const override;
184 virtual const DtString diguyType()
const override;
186 virtual const DtString diguyHeadAppearance()
const override;
188 virtual const DtString diguyItemAppearance()
const override;
190 virtual const DtPatchIdentifier diguyPrimaryUnitPatch()
const override;
192 virtual const DtPatchIdentifier diguySecondaryUnitPatch()
const override;
194 virtual const DtPatchIdentifier diguyRankPatch()
const override;
196 virtual const DtString diguyCharacterName()
const override;
198 virtual const DtString diguyAction()
const override;
200 virtual const double bodyWeight()
const override;
202 virtual const bool diguyUsingAnimationOffset()
const override;
204 virtual const DtVector diguyAnimationOffset()
const override;
206 virtual const float diguyTransitionSpeed()
const override;
209 bool readComponentValid()
const;
213 bool findReadComponent();
245 virtual void updateDataStorage()
override;
251 myCurrentFrameState.updateStateData(sd);
252 myNextFrameState.updateStateData(sd);
256 virtual bool forceAdvance()
override;
259 virtual void firstFrameAdvance()
override;
265 myCurrentFrameState.aboutToBeDeleted();
266 myNextFrameState.aboutToBeDeleted();
LOM::ReadLifeformRepository myReadLifeformRepository
Read-only Legion repository for lifeform (body weight) data.
Definition: humanStateComponent.h:219
virtual DtFrameStateInterface * nextFrameState() override
Definition: humanStateComponent.h:240
Exception thrown when a required method has not been implemented.
Definition: stateDataTypes.h:30
virtual void setDiguyType(const DtString &newType, const DtString &newAppearance)
Sets the DI-Guy character type and appearance in a single call.
Definition: humanStateComponent.h:70
Default creator implementation for a state component type. T_StateComponent is the concrete component...
Definition: stateComponent.h:326
LOM::WriteLifeformRepository myWriteLifeformRepository
Writable Legion repository for lifeform (body weight) data.
Definition: humanStateComponent.h:165
VRF::ReadDIGuyAppearanceRepository myReadHumanComponent
Read-only Legion repository for DI-Guy appearance data.
Definition: humanStateComponent.h:217
virtual const DtFrameStateInterface * nextFrameState() const override
Definition: humanStateComponent.h:242
DtHumanStateComponentCurrentFrame myCurrentFrameState
Current (read) frame state providing access to the latest committed DI-Guy data.
Definition: humanStateComponent.h:272
The overall structure of the DtStateData mechanism is: The DtStateData contains a list of double buff...
Definition: stateData.h:513
#define DEFINE_STATE_COMPONENT_TYPE(CreatedComponent)
Macro to define all required static and virtual state component type methods. Place in the public sec...
Definition: stateComponent.h:272
virtual void updateStateData(DtStateData *sd) override
Propagates an updated state data pointer to both the current and next frame states.
Definition: humanStateComponent.h:249
Subclass from this to indicate that this will be a double buffered state component.
Definition: stateComponent.h:489
#define UNDEFINED_RETURNVALUE_ACCESSOR_MUTATOR(Type, Member, Set)
Defines an undefined virtual by-value accessor and an undefined virtual setter, both throwing DtUnimp...
Definition: doubleBufferedDataStorage.h:103
virtual void aboutToBeDeleted()
Called when the component is about to be deleted; emits signal_stateComponentAboutToBeDeleted.
DtHumanStateComponentNextFrame myNextFrameState
Next (write) frame state holding pending DI-Guy data changes.
Definition: humanStateComponent.h:274
In order to be a well defined state component, you must:
Definition: humanStateComponent.h:27
virtual const DtFrameStateInterface * currentFrameState() const override
Definition: humanStateComponent.h:238
VRF::WriteDIGuyAppearanceRepository myWriteHumanComponent
Writable Legion repository for DI-Guy appearance data.
Definition: humanStateComponent.h:163
Concrete double-buffered state component implementation for DI-Guy human-figure data. Owns and manages both a current-frame (read) and next-frame (write) instance of DtHumanStateComponent, synchronising them via the Legion network repositories.
Definition: humanStateComponent.h:225
Read-access implementation of DtHumanStateComponent for the current simulation frame. Backed by read-only Legion repositories; provides getters that return live committed state values.
Definition: humanStateComponent.h:170
DtStateComponentCreator< DtHumanStateComponentImplementation > DtHumanStateComponentCreator
5) Define the creator. This will need to be registered with the REGISTER_STATE_COMPONENT macro in the...
Definition: humanStateComponent.h:283
virtual void aboutToBeDeleted() override
Notifies both frame states that the component is about to be deleted.
Definition: humanStateComponent.h:262
#define DT_DLL_vrfStateData
This file is used to determine how to build Disable inconsistent dll linkage warning Visual Studio 6...
Definition: vrfStateDataDefines.h:29
Definition: stateComponent.h:74
Contains the DtStateComponent class declaration.
bool isDoubleBuffered()
Definition: humanStateComponent.h:236
Base interface for accessing current or next frame state in a double-buffered state component...
Definition: stateComponent.h:354
bool myFoundComponent
True once the Legion read repositories have been successfully located.
Definition: humanStateComponent.h:276
Write-access implementation of DtHumanStateComponent for the next simulation frame. Backed by writable Legion repositories; setters mark the component modified when a value changes.
Definition: humanStateComponent.h:75