VR-Forces 5.0.2 Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Classes | Public Types | Public Member Functions | Static Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | Friends
makVrf::DtGuiLocalObjectManager Class Reference

The DtGuiLocalObjectManager 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.

Examples

NOTE: This class used to be called DtLocalObjectManager. It has been changed to DtGuiLocalObjectManager to avoid confusion with the back-end class of the same name.

Inheritance diagram for makVrf::DtGuiLocalObjectManager:
Inheritance graph
[legend]

Classes

struct  LastCheckedGroundInformation
 
struct  LocalObjectUpdateStructure
 

Public Types

enum  ClampFlag { Highest = 0, Lowest, Closest, ClosestDown }
 

Public Member Functions

 DtGuiLocalObjectManager (makVrv::DtDe &de)
 
virtual ~DtGuiLocalObjectManager ()
 
virtual bool isCreating () const
 
virtual void tacticalGraphicsVertexSelected (const makVrv::DtUniqueID &selected, const makVrv::DtUniqueID &parentElementID)
 
virtual void tacticalGraphicsVertexDeselected (const makVrv::DtUniqueID &deselected, const makVrv::DtUniqueID &parent)
 
virtual void slot_onCurrentSelectionChanged (const makVrv::DtSelectionManager::IdSet &selected, const makVrv::DtSelectionManager::IdSet &deselected)
 
virtual
DtVrfObjectFacadeInterface
facadeForID (makVrv::DtUniqueID)
 
virtual std::vector
< makVrv::DtUniqueID
uniqueIdsForTypesThatMatch (const DtEntityType &) const
 
virtual
DtEnvironmentalFacadeCollection
create (const DtVrlinkSimulatedEnvironmentProcess &, int dictionartToUse=-1)
 
virtual
DtEnvironmentalFacadeCollection
create (const DtEntityType &t, const std::vector< DtVector > &localPoints, int force, const DtEnvironmentalCreationData &, int modelSet=-1, bool keepName=false, int dictionaryToUse=-1)
 
virtual DtEntityFacadeCollectioncreate (const makVrv::DtVrlinkSimulatedEntityState &, const std::string &overlayParent="", int dictionaryToUse=-1)
 
virtual DtEntityFacadeCollectioncreate (const DtEntityCreationData &, int modelSet=-1, bool keepName=false, int dictionaryToUse=-1)
 
virtual
DtVrfObjectFacadeInterface
createObject (const DtVrfObjectManipulationHandlerBaseClass::ObjectManipulationData &, const bool showInObjectList=false)
 
virtual const
makVrv::DtTacticalGraphicOverlay
createOnLayer (const std::string &layerName="")
 
virtual void completeStateUpdate (makVrv::DtUniqueID id)
 
virtual void setVisible (makVrv::DtUniqueID id, bool hide)
 
virtual bool isLocal (makVrv::DtUniqueID id) const
 
virtual void updateState (makVrv::DtUniqueID id)
 
virtual void setEditable (makVrv::DtUniqueID id, bool)
 
virtual bool isEditable (makVrv::DtUniqueID id, const std::string &keywords="") const
 
virtual bool isMemberOfLayer (makVrv::DtUniqueID id, const std::string &layername) const
 
virtual void deleteLocal (makVrv::DtUniqueID id)
 
virtual void deleteAll (std::vector< DtEntityType > except=std::vector< DtEntityType >())
 
virtual void deleteAllFromLayer (const std::string &layername)
 
virtual void update (makVrv::DtElementID id, const LocalObjectUpdateStructure &updateStructure, bool forceUpdate=true)
 
virtual DtVector getVertexPosition (makVrv::DtElementID parent, makVrv::DtUniqueID vertexId) const
 
virtual void create (const DtEntityType &t, int force)
 
virtual bool allSelectionIsLocal () const
 
virtual void setCanCreateLocalObjects (bool)
 
virtual bool canCreateLocalObjects () const
 
