![]() |
VR-Forces 4.0.4 Class Documentation
|
The DtLocalObjectManager is the interface to be used when creating objects that are not to be published as part of the simulation. More...

Public Member Functions | |
| DtLocalObjectManager (makVrv::DtDe &de) | |
| virtual | ~DtLocalObjectManager () |
| virtual bool | isCreating () const |
| Returns true if the object manager is in creation mode. | |
| virtual void | tacticalGraphicsVertexSelected (const makVrv::DtUniqueID &selected, const makVrv::DtUniqueID &parentElementID) |
| Called when a vertex is selected. Selects in local representation. | |
| virtual void | tacticalGraphicsVertexDeselected (const makVrv::DtUniqueID &deselected, const makVrv::DtUniqueID &parent) |
| Called when a vertex is deselected. Deselects in local representation. | |
| virtual void | slot_onCurrentSelectionChanged (const makVrv::DtSelectionManager::IdSet &selected, const makVrv::DtSelectionManager::IdSet &deselected) |
| Called when current selection changes. If selection contains a local object, selects that. | |
| virtual DtEnvironmentalFacadeCollection * | create (const DtEntityType &t, const std::vector< DtVector > &localPoints, int force, const DtEnvironmentalCreationData &, int modelSet=-1) |
| Create a tactical graphic of type t with name, on first of: | |
| virtual DtEntityFacadeCollection * | create (const DtEntityCreationData &, const std::string &layer="", int modelSet=-1) |
| Create a entity of type t with name, on first of: | |
| virtual const makVrv::DtTacticalGraphicOverlay * | createOnLayer (const std::string &layerName="") |
| Returns the layer to use for creating the local object. | |
| virtual void | completeStateUpdate (makVrv::DtUniqueID id) |
| Called when editing of object is complete. Will update local representation. | |
| virtual void | setVisible (makVrv::DtUniqueID id, bool hide) |
| Sets the specified local object to be shown or hidden. | |
| virtual bool | isLocal (makVrv::DtUniqueID id) const |
| Determine whether we are looking at a stock or local object. | |
| virtual void | updateState (makVrv::DtUniqueID id) |
| virtual void | setEditable (makVrv::DtUniqueID id, bool) |
| Sets to be editable. | |
| virtual bool | isEditable (makVrv::DtUniqueID id) const |
| Ask the tactical graphic overlay manager for the status of the overlay if it is 'locked' it should not be editable. | |
| virtual bool | isMemberOfLayer (makVrv::DtUniqueID id, const std::string &layername) const |
| return true if given graphic ID is member of layer | |
| virtual void | deleteLocal (makVrv::DtUniqueID id) |
| Deletes the specified local object. | |
| virtual void | deleteAll () |
| Deletes all local objects. | |
| virtual void | deleteAllFromLayer (const std::string &layername) |
| Deletes all the objects on the specified layer. | |
| virtual void | update (makVrv::DtElementID id, const std::string *name=0, const std::vector< DtVector > &points=std::vector< DtVector >(), int *force=0, const std::string *overlay=0, const std::string *userData=0, double *newHeading=0) |
| Call to update state data of specified object and update it so local object will also be changed. | |
| virtual DtVector | getVertexPosition (makVrv::DtElementID parent, makVrv::DtUniqueID vertexId) const |
| Given an element id and a vertex id, return the position of that vertex. | |
| virtual void | create (const DtEntityType &t, int force) |
| Creates an object interactively, meaning it will bring up the create dialog, and, once complete, will create a new representation in this manager. | |
| virtual bool | allSelectionIsLocal () const |
| Return true if the entire selection only contains local objects. | |
Static Public Member Functions | |
| static DtLocalObjectManager & | instance (makVrv::DtDe &de) |
| static void | registerInstance (makVrv::DtDe &de, DtLocalObjectManager *) |
Public Attributes | |
| boost::signal< void(bool)> | signal_creating |
| boost::signal< void(DtVrfObjectFacadeInterface *, makVrv::DtVrlinkSimulatedBaseState *)> | signal_objectCreated |
| Sent when a local object is created. | |
| boost::signal< void(DtVrfObjectFacadeInterface *)> | signal_objectAboutToBeDeleted |
| Sent when a local object is about to be deleted. | |
Protected Types | |
| typedef std::map < makVrv::DtUniqueID, DtVrfObjectFacadeInterface * > | LocalObjects |
| Collection of local Facades. | |
| typedef std::map < makVrv::DtUniqueID, makVrv::DtVrlinkSimulatedBaseState * > | LocalStateData |
Protected Member Functions | |
| virtual void | slot_elementAttributeChangeRequested (makVrv::DtUniqueID id, makVrv::DtUniqueID parentId, DtBoost::shared_ptr< const makVrv::DtElementAttribute > atr) |
| Called when an element attribute has changed, handle if a local object. | |
| virtual void | handleElementAttributeChanged (makVrv::DtUniqueID id, const makVrv::DtElementAttribute *attr) |
| virtual void | slot_onStateViewUpdated (makVrv::DtStateView< makVrv::DtVrlinkSimulatedBaseState > *) |
| Called when state view is updated, will update local object. | |
| virtual void | completeStateViewUpdated (makVrv::DtStateView< makVrv::DtVrlinkSimulatedBaseState > *) |
| Called in pre-tick from a connection made in slot_onStateViewUpdated. | |
| virtual void | update (DtEnvironmentalFacadeCollection *, const DtVrlinkSimulatedEnvironmentProcess *) |
| Updates facades based on state. | |
| virtual void | update (DtEntityFacadeCollection *, const makVrv::DtVrlinkSimulatedEntityState *) |
| virtual void | finalizeObjectCreation (const DtEntityType &, std::string name, int, const std::vector< DtVector > &, double, bool, bool) |
| Called when interactive local object creation has been stopped or created. | |
| virtual void | slot_stoppedObjectCreation () |
Protected Attributes | |
| makVrv::DtDe & | myDe |
| bool | myIsCreating |
| LocalObjects | myObjects |
| makVrv::DtSignalConnectionManager | myConnections |
| LocalStateData | myData |
The DtLocalObjectManager is the interface to be used when creating objects that are not to be published as part of the simulation.
This manager will maintain all listeners and visualizers that are used for these objects.
typedef std::map<makVrv::DtUniqueID, DtVrfObjectFacadeInterface*> makVrf::DtLocalObjectManager::LocalObjects [protected] |
Collection of local Facades.
typedef std::map<makVrv::DtUniqueID, makVrv::DtVrlinkSimulatedBaseState*> makVrf::DtLocalObjectManager::LocalStateData [protected] |
| virtual makVrf::DtLocalObjectManager::~DtLocalObjectManager | ( | ) | [virtual] |
| static DtLocalObjectManager& makVrf::DtLocalObjectManager::instance | ( | makVrv::DtDe & | de | ) | [static] |
| static void makVrf::DtLocalObjectManager::registerInstance | ( | makVrv::DtDe & | de, |
| DtLocalObjectManager * | |||
| ) | [static] |
| virtual bool makVrf::DtLocalObjectManager::isCreating | ( | ) | const [virtual] |
Returns true if the object manager is in creation mode.
| virtual void makVrf::DtLocalObjectManager::tacticalGraphicsVertexSelected | ( | const makVrv::DtUniqueID & | selected, |
| const makVrv::DtUniqueID & | parentElementID | ||
| ) | [virtual] |
Called when a vertex is selected. Selects in local representation.
| virtual void makVrf::DtLocalObjectManager::tacticalGraphicsVertexDeselected | ( | const makVrv::DtUniqueID & | deselected, |
| const makVrv::DtUniqueID & | parent | ||
| ) | [virtual] |
Called when a vertex is deselected. Deselects in local representation.
| virtual void makVrf::DtLocalObjectManager::slot_onCurrentSelectionChanged | ( | const makVrv::DtSelectionManager::IdSet & | selected, |
| const makVrv::DtSelectionManager::IdSet & | deselected | ||
| ) | [virtual] |
Called when current selection changes. If selection contains a local object, selects that.
| virtual DtEnvironmentalFacadeCollection* makVrf::DtLocalObjectManager::create | ( | const DtEntityType & | t, |
| const std::vector< DtVector > & | localPoints, | ||
| int | force, | ||
| const DtEnvironmentalCreationData & | , | ||
| int | modelSet = -1 |
||
| ) | [virtual] |
Create a tactical graphic of type t with name, on first of:
Points are in local database coordinates. If modelSet is not -1, create only for the specified model set
| virtual DtEntityFacadeCollection* makVrf::DtLocalObjectManager::create | ( | const DtEntityCreationData & | , |
| const std::string & | layer = "", |
||
| int | modelSet = -1 |
||
| ) | [virtual] |
Create a entity of type t with name, on first of:
Origin is in local database coordinates. If modelSet is not -1, creaet only for the specified model set
| virtual const makVrv::DtTacticalGraphicOverlay* makVrf::DtLocalObjectManager::createOnLayer | ( | const std::string & | layerName = "" | ) | [virtual] |
Returns the layer to use for creating the local object.
| virtual void makVrf::DtLocalObjectManager::completeStateUpdate | ( | makVrv::DtUniqueID | id | ) | [virtual] |
Called when editing of object is complete. Will update local representation.
| virtual void makVrf::DtLocalObjectManager::setVisible | ( | makVrv::DtUniqueID | id, |
| bool | hide | ||
| ) | [virtual] |
Sets the specified local object to be shown or hidden.
| virtual bool makVrf::DtLocalObjectManager::isLocal | ( | makVrv::DtUniqueID | id | ) | const [virtual] |
Determine whether we are looking at a stock or local object.
| virtual void makVrf::DtLocalObjectManager::updateState | ( | makVrv::DtUniqueID | id | ) | [virtual] |
| virtual void makVrf::DtLocalObjectManager::setEditable | ( | makVrv::DtUniqueID | id, |
| bool | |||
| ) | [virtual] |
Sets to be editable.
If on locked layer will still not be editable, however, set to false, and, on an unlocked layer will not be editable
| virtual bool makVrf::DtLocalObjectManager::isEditable | ( | makVrv::DtUniqueID | id | ) | const [virtual] |
Ask the tactical graphic overlay manager for the status of the overlay if it is 'locked' it should not be editable.
| virtual bool makVrf::DtLocalObjectManager::isMemberOfLayer | ( | makVrv::DtUniqueID | id, |
| const std::string & | layername | ||
| ) | const [virtual] |
return true if given graphic ID is member of layer
| virtual void makVrf::DtLocalObjectManager::deleteLocal | ( | makVrv::DtUniqueID | id | ) | [virtual] |
Deletes the specified local object.
| virtual void makVrf::DtLocalObjectManager::deleteAll | ( | ) | [virtual] |
Deletes all local objects.
| virtual void makVrf::DtLocalObjectManager::deleteAllFromLayer | ( | const std::string & | layername | ) | [virtual] |
Deletes all the objects on the specified layer.
| virtual void makVrf::DtLocalObjectManager::update | ( | makVrv::DtElementID | id, |
| const std::string * | name = 0, |
||
| const std::vector< DtVector > & | points = std::vector< DtVector >(), |
||
| int * | force = 0, |
||
| const std::string * | overlay = 0, |
||
| const std::string * | userData = 0, |
||
| double * | newHeading = 0 |
||
| ) | [virtual] |
Call to update state data of specified object and update it so local object will also be changed.
Will end up calling slot_onStateViewUpdated. Set items to NULL to now update them. Point vector of 0 length will be considered NULL. Points must be in local database coordinates.
| virtual DtVector makVrf::DtLocalObjectManager::getVertexPosition | ( | makVrv::DtElementID | parent, |
| makVrv::DtUniqueID | vertexId | ||
| ) | const [virtual] |
Given an element id and a vertex id, return the position of that vertex.
| virtual void makVrf::DtLocalObjectManager::create | ( | const DtEntityType & | t, |
| int | force | ||
| ) | [virtual] |
Creates an object interactively, meaning it will bring up the create dialog, and, once complete, will create a new representation in this manager.
| virtual bool makVrf::DtLocalObjectManager::allSelectionIsLocal | ( | ) | const [virtual] |
Return true if the entire selection only contains local objects.
| virtual void makVrf::DtLocalObjectManager::slot_elementAttributeChangeRequested | ( | makVrv::DtUniqueID | id, |
| makVrv::DtUniqueID | parentId, | ||
| DtBoost::shared_ptr< const makVrv::DtElementAttribute > | atr | ||
| ) | [protected, virtual] |
Called when an element attribute has changed, handle if a local object.
| virtual void makVrf::DtLocalObjectManager::handleElementAttributeChanged | ( | makVrv::DtUniqueID | id, |
| const makVrv::DtElementAttribute * | attr | ||
| ) | [protected, virtual] |
| virtual void makVrf::DtLocalObjectManager::slot_onStateViewUpdated | ( | makVrv::DtStateView< makVrv::DtVrlinkSimulatedBaseState > * | ) | [protected, virtual] |
Called when state view is updated, will update local object.
| virtual void makVrf::DtLocalObjectManager::completeStateViewUpdated | ( | makVrv::DtStateView< makVrv::DtVrlinkSimulatedBaseState > * | ) | [protected, virtual] |
Called in pre-tick from a connection made in slot_onStateViewUpdated.
| virtual void makVrf::DtLocalObjectManager::update | ( | DtEnvironmentalFacadeCollection * | , |
| const DtVrlinkSimulatedEnvironmentProcess * | |||
| ) | [protected, virtual] |
Updates facades based on state.
| virtual void makVrf::DtLocalObjectManager::update | ( | DtEntityFacadeCollection * | , |
| const makVrv::DtVrlinkSimulatedEntityState * | |||
| ) | [protected, virtual] |
| virtual void makVrf::DtLocalObjectManager::finalizeObjectCreation | ( | const DtEntityType & | , |
| std::string | name, | ||
| int | , | ||
| const std::vector< DtVector > & | , | ||
| double | , | ||
| bool | , | ||
| bool | |||
| ) | [protected, virtual] |
Called when interactive local object creation has been stopped or created.
| virtual void makVrf::DtLocalObjectManager::slot_stoppedObjectCreation | ( | ) | [protected, virtual] |
| boost::signal<void (bool)> makVrf::DtLocalObjectManager::signal_creating |
Signals for local object manager
Sent when local object manager starts creating an object
| boost::signal<void (DtVrfObjectFacadeInterface*, makVrv::DtVrlinkSimulatedBaseState*)> makVrf::DtLocalObjectManager::signal_objectCreated |
Sent when a local object is created.
| boost::signal<void (DtVrfObjectFacadeInterface*)> makVrf::DtLocalObjectManager::signal_objectAboutToBeDeleted |
Sent when a local object is about to be deleted.
makVrv::DtDe& makVrf::DtLocalObjectManager::myDe [protected] |
bool makVrf::DtLocalObjectManager::myIsCreating [protected] |
LocalObjects makVrf::DtLocalObjectManager::myObjects [protected] |
LocalStateData makVrf::DtLocalObjectManager::myData [protected] |