![]() |
VR-Forces 4.10 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...

Classes | |
| struct | LastCheckedGroundInformation |
| struct | LocalObjectUpdateStructure |
| Call to update state data of specified object and update it so local object will also be changed. More... | |
Public Types | |
| enum | ClampFlag { Highest = 0, Lowest, Closest, ClosestDown } |
Public Member Functions | |
| DtLocalObjectManager (makVrv::DtDe &de) | |
| virtual | ~DtLocalObjectManager () |
| virtual bool | isCreating () const |
| Returns true if the object manager is in creation mode. More... | |
| virtual void | tacticalGraphicsVertexSelected (const makVrv::DtUniqueID &selected, const makVrv::DtUniqueID &parentElementID) |
| Called when a vertex is selected. Selects in local representation. More... | |
| virtual void | tacticalGraphicsVertexDeselected (const makVrv::DtUniqueID &deselected, const makVrv::DtUniqueID &parent) |
| Called when a vertex is deselected. Deselects in local representation. More... | |
| 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. More... | |
| virtual DtVrfObjectFacadeInterface * | facadeForID (makVrv::DtUniqueID) |
| Return the object for the given ID, or NULL if it does not exist. More... | |
| virtual std::vector < makVrv::DtUniqueID > | uniqueIdsForTypesThatMatch (const DtEntityType &) const |
| Returns a list of unique ids for objects that match the entity type given. More... | |
| virtual DtEnvironmentalFacadeCollection * | create (const DtVrlinkSimulatedEnvironmentProcess &, int dictionartToUse=-1) |
| Create a tactical graphic from the supplied state. More... | |
| virtual DtEnvironmentalFacadeCollection * | create (const DtEntityType &t, const std::vector< DtVector > &localPoints, int force, const DtEnvironmentalCreationData &, int modelSet=-1, bool keepName=false, int dictionaryToUse=-1) |
| Create a tactical graphic of type t with name, on first of: More... | |
| virtual DtEntityFacadeCollection * | create (const makVrv::DtVrlinkSimulatedEntityState &, const std::string &overlayParent="", int dictionaryToUse=-1) |
| Create a tactical graphic from the supplied state. More... | |
| virtual DtEntityFacadeCollection * | create (const DtEntityCreationData &, int modelSet=-1, bool keepName=false, int dictionaryToUse=-1) |
| Create a entity of type t with name, on first of: More... | |
| virtual DtVrfObjectFacadeInterface * | createObject (const DtVrfObjectManipulationHandlerBaseClass::ObjectManipulationData &, const bool showInObjectList=false) |
| Called when interactive local object creation has been stopped or created. More... | |
| virtual const makVrv::DtTacticalGraphicOverlay * | createOnLayer (const std::string &layerName="") |
| Returns the layer to use for creating the local object. More... | |
| virtual void | completeStateUpdate (makVrv::DtUniqueID id) |
| Called when editing of object is complete. Will update local representation. More... | |
| virtual void | setVisible (makVrv::DtUniqueID id, bool hide) |
| Sets the specified local object to be shown or hidden. More... | |
| virtual bool | isLocal (makVrv::DtUniqueID id) const |
| Determine whether we are looking at a stock or local object. More... | |
| virtual void | updateState (makVrv::DtUniqueID id) |
| virtual void | setEditable (makVrv::DtUniqueID id, bool) |
| Sets to be editable. More... | |
| virtual bool | isEditable (makVrv::DtUniqueID id, const std::string &keywords="") const |
| Ask the tactical graphic overlay manager for the status of the overlay if it is 'locked' it should not be editable. More... | |
| virtual bool | isMemberOfLayer (makVrv::DtUniqueID id, const std::string &layername) const |
| return true if given graphic ID is member of layer More... | |
| virtual void | deleteLocal (makVrv::DtUniqueID id) |
| Deletes the specified local object. More... | |
| virtual void | deleteAll (std::vector< DtEntityType > except=std::vector< DtEntityType >()) |
| Deletes all local objects except for any object types specified. More... | |
| virtual void | deleteAllFromLayer (const std::string &layername) |
| Deletes all the objects on the specified layer. More... | |
| virtual void | update (makVrv::DtElementID id, const LocalObjectUpdateStructure &updateStructure, bool forceUpdate=true) |
| virtual DtVector | getVertexPosition (makVrv::DtElementID parent, makVrv::DtUniqueID vertexId) const |
| Given an element id and a vertex id, return the position of that vertex. More... | |
| 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. More... | |
| virtual bool | allSelectionIsLocal () const |
| Return true if the entire selection only contains local objects. More... | |
| virtual void | setCanCreateLocalObjects (bool) |
| Set to false to disallow creation of local objects. Default is true. More... | |
| virtual bool | canCreateLocalObjects () const |
| Return true if can create local objects instead of published ones via the create process. Default is true. More... | |
| virtual void | save (const std::string &) |
| Saves contents of local object manager to file. More... | |
| virtual std::string | toStringBuffer () |
| Saves to a string buffer. More... | |
| virtual bool | fromStringBuffer (const std::string &, bool removeAll=true) |
| Restores from the string buffer. More... | |
| virtual bool | load (const std::string &, bool removeAll=true) |
| Loads and creates objects in file into local object manager. Deletes all local objects first before restoring. More... | |
| virtual int | numberOfLocalObjects () const |
| Returns number of local objects. More... | |
| virtual double | groundHeight (const DtVector &lp, makVrv::DtIntersector::IntersectProperties props=makVrv::DtIntersector::SupportNodes, ClampFlag clampFlag=Closest, DtVector *clampedPoint=0, const std::vector< makVrv::DtUniqueID > &ignore=std::vector< makVrv::DtUniqueID >(), makVrv::DtUniqueID *hitId=0) const |
| Return the height of the ground at the current point. More... | |
| virtual DtVector | clampToGround (const DtVector &, makVrv::DtIntersector::IntersectProperties props=makVrv::DtIntersector::SupportNodes, const std::vector< makVrv::DtUniqueID > &ignore=std::vector< makVrv::DtUniqueID >(), bool useHighestLOD=false, bool ignoreDynamicOcean=false, ClampFlag useHighestPolygon=Closest, makVrv::DtUniqueID *hitId=0) const |
| Return supplied local position as clamped to ground. More... | |
| virtual DtGeodeticCoord | clampToGround (const DtGeodeticCoord &, makVrv::DtIntersector::IntersectProperties props=makVrv::DtIntersector::SupportNodes, const std::vector< makVrv::DtUniqueID > &ignore=std::vector< makVrv::DtUniqueID >(), bool useHighestLOD=false, bool ignoreDynamicOcean=false, ClampFlag useHighestPolygon=Closest, makVrv::DtUniqueID *hitId=0) const |
| Return supplied geocentric position as a geocentric clamped to ground position. More... | |
| virtual std::string | generateUniqueName (const std::string &base, bool addNumberToBegin=false) const |
| virtual void | ignoreFromArchive (const DtEntityType &) |
| Add an entity type to not be allowed to archive. More... | |
| virtual void | removeIgnoreFromArchive (const DtEntityType &) |
Public Member Functions inherited from makVrv::DtVirtualBaseClass | |
| DtVirtualBaseClass () | |
| Do nothing constructor. More... | |
| virtual | ~DtVirtualBaseClass () |
| Virtual do nothing destructor. More... | |
Static Public Member Functions | |
| static DtLocalObjectManager & | instance (makVrv::DtDe &de) |
| static void | registerInstance (makVrv::DtDe &de, DtLocalObjectManager *) |
Public Attributes | |
| boost::signals2::signal< void(bool)> | signal_creating |
| boost::signals2::signal< void(DtVrfObjectFacadeInterface *, makVrv::DtVrlinkSimulatedBaseState *)> | signal_objectCreated |
| Sent when a local object is created. More... | |
| boost::signals2::signal< void(DtVrfObjectFacadeInterface *)> | signal_objectAboutToBeDeleted |
| Sent when a local object is about to be deleted. More... | |
| boost::signals2::signal< void(bool)> | signal_loading |
| Signal sent when loading the overlay file. True is before read, false after. More... | |
| boost::signals2::signal< void(makVrv::DtUniqueID)> | signal_objectDeleted |
| Signal sent after the object has been fully removed. More... | |
| boost::signals2::signal< void()> | signal_terrainClearing |
| Signals for when the terrainis clearing/cleared. More... | |
| boost::signals2::signal< void()> | signal_terrainCleared |
Protected Types | |
| typedef std::map < makVrv::DtUniqueID, DtVrfObjectFacadeInterface * > | LocalObjects |
| Collection of local Facades. More... | |
| typedef std::map < makVrv::DtUniqueID, makVrv::DtVrlinkSimulatedBaseState * > | LocalStateData |
Protected Member Functions | |
| virtual void | slot_objectVisibilityChanged (makVrv::DtUniqueID id, bool isShown, int context) |
| Called when an element attribute has changed, handle if a local object. More... | |
| virtual void | slot_onStateViewUpdated (makVrv::DtStateView< makVrv::DtVrlinkSimulatedBaseState > *) |
| Called when state view is updated, will update local object. More... | |
| virtual void | completeStateViewUpdated (makVrv::DtStateView< makVrv::DtVrlinkSimulatedBaseState > *, bool forceIfHidden=false) |
| Called in pre-tick from a connection made in slot_onStateViewUpdated. More... | |
| virtual void | update (DtEnvironmentalFacadeCollection *, const DtVrlinkSimulatedEnvironmentProcess *) |
| Updates facades based on state. More... | |
| virtual void | update (DtEntityFacadeCollection *, const makVrv::DtVrlinkSimulatedEntityState *) |
| virtual void | finalizeObjectCreation (const DtVrfObjectManipulationHandlerBaseClass::ObjectManipulationData &) |
| Called when interactive local object creation has been stopped or created. More... | |
| virtual void | slot_stoppedObjectCreation () |
| virtual bool | shouldArchive (makVrv::DtVrlinkSimulatedBaseState *) const |
| Return true if this item should be archived. More... | |
| virtual void | clearingTerrain () |
| Called when the terrain is being cleared. Sends the signal_terrainClearing() and signal_terrainCleared() signals. More... | |
| template<class Archive > | |
| void | serialize (Archive &ar, const unsigned int version) |
| When the class Archive corresponds to an output archive, the & operator is defined similar to <<. More... | |
| virtual void | write (boost::archive::xml_oarchive &out) |
| virtual void | read (boost::archive::xml_iarchive &in) |
Protected Attributes | |
| makVrv::DtDe & | myDe |
| bool | myIsCreating |
| LocalObjects | myObjects |
| makVrv::DtSignalConnectionManager | myConnections |
| LocalStateData | myData |
| bool | myCanCreateLocalObjects |
| std::vector< DtEntityType > | myIgnoreFromArchive |
| LastCheckedGroundInformation | myLastCheckedGroundInformation |
Friends | |
| class | boost::serialization::access |
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.
|
protected |
Collection of local Facades.
|
protected |
| makVrf::DtLocalObjectManager::DtLocalObjectManager | ( | makVrv::DtDe & | de | ) |
|
virtual |
|
static |
|
static |
|
virtual |
Returns true if the object manager is in creation mode.
|
virtual |
Called when a vertex is selected. Selects in local representation.
|
virtual |
Called when a vertex is deselected. Deselects in local representation.
|
virtual |
Called when current selection changes. If selection contains a local object, selects that.
|
virtual |
Return the object for the given ID, or NULL if it does not exist.
|
virtual |
Returns a list of unique ids for objects that match the entity type given.
|
virtual |
Create a tactical graphic from the supplied state.
Wrapper around create DtEnvironmentalCreationData version of this method If dictionaryToUse is specified uses the element definition dictionary to display the item, else uses dictionary appropriate for the item
|
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 If dictionaryToUse is specified uses the element definition dictionary to display the item, else uses dictionary appropriate for the item
|
virtual |
Create a tactical graphic from the supplied state.
Wrapper around create DtEntityCreationData version of this method. If dictionaryToUse is specified uses the element definition dictionary to display the item, else uses dictionary appropriate for the item
|
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 If dictionaryToUse is specified uses the element definition dictionary to display the item, else uses dictionary appropriate for the item
|
virtual |
Called when interactive local object creation has been stopped or created.
|
virtual |
Returns the layer to use for creating the local object.
|
virtual |
Called when editing of object is complete. Will update local representation.
|
virtual |
Sets the specified local object to be shown or hidden.
|
virtual |
Determine whether we are looking at a stock or local object.
|
virtual |
|
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 |
Ask the tactical graphic overlay manager for the status of the overlay if it is 'locked' it should not be editable.
|
virtual |
return true if given graphic ID is member of layer
|
virtual |
Deletes the specified local object.
|
virtual |
Deletes all local objects except for any object types specified.
|
virtual |
Deletes all the objects on the specified layer.
|
virtual |
|
virtual |
Given an element id and a vertex id, return the position of that vertex.
|
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 |
Return true if the entire selection only contains local objects.
|
virtual |
Set to false to disallow creation of local objects. Default is true.
|
virtual |
Return true if can create local objects instead of published ones via the create process. Default is true.
|
virtual |
Saves contents of local object manager to file.
|
virtual |
Saves to a string buffer.
|
virtual |
Restores from the string buffer.
|
virtual |
Loads and creates objects in file into local object manager. Deletes all local objects first before restoring.
|
virtual |
Returns number of local objects.
|
virtual |
Return the height of the ground at the current point.
This will be the height at the highest polygon. If clamped point is supplied returns the local clamped point. The point supplied for intersection is a local database position
|
virtual |
Return supplied local position as clamped to ground.
By using true for highest LOD the system will go to the terrain server to get the highest LOD value regardless of what is paged in. If useHighestPolygon is true will clamp to the highest polygon else will clamp to the closest polygon
|
virtual |
Return supplied geocentric position as a geocentric clamped to ground position.
By using true for highest LOD the system will go to the terrain server to get the highest LOD value regardless of what is paged in
|
virtual |
|
virtual |
Add an entity type to not be allowed to archive.
|
virtual |
|
protectedvirtual |
Called when an element attribute has changed, handle if a local object.
|
protectedvirtual |
Called when state view is updated, will update local object.
|
protectedvirtual |
Called in pre-tick from a connection made in slot_onStateViewUpdated.
|
protectedvirtual |
Updates facades based on state.
|
protectedvirtual |
|
protectedvirtual |
Called when interactive local object creation has been stopped or created.
|
protectedvirtual |
|
protectedvirtual |
Return true if this item should be archived.
|
protectedvirtual |
Called when the terrain is being cleared. Sends the signal_terrainClearing() and signal_terrainCleared() signals.
|
inlineprotected |
When the class Archive corresponds to an output archive, the & operator is defined similar to <<.
Likewise, when the class Archive is a type of input archive the & operator is defined similar to >>.
|
protectedvirtual |
|
protectedvirtual |
|
friend |
| boost::signals2::signal<void (bool)> makVrf::DtLocalObjectManager::signal_creating |
Signals for local object manager
Sent when local object manager starts creating an object
| boost::signals2::signal<void (DtVrfObjectFacadeInterface*, makVrv::DtVrlinkSimulatedBaseState*)> makVrf::DtLocalObjectManager::signal_objectCreated |
Sent when a local object is created.
| boost::signals2::signal<void (DtVrfObjectFacadeInterface*)> makVrf::DtLocalObjectManager::signal_objectAboutToBeDeleted |
Sent when a local object is about to be deleted.
| boost::signals2::signal<void (bool)> makVrf::DtLocalObjectManager::signal_loading |
Signal sent when loading the overlay file. True is before read, false after.
| boost::signals2::signal<void (makVrv::DtUniqueID)> makVrf::DtLocalObjectManager::signal_objectDeleted |
Signal sent after the object has been fully removed.
| boost::signals2::signal<void ()> makVrf::DtLocalObjectManager::signal_terrainClearing |
Signals for when the terrainis clearing/cleared.
| boost::signals2::signal<void ()> makVrf::DtLocalObjectManager::signal_terrainCleared |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
mutableprotected |