virtual void save (const std::string &)
 
virtual std::string toStringBuffer ()
 
virtual bool fromStringBuffer (const std::string &, bool removeAll=true)
 
virtual bool load (const std::string &, bool removeAll=true)
 
virtual int numberOfLocalObjects () const
 
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
 
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
 
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
 
virtual std::string generateUniqueName (const std::string &base, bool addNumberToBegin=false) const
 
virtual void ignoreFromArchive (const DtEntityType &)
 
virtual void removeIgnoreFromArchive (const DtEntityType &)
 
- Public Member Functions inherited from makVrv::DtVirtualBaseClass
 DtVirtualBaseClass ()
 
virtual ~DtVirtualBaseClass ()
 

Static Public Member Functions

static DtGuiLocalObjectManagerinstance (makVrv::DtDe &de)
 
static void registerInstance (makVrv::DtDe &de, DtGuiLocalObjectManager *)
 

Public Attributes

boost::signals2::signal< void(bool)> signal_creating
 
boost::signals2::signal< void(DtVrfObjectFacadeInterface
*, makVrv::DtVrlinkSimulatedBaseState *)> 
signal_objectCreated
 
boost::signals2::signal< void(DtVrfObjectFacadeInterface *)> signal_objectAboutToBeDeleted
 
boost::signals2::signal< void(bool)> signal_loading
 
boost::signals2::signal< void(makVrv::DtUniqueID)> signal_objectDeleted
 
boost::signals2::signal< void()> signal_terrainClearing
 
boost::signals2::signal< void()> signal_terrainCleared
 

Protected Types

typedef std::map
< makVrv::DtUniqueID,
DtVrfObjectFacadeInterface * > 
LocalObjects
 
typedef std::map
< makVrv::DtUniqueID,
makVrv::DtVrlinkSimulatedBaseState * > 
LocalStateData
 

Protected Member Functions

virtual void slot_objectVisibilityChanged (makVrv::DtUniqueID id, bool isShown, int context)
 
virtual void slot_onStateViewUpdated (makVrv::DtStateView< makVrv::DtVrlinkSimulatedBaseState > *)
 
virtual void completeStateViewUpdated (makVrv::DtStateView< makVrv::DtVrlinkSimulatedBaseState > *, bool forceIfHidden=false)
 
virtual void update (DtEnvironmentalFacadeCollection *, const DtVrlinkSimulatedEnvironmentProcess *)
 
virtual void update (DtEntityFacadeCollection *, const makVrv::DtVrlinkSimulatedEntityState *)
 
virtual void slot_stoppedObjectCreation ()
 
virtual bool shouldArchive (makVrv::DtVrlinkSimulatedBaseState *) const
 
virtual void clearingTerrain ()
 
template<class Archive >
void serialize (Archive &ar, const unsigned int version)
 
virtual void write (boost::archive::xml_oarchive &out)
 
virtual void read (boost::archive::xml_iarchive &in)
 

Protected Attributes

makVrv::DtDemyDe
 
bool myIsCreating
 
LocalObjects myObjects
 
makVrv::DtSignalConnectionManager myConnections
 
LocalStateData myData
 
bool myCanCreateLocalObjects
 
std::vector< DtEntityType > myIgnoreFromArchive
 
boost::signals2::scoped_connection myCompleteViewUpdatedConnection
 
LastCheckedGroundInformation myLastCheckedGroundInformation
 

Friends

class boost::serialization::access
 

Member Typedef Documentation

Collection of local Facades.

Member Enumeration Documentation

Enumerator
Highest 
Lowest 
Closest 
ClosestDown 

Closest either above or below give point.

Closest polygon who's altitude is lower or equal to the altitude of the point coming in

Constructor & Destructor Documentation

makVrf::DtGuiLocalObjectManager::DtGuiLocalObjectManager ( makVrv::DtDe de)
virtual makVrf::DtGuiLocalObjectManager::~DtGuiLocalObjectManager ( )
virtual

