![]() |
VR-Forces 5.0.3 Developer's Guide
|
The overall structure of the DtStateData mechanism is: The DtStateData contains a list of double buffered component data stores (subclasses of DtStateComponent). The double buffered data stores have accessors to the currentFrameState (read only) and the nextFrameState (read/write). The DtStateData class has wrapper class accessors to this nextFrameState (DtExternalNextFrameState) and the currentFrameState (DtExternalCurrentFrameState).
When a new component is added to the state data, the data store for that state component is created and the nextFrameState made available to the DtExternalNextFrameState (as well as being returned by the addStateComponent method). The DtExternalCurrentFrameState will not have access to the current state until the next advanceFrame on the DtStateData is called. Until that point, if called, the DtExternalCurrentFrameState will return a const pointer to the nextFrameState. The DtStateData class contains all the data for a particular object.