![]() |
VR-Forces 4.0.4 Class Documentation
|
The DtObjectDataInterface class is a wrapper around state views to give access to convenience methods which will allow developers to more easily access data about those objects. More...

Public Types | |
| enum | Representation { Local = 0, World = 1 } |
| Use these enums in various information methods to return data in local or world coordinates. More... | |
Public Member Functions | |
| DtObjectDataInterface (makVrv::DtDe &) | |
| virtual | ~DtObjectDataInterface () |
| makVrv::DtElementID | elementID () const |
| Returns the element id of this object. | |
| virtual makVrv::DtElementEntry::ElementType | type () const |
| Returns the type of this object. | |
| virtual makVrv::DtSimEntryUpdater::UpdateRate | setUpdateRate (makVrv::DtSimEntryUpdater::UpdateRate) |
| Sets the update rate for the data contained in this data interface. | |
| virtual void | setStateView (const makVrv::DtStateView< makVrv::DtSimState > *s) |
| Sets the base level state view of this object. | |
| makVrv::DtSimEntryUpdater::UpdateRate | updateRate () const |
| Returns the current update rate. | |
| virtual void | forceUpdate () |
| Forces an update of the data so on the next tick the network thread will update data in the gui thread. | |
| virtual bool | hasBeenRemoved () const |
| Returns true if this item has been removed from the simulation. | |
| virtual bool | isVisible () const |
| Returns true if the item is visible. | |
| virtual void | setVisible (bool) |
| Sets the item to visible or invisible. | |
| virtual bool | isSelected () const |
| Returns true if the item is selected. | |
| virtual void | removeFromSelection () |
| Removes the item from the current selection. | |
| virtual void | addToSelection (bool replace=false) |
| Adds the item to the current selection. If replace is true will replace the current selection and leave only the item. | |
Static Public Member Functions | |
| template<typename T_ObjectDataInterfaceType > | |
| static DtBoost::shared_ptr < T_ObjectDataInterfaceType > | cast (DtBoost::shared_ptr< DtObjectDataInterface > dataInterface) |
| This is a convenience method for casting a DtBoost::shared_ptr to a DtObjectDataInterface to a derived class. | |
Public Attributes | |
| boost::signal< void()> | signal_dataUpdated |
| Signal sent when any of this items data has been updated. | |
| boost::signal< void()> | signal_dataRemoved |
| Signal send when this items data has been removed. | |
Protected Member Functions | |
| virtual void | slot_simObjectEntryAboutToBeRemoved (makVrv::DtSimObjectEntry &) |
| Slot that is called when the state view is destroyed. Will mark this item as removed by clearing out internal pointers. | |
| virtual DtVector | geocentricVectorToLocalVector (const DtVector &localLocation, const DtVector &geocVector) const |
| Converts a geocentric vector to a local vector, given the local location. | |
| virtual void | slot_onStateViewUpdated () |
| Called when any of the state views data has been updated. Sends out signal_dataUpdated. | |
Protected Attributes | |
| makVrv::DtDe & | myDe |
| makVrv::DtStateView < makVrv::DtSimState > * | myStateView |
The DtObjectDataInterface class is a wrapper around state views to give access to convenience methods which will allow developers to more easily access data about those objects.
It will also provide some basic manipulation for that object. Instances of this class and its subclasses, are returned by the DtVrfStateViewCollectionManager.
The DtObjectDataInterface class is a base class that is inherited by subclasses to provide their specific data content. The type() method will return the type of class, and, using that information you can dynamically cast to the appropriate class:
| virtual makVrf::DtObjectDataInterface::~DtObjectDataInterface | ( | ) | [virtual] |
Returns the element id of this object.
If returns 0 the object has been removed from the simulation
| virtual makVrv::DtElementEntry::ElementType makVrf::DtObjectDataInterface::type | ( | ) | const [virtual] |
Returns the type of this object.
Used for dynamic casting to proper sub-class.
Reimplemented in makVrf::DtEntityDataInterface, makVrf::DtAggregateDataInterface, makVrf::DtTacticalGraphicDataInterface, and makVrf::DtSpotReportDataInterface.
| static DtBoost::shared_ptr<T_ObjectDataInterfaceType> makVrf::DtObjectDataInterface::cast | ( | DtBoost::shared_ptr< DtObjectDataInterface > | dataInterface | ) | [inline, static] |
This is a convenience method for casting a DtBoost::shared_ptr to a DtObjectDataInterface to a derived class.
| virtual makVrv::DtSimEntryUpdater::UpdateRate makVrf::DtObjectDataInterface::setUpdateRate | ( | makVrv::DtSimEntryUpdater::UpdateRate | ) | [virtual] |
Sets the update rate for the data contained in this data interface.
The update rate is the rate at which data from the network thread gets posted to the GUI thread. The current update rate is returned. Note that when this object is deleted the update rate will not be restored to the original rate. Any increase or decrease in rate will be maintained for this data until the next change
| virtual void makVrf::DtObjectDataInterface::setStateView | ( | const makVrv::DtStateView< makVrv::DtSimState > * | s | ) | [virtual] |
Sets the base level state view of this object.
Reimplemented in makVrf::DtVrfVrlinkDataInterface, makVrf::DtSpotReportDataInterface, makVrf::DtEntityDataInterface, makVrf::DtAggregateDataInterface, and makVrf::DtTacticalGraphicDataInterface.
Returns the current update rate.
| virtual void makVrf::DtObjectDataInterface::forceUpdate | ( | ) | [virtual] |
Forces an update of the data so on the next tick the network thread will update data in the gui thread.
| virtual bool makVrf::DtObjectDataInterface::hasBeenRemoved | ( | ) | const [virtual] |
Returns true if this item has been removed from the simulation.
| virtual bool makVrf::DtObjectDataInterface::isVisible | ( | ) | const [virtual] |
Returns true if the item is visible.
| virtual void makVrf::DtObjectDataInterface::setVisible | ( | bool | ) | [virtual] |
Sets the item to visible or invisible.
If setting to be invisible and the item is selected, will be removed from the current selection. If set to visible will not be restored to selection. Call addToSelection to restore to selection
| virtual bool makVrf::DtObjectDataInterface::isSelected | ( | ) | const [virtual] |
Returns true if the item is selected.
| virtual void makVrf::DtObjectDataInterface::removeFromSelection | ( | ) | [virtual] |
Removes the item from the current selection.
| virtual void makVrf::DtObjectDataInterface::addToSelection | ( | bool | replace = false | ) | [virtual] |
Adds the item to the current selection. If replace is true will replace the current selection and leave only the item.
| virtual void makVrf::DtObjectDataInterface::slot_simObjectEntryAboutToBeRemoved | ( | makVrv::DtSimObjectEntry & | ) | [protected, virtual] |
Slot that is called when the state view is destroyed. Will mark this item as removed by clearing out internal pointers.
Reimplemented in makVrf::DtVrfVrlinkDataInterface, makVrf::DtEntityDataInterface, makVrf::DtTacticalGraphicDataInterface, makVrf::DtSpotReportDataInterface, and makVrf::DtAggregateDataInterface.
| virtual DtVector makVrf::DtObjectDataInterface::geocentricVectorToLocalVector | ( | const DtVector & | localLocation, |
| const DtVector & | geocVector | ||
| ) | const [protected, virtual] |
Converts a geocentric vector to a local vector, given the local location.
| virtual void makVrf::DtObjectDataInterface::slot_onStateViewUpdated | ( | ) | [protected, virtual] |
Called when any of the state views data has been updated. Sends out signal_dataUpdated.
| boost::signal<void ()> makVrf::DtObjectDataInterface::signal_dataUpdated |
Signal sent when any of this items data has been updated.
| boost::signal<void ()> makVrf::DtObjectDataInterface::signal_dataRemoved |
Signal send when this items data has been removed.
makVrv::DtDe& makVrf::DtObjectDataInterface::myDe [protected] |