Member Function Documentation

static DtGuiLocalObjectManager& makVrf::DtGuiLocalObjectManager::instance ( makVrv::DtDe de)
static
static void makVrf::DtGuiLocalObjectManager::registerInstance ( makVrv::DtDe de,
DtGuiLocalObjectManager  
)
static
virtual bool makVrf::DtGuiLocalObjectManager::isCreating ( ) const
virtual

Returns true if the object manager is in creation mode.

virtual void makVrf::DtGuiLocalObjectManager::tacticalGraphicsVertexSelected ( const makVrv::DtUniqueID selected,
const makVrv::DtUniqueID parentElementID 
)
virtual

Called when a vertex is selected. Selects in local representation.

virtual void makVrf::DtGuiLocalObjectManager::tacticalGraphicsVertexDeselected ( const makVrv::DtUniqueID deselected,
const makVrv::DtUniqueID parent 
)
virtual

Called when a vertex is deselected. Deselects in local representation.

virtual void makVrf::DtGuiLocalObjectManager::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 DtVrfObjectFacadeInterface* makVrf::DtGuiLocalObjectManager::facadeForID ( makVrv::DtUniqueID  )
virtual

Return the object for the given ID, or NULL if it does not exist.

virtual std::vector<makVrv::DtUniqueID> makVrf::DtGuiLocalObjectManager::uniqueIdsForTypesThatMatch ( const DtEntityType &  ) const
virtual

Returns a list of unique ids for objects that match the entity type given.

virtual DtEnvironmentalFacadeCollection* makVrf::DtGuiLocalObjectManager::create ( const DtVrlinkSimulatedEnvironmentProcess ,
int  dictionartToUse = -1 
)
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 DtEnvironmentalFacadeCollection* makVrf::DtGuiLocalObjectManager::create ( const DtEntityType &  t,
const std::vector< DtVector > &  localPoints,
int  force,
const DtEnvironmentalCreationData ,
int  modelSet = -1,
bool  keepName = false,
int  dictionaryToUse = -1 
)
virtual

Create a tactical graphic of type t with name, on first of:

  • currently selected layer
  • first layer in overlay layer list
  • a new layer with default name
  • specified layer in environmental creation data

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 DtEntityFacadeCollection* makVrf::DtGuiLocalObjectManager::create ( const makVrv::DtVrlinkSimulatedEntityState ,
const std::string &  overlayParent = "",
int  dictionaryToUse = -1 
)
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 DtEntityFacadeCollection* makVrf::DtGuiLocalObjectManager::create ( const DtEntityCreationData ,
int  modelSet = -1,
bool  keepName = false,
int  dictionaryToUse = -1 
)
virtual

Create a entity of type t with name, on first of:

  • currently selected layer
  • first layer in overlay layer list
  • a new layer with default name
  • specified layer in environmental creation data

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 DtVrfObjectFacadeInterface* makVrf::DtGuiLocalObjectManager::createObject ( const DtVrfObjectManipulationHandlerBaseClass::ObjectManipulationData ,
const bool  showInObjectList = false 
)
virtual

Called when interactive local object creation has been stopped or created.

virtual const makVrv::DtTacticalGraphicOverlay* makVrf::DtGuiLocalObjectManager::createOnLayer ( const std::string &  layerName = "")
virtual

Returns the layer to use for creating the local object.

virtual void makVrf::DtGuiLocalObjectManager::completeStateUpdate ( makVrv::DtUniqueID  id)
virtual

Called when editing of object is complete. Will update local representation.

virtual void makVrf::DtGuiLocalObjectManager::setVisible ( makVrv::DtUniqueID  id,
bool  hide 
)
virtual

Sets the specified local object to be shown or hidden.

virtual bool makVrf::DtGuiLocalObjectManager::isLocal ( makVrv::DtUniqueID  id) const
virtual

Determine whether we are looking at a stock or local object.

