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...
|
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.
|
Detailed Description
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:
- Note
- Instances of this object (and subclasses) are commonly passed around within boost shared pointers (DtBoost::shared_ptr) objects, and so they must be casted using DtBoost::dynamic_pointer_cast() or the cast() function in this class.
- See Also
- DtVrfStateViewCollectionManager
- Related examples
-
Member Enumeration Documentation
Use these enums in various information methods to return data in local or world coordinates.
- Enumerator:
-
Constructor & Destructor Documentation
| makVrf::DtObjectDataInterface::DtObjectDataInterface |
( |
makVrv::DtDe & |
| ) |
|
| virtual makVrf::DtObjectDataInterface::~DtObjectDataInterface |
( |
| ) |
|
|
virtual |
Member Function Documentation
Returns the element id of this object.
If returns 0 the object has been removed from the simulation
template<typename T_ObjectDataInterfaceType >
| static DtBoost::shared_ptr<T_ObjectDataInterfaceType> makVrf::DtObjectDataInterface::cast |
( |
DtBoost::shared_ptr< DtObjectDataInterface > |
dataInterface | ) |
|
|
inlinestatic |
This is a convenience method for casting a DtBoost::shared_ptr to a DtObjectDataInterface to a derived class.
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
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::isValid |
( |
| ) |
const |
|
virtual |
Returns true if this is a valid data interface.
| 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 DtVector makVrf::DtObjectDataInterface::geocentricVectorToLocalVector |
( |
const DtVector & |
localLocation, |
|
|
const DtVector & |
geocVector |
|
) |
| const |
|
protectedvirtual |
Converts a geocentric vector to a local vector, given the local location.
| virtual void makVrf::DtObjectDataInterface::slot_onStateViewUpdated |
( |
| ) |
|
|
protectedvirtual |
Called when any of the state views data has been updated. Sends out signal_dataUpdated.
Member Data Documentation
| 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.
The documentation for this class was generated from the following file:
- /exports/nfedora7-1/nightly/docs/vrforcesDevelopment.vrf4-3-branch/include/vrfGuiCore/objectDataInterface.h