11 #include <vlpi/articulatedPartCollection.h>
17 class DtArticulatedPartStateRepository;
22 : myArtPartListModified(false)
33 : myarticulatedPartManager(orig.myarticulatedPartManager)
34 , myartPartList(orig.myartPartList)
35 , myArtPartListModified(orig.myArtPartListModified)
48 bool initialized()
const {
return (myarticulatedPartManager.get() != 0); };
57 void clearArtPartListModified() { myArtPartListModified =
false; };
60 std::shared_ptr<DtArticulatedPartManager> myarticulatedPartManager;
82 virtual
DtArticulatedPart& attachPartToListIfMissing(DtArtPartType partType) {
throw DtUnimplementedMethod(
"DtArticulatedPart& attachPartToListIfMissing(DtArtPartType partType) is not implemented for this class."); };
117 virtual DtArticulatedPart& attachPartToListIfMissing(DtArtPartType partType)
override;
119 virtual void detachPartIfAttached(DtArtPartType partType)
override;
120 virtual void detachPart(DtArtPartType partType)
override;
122 void setPublishOnLegionNetwork(
bool b);
124 virtual void clearModified()
override;
125 virtual bool artPartListModified()
const override;
127 virtual void addParameterType(
int partType,
int parameterType)
override;
149 void setUpdateFromLegionNetwork(
bool);
150 virtual void clearModified()
override;
151 virtual bool artPartListModified()
const override;
179 virtual void updateDataStorage()
override;
183 myCurrentFrameState.updateStateData(sd);
184 myNextFrameState.updateStateData(sd);
187 virtual void setPublishingOnLegionNetwork(
bool b)
override;
194 myCurrentFrameState.aboutToBeDeleted();
195 myNextFrameState.aboutToBeDeleted();
200 static void SetAddMissingParameterToAllParts(
bool);
201 static bool AddMissingParameterToAllParts();
205 virtual void createPartsFromDescriptors(
const std::list<DtSimArtPartDescriptor*>& descriptors,
206 const std::list<DtSimArtPartDescriptor*>& partDefaultsFromActuators);
Instances of DtVrfObjectParameters are the readable/writeable objects that contain the information ne...
Definition: vrfObjectParameters.h:64
The articulated part manager maintains a tree of articulated and attached parts for the state reposit...
Definition: articulatedPartManager.h:33
Definition: stateDataTypes.h:23
std::shared_ptr< DtArticulatedPartCollection > myartPartList
Definition: articulatedPartStateComponent.h:61
DtArticulatedPartCollection & artPartList()
Definition: articulatedPartStateComponent.h:53
2) Define the next frame class. This will be used for write access.
Definition: articulatedPartStateComponent.h:91
A readable, writable type that holds an articulated part type, attached-to part type, attachment point, and a list of art-part params (DtSimArtPartParamList). The read/write name is not used for anything in particular, and therefore may be used for file readability.
Definition: simArtPartDescriptor.h:28
Definition: stateComponent.h:269
In order to be a well defined state component, you must:
Definition: articulatedPartStateComponent.h:69
virtual bool artPartListModified() const
Definition: articulatedPartStateComponent.h:84
DtArticulatedPartManager & articulatedPartManager()
Definition: articulatedPartStateComponent.h:50
#define UNDEFINED_RETURNREF_ACCESSORS(ReturnType, Member)
Definition: doubleBufferedDataStorage.h:40
virtual DtFrameStateInterface * nextFrameState() override
Definition: articulatedPartStateComponent.h:174
const DtArticulatedPartStateComponentData & frameState() const
Current frame state only can access current frame buffers. This ensures thread safety.
Definition: articulatedPartStateComponent.h:141
DtArticulatedPartStateComponentNextFrame myNextFrameState
Definition: articulatedPartStateComponent.h:210
DtArticulatedPartStateComponentData()
Definition: articulatedPartStateComponent.h:21
bool isDoubleBuffered()
Definition: articulatedPartStateComponent.h:172
virtual void aboutToBeDeleted() override
Definition: articulatedPartStateComponent.h:191
const DtArticulatedPartStateComponentData & frameState() const
Next frame access write access. Ensure this is only used in a single thread (i.e.a controller thread)...
Definition: articulatedPartStateComponent.h:97
bool myArtPartListModified
Definition: articulatedPartStateComponent.h:62
virtual void detachPartIfAttached(DtArtPartType partType)
Definition: articulatedPartStateComponent.h:86
virtual void updateStateData(DtStateData *sd) override
Implement to update data storage to the new state data.
Definition: articulatedPartStateComponent.h:181
Definition: coordSystem.h:54
The overall structure of the DtStateData mechanism is: The DtStateData contains a list of double buff...
Definition: stateData.h:398
DtArticulatedPartStateComponentData myData
Definition: articulatedPartStateComponent.h:130
#define DEFINE_STATE_COMPONENT_TYPE(CreatedComponent)
Definition: stateComponent.h:231
virtual void makeWritable() override
Override to make component writable.
Definition: articulatedPartStateComponent.h:112
Subclass from this to indicate that this will be a double buffered state component.
Definition: stateComponent.h:384
DtArticulatedPartStateComponentData(const DtArticulatedPartStateComponentData &orig)
Definition: articulatedPartStateComponent.h:32
Definition: stateComponent.h:75
DtStateComponentCreator< DtArticulatedPartStateComponentImplementation > DtArticulatedPartStateComponentCreator
5) Define the creator. This will need to be registered with the REGISTER_STATE_COMPONENT macro in the...
Definition: articulatedPartStateComponent.h:215
virtual void aboutToBeDeleted()
virtual void detachPart(DtArtPartType partType)
Definition: articulatedPartStateComponent.h:87
virtual const DtFrameStateInterface * currentFrameState() const override
Definition: articulatedPartStateComponent.h:173
virtual const DtFrameStateInterface * nextFrameState() const override
Definition: articulatedPartStateComponent.h:175
bool initialized() const
Definition: articulatedPartStateComponent.h:48
DtArticulatedPartStateComponentData & frameState()
Definition: articulatedPartStateComponent.h:98
std::shared_ptr< DtArticulatedPartManager > myarticulatedPartManager
Definition: articulatedPartStateComponent.h:57
DtArticulatedPartStateComponentData & operator=(const DtArticulatedPartStateComponentData &rhs)
Definition: articulatedPartStateComponent.h:39
4) Define the state component that will contain the wrappers to the next and current frame states tha...
Definition: articulatedPartStateComponent.h:167
bool artPartListModified() const
Definition: articulatedPartStateComponent.h:56
void create()
Definition: articulatedPartStateComponent.h:26
The DtArticulatedPartStateRepository class is used to represent articulated parts for an entity...
Definition: articulatedPartStateRepository.h:40
void advanceFrame(const DtArticulatedPartStateComponentData &data)
Definition: articulatedPartStateComponent.h:155
DtArticulatedPartStateComponentCurrentFrame myCurrentFrameState
Definition: articulatedPartStateComponent.h:209
#define DT_DLL_vrfStateData
This file is used to determine how to build Disable inconsistent dll linkage warning Visual Studio 6...
Definition: vrfStateDataDefines.h:26
const DtArticulatedPartManager & articulatedPartManager() const
Definition: articulatedPartStateComponent.h:49
void setArtPartListModified(bool b)
Definition: articulatedPartStateComponent.h:55
const DtArticulatedPartCollection & artPartList() const
Definition: articulatedPartStateComponent.h:52
bool myPublishOnLegionNetwork
Definition: articulatedPartStateComponent.h:131
virtual DtArticulatedPartStateRepository * attachPart(DtArtPartType partType)
Definition: articulatedPartStateComponent.h:83
Definition: articulatedPartStateComponent.h:19
3) Define the current frame class. This will be used for read access.
Definition: articulatedPartStateComponent.h:135
virtual void addParameterType(int partType, int parameterType)
Definition: articulatedPartStateComponent.h:85
Contains the DtStateComponent class declaration.
DtArticulatedPartStateComponentData myData
Definition: articulatedPartStateComponent.h:161
virtual void makeReadOnly() override
Override to make component read-only.
Definition: articulatedPartStateComponent.h:115
This is a simple base class that will be used to return a pointer to current or next frame state...
Definition: stateComponent.h:294
bool myUpdateFromLegionNetwork
Definition: articulatedPartStateComponent.h:162