virtual void makVrf::DtGuiLocalObjectManager::updateState ( makVrv::DtUniqueID  id)
virtual
virtual void makVrf::DtGuiLocalObjectManager::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::DtGuiLocalObjectManager::isEditable ( makVrv::DtUniqueID  id,
const std::string &  keywords = "" 
) 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::DtGuiLocalObjectManager::isMemberOfLayer ( makVrv::DtUniqueID  id,
const std::string &  layername 
) const
virtual

return true if given graphic ID is member of layer

virtual void makVrf::DtGuiLocalObjectManager::deleteLocal ( makVrv::DtUniqueID  id)
virtual

Deletes the specified local object.

virtual void makVrf::DtGuiLocalObjectManager::deleteAll ( std::vector< DtEntityType >  except = std::vector< DtEntityType >())
virtual

Deletes all local objects except for any object types specified.

virtual void makVrf::DtGuiLocalObjectManager::deleteAllFromLayer ( const std::string &  layername)
virtual

Deletes all the objects on the specified layer.

virtual void makVrf::DtGuiLocalObjectManager::update ( makVrv::DtElementID  id,
const LocalObjectUpdateStructure updateStructure,
bool  forceUpdate = true 
)
virtual
virtual DtVector makVrf::DtGuiLocalObjectManager::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::DtGuiLocalObjectManager::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::DtGuiLocalObjectManager::allSelectionIsLocal ( ) const
virtual

Return true if the entire selection only contains local objects.

virtual void makVrf::DtGuiLocalObjectManager::setCanCreateLocalObjects ( bool  )
virtual

Set to false to disallow creation of local objects. Default is true.

virtual bool makVrf::DtGuiLocalObjectManager::canCreateLocalObjects ( ) const
virtual

Return true if can create local objects instead of published ones via the create process. Default is true.

virtual void makVrf::DtGuiLocalObjectManager::save ( const std::string &  )
virtual

Saves contents of local object manager to file.

virtual std::string makVrf::DtGuiLocalObjectManager::toStringBuffer ( )
virtual

Saves to a string buffer.

virtual bool makVrf::DtGuiLocalObjectManager::fromStringBuffer ( const std::string &  ,
bool  removeAll = true 
)
virtual

Restores from the string buffer.

virtual bool makVrf::DtGuiLocalObjectManager::load ( const std::string &  ,
bool  removeAll = true 
)
virtual

Loads and creates objects in file into local object manager. Deletes all local objects first before restoring.

virtual int makVrf::DtGuiLocalObjectManager::numberOfLocalObjects ( ) const
virtual

Returns number of local objects.

virtual double makVrf::DtGuiLocalObjectManager::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
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 DtVector makVrf::DtGuiLocalObjectManager::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
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 DtGeodeticCoord makVrf::DtGuiLocalObjectManager::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
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 std::string makVrf::DtGuiLocalObjectManager::generateUniqueName ( const std::string &  base,
bool  addNumberToBegin = false 
) const
virtual
virtual void makVrf::DtGuiLocalObjectManager::ignoreFromArchive ( const DtEntityType &  )
virtual

Add an entity type to not be allowed to archive.

virtual void makVrf::DtGuiLocalObjectManager::removeIgnoreFromArchive ( const DtEntityType &  )
virtual
virtual void makVrf::DtGuiLocalObjectManager::slot_objectVisibilityChanged ( makVrv::DtUniqueID  id,
bool  isShown,
int  context 
)
protectedvirtual

Called when an element attribute has changed, handle if a local object.

virtual void makVrf::DtGuiLocalObjectManager::slot_onStateViewUpdated ( makVrv::DtStateView< makVrv::DtVrlinkSimulatedBaseState > *  )
protectedvirtual

Called when state view is updated, will update local object.

virtual void makVrf::DtGuiLocalObjectManager::completeStateViewUpdated ( makVrv::DtStateView< makVrv::DtVrlinkSimulatedBaseState > *  ,
bool  forceIfHidden = false 
)
protectedvirtual

