![]() |
VR-Forces Developer's Guide
|
Write-access view of the next-frame state components within a DtStateData. Only the simulation (controller) thread should use this to write state.

Public Member Functions | |
| DtExternalNextFrameState (DtStateData *sd) | |
| virtual | ~DtExternalNextFrameState () override |
| virtual void | addStateComponent (DtFrameStateInterface *) override |
| DtFrameStateInterface * | addStateComponent (DtStateComponent::StateComponentType type, const DtVrfObjectParameters *=nullptr) |
| template<typename T_Component > | |
| T_Component * | addStateComponent (bool checkWritable=false, bool isRemote=false) |
| std::set< int > | modifiedStateComponentTypes () const |
| bool | isModified () const |
| void | nextFrameRemoveStateComponent (const DtFrameStateInterface *component) |
| template<typename T_Component > | |
| void | removeStateComponents () |
| virtual int | numComponents (DtStateComponent::StateComponentType scType) const override |
| template<typename T_Component > | |
| const T_Component * | getStateComponent (int index=0) const |
| template<typename T_Component > | |
| std::vector< T_Component * > | getStateComponentList () const |
| virtual const DtFrameStateInterface * | getStateComponent (DtStateComponent::StateComponentType scType, int index=0) const override |
| DtFrameStateInterface * | getStateComponent (DtStateComponent::StateComponentType scType, int index=0) |
| virtual bool | hasStateComponentType (DtStateComponent::StateComponentType scType) const override |
| virtual void | addStateComponent (const DtFrameStateInterface *comp) override |
| template<typename T_Component > | |
| bool | isWritable () |
| template<typename T_Component > | |
| T_Component * | getStateComponent (int index=0, bool checkWritable=true) |
| void | takeControlOfComponent (DtStateComponent *) |
| virtual const DtString & | markingText () const override |
| int | numberOfFrameStates () const |
Public Member Functions inherited from makVrf::DtExternalFrameStateInterface | |
| DtExternalFrameStateInterface (DtStateData *sd) | |
| virtual | ~DtExternalFrameStateInterface () |
| template<typename T_Component > | |
| bool | hasStateComponent () const |
| template<typename T_Component > | |
| const T_Component * | getStateComponent () const |
| template<typename T_Component > | |
| std::vector< const T_Component * > | getStateComponentList () const |
| virtual void | aboutToBeDeleted () |
| unsigned long long | legionGlobalId () const |
Protected Member Functions | |
| virtual void | removeStateComponent (const DtFrameStateInterface *component) override |
Protected Attributes | |
| std::vector< std::vector < DtFrameStateInterface * > > | myFrameState {} |
Protected Attributes inherited from makVrf::DtExternalFrameStateInterface | |
| DtStateData * | myStateData |
| bool | myCleared |
Friends | |
| class | DtStateData |
Additional Inherited Members | |
Public Attributes inherited from makVrf::DtExternalFrameStateInterface | |
| boost::signals2::signal< void(const DtExternalFrameStateInterface *)> | signal_externalFrameStateToBeDestroyed |
|
inline |
Constructs the next-frame state view for the given state data.
| sd | The owning state data object. |
|
overridevirtual |
|
overridevirtual |
Adds a writable state component interface to this next-frame view.
| comp | The writable frame state interface to add. |
Reimplemented from makVrf::DtExternalFrameStateInterface.
| DtFrameStateInterface* makVrf::DtExternalNextFrameState::addStateComponent | ( | DtStateComponent::StateComponentType | type, |
| const DtVrfObjectParameters * | = nullptr |
||
| ) |
Creates and adds a state component of the given type using the component factory.
| type | The state component type to create. |
| params | Optional object parameters used to initialize the component. |
| T_Component* makVrf::DtExternalNextFrameState::addStateComponent | ( | bool | checkWritable = false, |
| bool | isRemote = false |
||
| ) |
Using the global state component factory, creates and adds a new state of the given type.
| std::set<int> makVrf::DtExternalNextFrameState::modifiedStateComponentTypes | ( | ) | const |
| bool makVrf::DtExternalNextFrameState::isModified | ( | ) | const |
| void makVrf::DtExternalNextFrameState::nextFrameRemoveStateComponent | ( | const DtFrameStateInterface * | component | ) |
Goes to the state data to remove this for the next frame. This is queued, so, the state component is still available.
| void makVrf::DtExternalNextFrameState::removeStateComponents | ( | ) |
Queues the removal of all next-frame state components of the given type.
| T_Component | The state component type to remove. |
|
inlineoverridevirtual |
| scType | The state component type enum value. |
Implements makVrf::DtExternalFrameStateInterface.
|
inline |
Returns a const pointer to the next-frame state component of the given type. Throws DtUnknownStateComponent if the component is not found or the cast fails.
| T_Component | The specific state component type to retrieve. |
| index | Zero-based index when multiple components of the same type exist. |
|
inline |
Returns a vector of writable pointers to all next-frame components of the given type.
| T_Component | The specific state component type to collect. |
|
inlineoverridevirtual |
Returns a const pointer to the next-frame state component of the given type at the specified index.
| scType | The state component type enum value. |
| index | Zero-based index. |
Implements makVrf::DtExternalFrameStateInterface.
|
inline |
Returns a writable pointer to the next-frame state component of the given type at the specified index.
| scType | The state component type enum value. |
| index | Zero-based index. |
|
overridevirtual |
| scType | The state component type enum value. |
Implements makVrf::DtExternalFrameStateInterface.
|
overridevirtual |
Adds a read-only state component to the next-frame view (used during frame commit).
| comp | The read-only component interface to register. |
Implements makVrf::DtExternalFrameStateInterface.
|
inline |
| T_Component | The state component type to check. |
|
inline |
Returns a writable pointer to the next-frame state component of the given type. Throws DtUnknownStateComponent if the component is not found, the cast fails, or checkWritable is true and the component is not writable.
| T_Component | The specific state component type to retrieve. |
| index | Zero-based index when multiple components of the same type exist. |
| checkWritable | If true, throws if the component is not writable. |
| void makVrf::DtExternalNextFrameState::takeControlOfComponent | ( | DtStateComponent * | ) |
Transfers ownership of this state component to this frame state view.
| comp | The state component whose ownership is being transferred. |
|
overridevirtual |
Reimplemented from makVrf::DtExternalFrameStateInterface.
|
inline |
|
overrideprotectedvirtual |
Removes the state component from the next list such that in an apply frame it will not be applied and removed from the current list. It is still current until the frame advances. Should never be called by developer directly.
Implements makVrf::DtExternalFrameStateInterface.
|
friend |
|
protected |
The table of writable next-frame state component interfaces, indexed by state component type.