Called in pre-tick from a connection made in slot_onStateViewUpdated.

virtual void makVrf::DtGuiLocalObjectManager::update ( DtEnvironmentalFacadeCollection ,
const DtVrlinkSimulatedEnvironmentProcess  
)
protectedvirtual

Updates facades based on state.

virtual void makVrf::DtGuiLocalObjectManager::update ( DtEntityFacadeCollection ,
const makVrv::DtVrlinkSimulatedEntityState  
)
protectedvirtual
virtual void makVrf::DtGuiLocalObjectManager::slot_stoppedObjectCreation ( )
protectedvirtual
virtual bool makVrf::DtGuiLocalObjectManager::shouldArchive ( makVrv::DtVrlinkSimulatedBaseState ) const
protectedvirtual

Return true if this item should be archived.

virtual void makVrf::DtGuiLocalObjectManager::clearingTerrain ( )
protectedvirtual

Called when the terrain is being cleared. Sends the signal_terrainClearing() and signal_terrainCleared() signals.

template<class Archive >
void makVrf::DtGuiLocalObjectManager::serialize ( Archive &  ar,
const unsigned int  version 
)
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 >>.

virtual void makVrf::DtGuiLocalObjectManager::write ( boost::archive::xml_oarchive &  out)
protectedvirtual
virtual void makVrf::DtGuiLocalObjectManager::read ( boost::archive::xml_iarchive &  in)
protectedvirtual

Friends And Related Function Documentation

friend class boost::serialization::access
friend

Member Data Documentation

boost::signals2::signal<void (bool)> makVrf::DtGuiLocalObjectManager::signal_creating

Signals for local object manager.

Sent when local object manager starts creating an object

boost::signals2::signal<void (DtVrfObjectFacadeInterface*, makVrv::DtVrlinkSimulatedBaseState*)> makVrf::DtGuiLocalObjectManager::signal_objectCreated

Sent when a local object is created.

boost::signals2::signal<void (DtVrfObjectFacadeInterface*)> makVrf::DtGuiLocalObjectManager::signal_objectAboutToBeDeleted

Sent when a local object is about to be deleted.

boost::signals2::signal<void (bool)> makVrf::DtGuiLocalObjectManager::signal_loading

Signal sent when loading the overlay file. True is before read, false after.

boost::signals2::signal<void (makVrv::DtUniqueID)> makVrf::DtGuiLocalObjectManager::signal_objectDeleted

Signal sent after the object has been fully removed.

boost::signals2::signal<void ()> makVrf::DtGuiLocalObjectManager::signal_terrainClearing

Signals for when the terrainis clearing/cleared.

boost::signals2::signal<void ()> makVrf::DtGuiLocalObjectManager::signal_terrainCleared

Signals for local object manager.

Sent when local object manager starts creating an object

makVrv::DtDe& makVrf::DtGuiLocalObjectManager::myDe
protected
bool makVrf::DtGuiLocalObjectManager::myIsCreating
protected
LocalObjects makVrf::DtGuiLocalObjectManager::myObjects
protected
makVrv::DtSignalConnectionManager makVrf::DtGuiLocalObjectManager::myConnections
protected
LocalStateData makVrf::DtGuiLocalObjectManager::myData
protected
bool makVrf::DtGuiLocalObjectManager::myCanCreateLocalObjects
protected
std::vector<DtEntityType> makVrf::DtGuiLocalObjectManager::myIgnoreFromArchive
protected
boost::signals2::scoped_connection makVrf::DtGuiLocalObjectManager::myCompleteViewUpdatedConnection
protected
LastCheckedGroundInformation makVrf::DtGuiLocalObjectManager::myLastCheckedGroundInformation
mutableprotected

The documentation for this class was generated from the following file:

Document ID: Generated on Sun Dec 4 20:22:03 EST 2022 from SVN revision 249613
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)