VR-Forces 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
makVrv::DtIntervisibilityDriver Class Reference

This driver will manage the creation, modification and removal of intervisibility objects. Will use the event processor for mouse and keyboard processing if necessary.

Inheritance diagram for makVrv::DtIntervisibilityDriver:
Inheritance graph
[legend]

Classes

class  DtIntervisibilityConnection
 
struct  OriginalInformation
 

Public Types

typedef boost::unordered_map
< DtElementID,
DtIntervisibilityElement * > 
ElementMap
 
typedef boost::unordered_map
< DtElementID,
DtIntervisibilityStateListener * > 
ListenerMap
 
typedef std::pair< DtElementID,
DtVector > 
AttachPoint
 
typedef std::vector< AttachPointAttachPoints
 

Public Member Functions

 DtIntervisibilityDriver (DtDe &, const std::string &className)
 
virtual ~DtIntervisibilityDriver ()
 
virtual bool autoStart () const
 
DtIntervisibilityStateListenerfindListener (DtElementID id)
 
DtIntervisibilityElementfindElement (DtElementID id)
 
virtual DtIntervisibilityElementcreateIntervisibilityLine (const DtVector &startPoint, const DtVector &endPoint)
 
virtual DtIntervisibilityElementcreateIntervisibilityLine (const AttachPoints &=AttachPoints())
 
const DtUnicodeintervisibilityLine () const
 
virtual DtIntervisibilityElementcreateIntervisibilityFan (const DtVector &startPoint, const DtVector &endPoint)
 
virtual DtIntervisibilityElementcreateIntervisibilityFan (const AttachPoints &=AttachPoints())
 
const DtUnicodeintervisibilityFan () const
 
const ElementMapintervisibilityElements () const
 
virtual DtIntervisibilityElementcreateIntervisibilityEntityFan (const DtVector &startPoint, const DtVector &endPoint)
 
virtual DtIntervisibilityElementcreateIntervisibilityEntityFan (const AttachPoints &=AttachPoints())
 
const DtUnicodeintervisibilityEntityFan () const
 
virtual DtIntervisibilityElementcreateRangeLine (const DtVector &startPoint)
 
virtual DtIntervisibilityElementcreateRangeLine (const DtVector &startPoint, const DtVector &endPoint)
 
virtual DtIntervisibilityElementcreateRangeLine (const AttachPoints &=AttachPoints())
 
virtual const DtUnicoderangeLine () const
 
void addListenerCreator (const std::string &, DtIntervisibilityStateListenerCreator *)
 
virtual void cancelChanges ()
 
virtual void destroy (DtElementID id)
 
virtual void destroyAll ()
 
virtual void setAllowCreating (bool)
 
virtual void setAllowEditing (bool)
 
virtual DtIntervisibilityElementcreate (const DtUnicode &definition, const DtVector &startPoint, const DtVector &endPoint)
 
const std::string & className () const
 
DtBaseConnectionconnection ()
 
const DtBaseConnectionconnection () const
 
DtIntervisibilityElementcreatingElement () const
 
DtIntervisibilityStateListenercreatingListener () const
 
- Public Member Functions inherited from makVrv::DtDriver
 DtDriver (DtAgentManager &agentManager, const std::string &instanceName)
 
virtual ~DtDriver ()
 
virtual void realizeConfiguration (const DtConfiguration &configuration)
 
virtual DtConfiguration createConfiguration (bool saveAllParameters=false) const
 
DtAgentManageragentManager ()
 
virtual DtAgentManagerInterfacesceneInterface ()
 
bool started () const
 
virtual const std::string & instanceName () const
 
virtual void setAutoStart (bool autoStart)
 
virtual bool isWindowDependent () const
 
virtual void setIsWindowDependent (bool dep)
 
virtual void setIsUserControllable (bool)
 
virtual bool isUserControllable () const
 
virtual void setIsPersistent (bool per)
 
virtual bool isPersistent () const
 
virtual bool isOnDriverSelectionList () const
 
virtual void setOnDriverSelectionList (bool)
 
bool objectFromAgentManager (const DtUniqueID &id) const
 

Static Public Member Functions

static DtIntervisibilityDriverfindDriver (DtDe &de)
 
static std::string theInstanceName ()
 

Protected Types

typedef boost::unordered_map
< DtElementID,
OriginalInformation
Editing
 
typedef std::map< std::string,
DtIntervisibilityStateListenerCreator * > 
ListenerCreatorMap
 

Protected Member Functions

virtual
DtBasicEditingEventProcessor
createEventProcessor () const
 
virtual
DtIntervisibilityStateListener
createListener (const std::string &definition) const
 
virtual DtIntervisibilityElementcreateElement (DtIntervisibilityStateListener *, const DtUnicode &definition) const
 
virtual DtIntervisibilityElementcreate (const DtUnicode &elementDefinitionName, const AttachPoints &=AttachPoints())
 
virtual bool onTick ()
 
virtual bool onStart ()
 
virtual bool onStop ()
 
virtual void completeSetup ()
 
virtual void slot_onCurrentSelectionChanged (const DtSelectionManager::IdSet &selected, const DtSelectionManager::IdSet &deselected)
 
virtual void select (const DtSelectionManager::IdSet &, bool)
 
virtual void slot_onVertexElementHasMouseCursorStateChanged (const DtElementID &parentId, const DtElementID &vertexElementId, bool hasMouseCursor)
 
virtual void connectProcessorSignals ()
 
virtual void slot_locationChanged (const DtVector &, double altAboveGround)
 
virtual void slot_altitudeChanged (const DtVector &, double)
 
virtual void slot_altitudeIsDragging (bool)
 
virtual void slot_place (DtUniqueID, const DtVector &, double altAboveGround)
 
virtual void finishEditing ()
 
virtual void slot_dragStart (const DtSelectionManager::IdSet &set, const DtVector &)
 
virtual void modifyEditingObjects (const DtVector &pos, double altAboveGround)
 
virtual void resetSelectionForEditableObjects ()
 
virtual DtVector clamp (const DtVector &, double altAboveGround) const
 
virtual void elementsRemoved (const DtElementData::UniqueIdList &)
 
void installElementDefinitions (DtElementDefinitionManager &manager)
 
virtual void slot_coordinateSystemChanged ()
 
virtual void slot_intervisibilityObjectsShown (bool show)
 
virtual void slot_rangeLinesShown (bool show)
 
- Protected Member Functions inherited from makVrv::DtDriver
void applyChangesAndDelete (DtElementChanges *changes)
 
void reportElementCreated (DtElementID id, DtElementID parentId, DtElementEntry::ElementType type)
 
void reportElementAttribute (DtElementID id, DtElementAttribute *attribute)
 
void reportElementDestroyed (DtElementID id)
 
void start ()
 
void stop ()
 
bool tick ()
 
virtual void slot_displayEngineAdded (const DtDeRecord &igRecord)
 
virtual void setInstanceName (const std::string &name)
 
virtual void installAccessories ()
 
virtual void uninstallAccessories ()
 

Protected Attributes

DtDemyDe
 
ElementMap myElements
 
ListenerMap myListeners
 
DtBasicEditingEventProcessormyProcessor
 
std::string myClassName
 
DtBaseConnectionmyConnection
 
bool myAllowEditing
 
bool myAllowCreating
 
bool myDistribute
 
DtSignalConnectionManager myConnections
 
DtIntervisibilityElementmyCreatingElement
 
DtIntervisibilityStateListenermyCreationListener
 
DtSignalConnectionManager myProcessorConnections
 
Editing myEditing
 
DtVector myEditingAnchorLocation
 
ListenerCreatorMap myListenerCreatorMap
 
DtChannelmyHiddenChannel
 
DtIntersectorsContainermyIntersectors = nullptr
 
DtCoordinateSystemmyCoordinateSystem = nullptr
 
- Protected Attributes inherited from makVrv::DtDriver
DtAgentManagermyAgentManager
 
bool myStartedFlag
 
std::string myName
 
DtConfiguration myConfiguration
 
bool myPersistentFlag
 
bool myUserControllableFlag
 
bool myRequestStateDiffPendingFlag
 
DtElementChanges myChanges
 

Additional Inherited Members

- Static Protected Attributes inherited from makVrv::DtDriver
static const std::string theOnDriverSelectionList
 

Member Typedef Documentation

Constructor & Destructor Documentation

makVrv::DtIntervisibilityDriver::DtIntervisibilityDriver ( DtDe ,
const std::string &  className 
)

CTOR.

virtual makVrv::DtIntervisibilityDriver::~DtIntervisibilityDriver ( )
virtual

DTOR.

Member Function Documentation

virtual bool makVrv::DtIntervisibilityDriver::autoStart ( ) const
virtual

Override to return true (does not look at configuration)

Reimplemented from makVrv::DtDriver.

DtIntervisibilityStateListener* makVrv::DtIntervisibilityDriver::findListener ( DtElementID  id)
DtIntervisibilityElement* makVrv::DtIntervisibilityDriver::findElement ( DtElementID  id)
virtual DtIntervisibilityElement* makVrv::DtIntervisibilityDriver::createIntervisibilityLine ( const DtVector &  startPoint,
const DtVector &  endPoint 
)
virtual

Create and return a new intervisibility line with given start and end points.

virtual DtIntervisibilityElement* makVrv::DtIntervisibilityDriver::createIntervisibilityLine ( const AttachPoints = AttachPoints())
virtual

Creates a new intervisibility line object by using the event processor with the newly create element. If attach points are given, one point for each attach point will be created and then the final point will be put into create mode if the continueCreation parameter is true.

const DtUnicode& makVrv::DtIntervisibilityDriver::intervisibilityLine ( ) const

String which represents the internal keyword used to create an intervisibility line.

virtual DtIntervisibilityElement* makVrv::DtIntervisibilityDriver::createIntervisibilityFan ( const DtVector &  startPoint,
const DtVector &  endPoint 
)
virtual

Create and return a new intervisibility fan with given start and end points.

Reimplemented in makVrf::DtVrfGuiIntervisibilityDriver.

virtual DtIntervisibilityElement* makVrv::DtIntervisibilityDriver::createIntervisibilityFan ( const AttachPoints = AttachPoints())
virtual

Creates a new intervisibility fan object by using the event processor. If creation is successful will emit a signal with the newly create element. If attach points are given, one point for each attach point will be created and then the final point will be put into create mode if the continueCreation parameter is true.

const DtUnicode& makVrv::DtIntervisibilityDriver::intervisibilityFan ( ) const

String which represents the internal keyword used to create an intervisibility fan.

DtIntervisibilityElement* makVrv::DtIntervisibilityDriver::creatingElement ( ) const

Access to internal variables that are valid when an object is created.

DtIntervisibilityStateListener* makVrv::DtIntervisibilityDriver::creatingListener ( ) const

Access to internal variables that are valid when an object is created.

const ElementMap& makVrv::DtIntervisibilityDriver::intervisibilityElements ( ) const

All the intervisibility elements current created.

virtual DtIntervisibilityElement* makVrv::DtIntervisibilityDriver::createIntervisibilityEntityFan ( const DtVector &  startPoint,
const DtVector &  endPoint 
)
virtual

Create and return a new intervisibility entity fan with given start and end points.

virtual DtIntervisibilityElement* makVrv::DtIntervisibilityDriver::createIntervisibilityEntityFan ( const AttachPoints = AttachPoints())
virtual

Creates a new intervisibility entity fan object by using the event processor. If creation is successful will emit a signal with the newly create element. If attach points are given, one point for each attach point will be created and then the final point will be put into create mode if the continueCreation parameter is true.

const DtUnicode& makVrv::DtIntervisibilityDriver::intervisibilityEntityFan ( ) const

String which represents the internal keyword used to create an intervisibility entity fan.

virtual DtIntervisibilityElement* makVrv::DtIntervisibilityDriver::createRangeLine ( const DtVector &  startPoint)
virtual

Creates a new range line at the start point, allowing the user to drag to set end point.

virtual DtIntervisibilityElement* makVrv::DtIntervisibilityDriver::createRangeLine ( const DtVector &  startPoint,
const DtVector &  endPoint 
)
virtual

Create and return a new range line with given start and end points.

virtual DtIntervisibilityElement* makVrv::DtIntervisibilityDriver::createRangeLine ( const AttachPoints = AttachPoints())
virtual

Creates a new range line object by using the event processor with the newly create element. If attach points are given, one point for each attach point will be created and then the final point will be put into create mode if the continueCreation parameter is true.

virtual const DtUnicode& makVrv::DtIntervisibilityDriver::rangeLine ( ) const
virtual

The range line lives under the intervisiblity menu, however, it does not create an actual intervisiblity line. it creates a line that shows range/bearing labels, allows for attachment, and the end point look is modified from the intervisility settings menu.

void makVrv::DtIntervisibilityDriver::addListenerCreator ( const std::string &  ,
DtIntervisibilityStateListenerCreator  
)

Adds a new listener creator given the keyword. If one exists, replace.

virtual void makVrv::DtIntervisibilityDriver::cancelChanges ( )
virtual

Cancel current creation and remove temporary symbol.

Reimplemented in makVrf::DtVrfGuiIntervisibilityDriver.

virtual void makVrv::DtIntervisibilityDriver::destroy ( DtElementID  id)
virtual

Given the particular ID, destroys (removes) the object and also removes from selection.

virtual void makVrv::DtIntervisibilityDriver::destroyAll ( )
virtual

Destroys all intervisibility elements.

virtual void makVrv::DtIntervisibilityDriver::setAllowCreating ( bool  )
virtual

Sets whether or not the processor is enabled for creating. If true, will also enable the processor. If false, will set internal flag however will not disable the processor if it is also enabled for editing.

virtual void makVrv::DtIntervisibilityDriver::setAllowEditing ( bool  )
virtual

Sets whether or not the processor supports editing of objects. If an object is selected, signals will be sent for double click and possible drag/drop operations. If these operations are not valid for editing the selected items, override this class and implement the methods which will determine if editing is allowed (for example, canEdit)

virtual DtIntervisibilityElement* makVrv::DtIntervisibilityDriver::create ( const DtUnicode definition,
const DtVector &  startPoint,
const DtVector &  endPoint 
)
virtual

Create and return a new element with the points as the starting points.

static DtIntervisibilityDriver* makVrv::DtIntervisibilityDriver::findDriver ( DtDe de)
static

Returns the current intervisibility driver in the driver manager.

const std::string& makVrv::DtIntervisibilityDriver::className ( ) const
inlinevirtual

Returns the driver's class name.

Implements makVrv::DtDriver.

static std::string makVrv::DtIntervisibilityDriver::theInstanceName ( )
static

Returns the driver's instance (display) name.

DtBaseConnection* makVrv::DtIntervisibilityDriver::connection ( )
inline

Returns the driver's connection.

const DtBaseConnection* makVrv::DtIntervisibilityDriver::connection ( ) const
inline

Returns the driver's connection (const).

virtual DtBasicEditingEventProcessor* makVrv::DtIntervisibilityDriver::createEventProcessor ( ) const
protectedvirtual

Pure interface that must be implemented to be considered a shape driver creates the event processor used for mouse and keyboard controls.

virtual DtIntervisibilityStateListener* makVrv::DtIntervisibilityDriver::createListener ( const std::string &  definition) const
protectedvirtual

Creates a new listener to be used with the element being created.

virtual DtIntervisibilityElement* makVrv::DtIntervisibilityDriver::createElement ( DtIntervisibilityStateListener ,
const DtUnicode definition 
) const
protectedvirtual

Creates a new shape element for the given listener.

Reimplemented in makVrf::DtVrfGuiIntervisibilityDriver.

virtual DtIntervisibilityElement* makVrv::DtIntervisibilityDriver::create ( const DtUnicode elementDefinitionName,
const AttachPoints = AttachPoints() 
)
protectedvirtual

Creates a new element object by using the event processor. If creation is successful will emit a signal with the newly create element. If attach points are given, one point for each attach point will be created and then the final point will be put into create mode if the continueCreation parameter is true.

Reimplemented in makVrf::DtVrfGuiIntervisibilityDriver.

virtual bool makVrv::DtIntervisibilityDriver::onTick ( )
protectedvirtual

call for each tick

Implements makVrv::DtDriver.

virtual bool makVrv::DtIntervisibilityDriver::onStart ( )
protectedvirtual

Start the host output. Create all object for an existing host connection. Should return true if start succeeded, and false if unable to start.

Implements makVrv::DtDriver.

virtual bool makVrv::DtIntervisibilityDriver::onStop ( )
protectedvirtual

Stop the host output. All scene object created by the host should be destroyed. Should return true if stop succeeded, and false if unable to stop.

Implements makVrv::DtDriver.

virtual void makVrv::DtIntervisibilityDriver::completeSetup ( )
protectedvirtual

Makes final connections.

Reimplemented in makVrf::DtVrfGuiIntervisibilityDriver.

virtual void makVrv::DtIntervisibilityDriver::slot_onCurrentSelectionChanged ( const DtSelectionManager::IdSet selected,
const DtSelectionManager::IdSet deselected 
)
protectedvirtual

Select/deselect objects.

virtual void makVrv::DtIntervisibilityDriver::select ( const DtSelectionManager::IdSet ,
bool   
)
protectedvirtual

Select/deselect all items in list.

virtual void makVrv::DtIntervisibilityDriver::slot_onVertexElementHasMouseCursorStateChanged ( const DtElementID parentId,
const DtElementID vertexElementId,
bool  hasMouseCursor 
)
protectedvirtual

Mouse over/hover objects.

virtual void makVrv::DtIntervisibilityDriver::connectProcessorSignals ( )
protectedvirtual

Connects up to event processor to handle signals.

virtual void makVrv::DtIntervisibilityDriver::slot_locationChanged ( const DtVector &  ,
double  altAboveGround 
)
protectedvirtual

Signal sent when the mouse location has changed via a mouse move. Vector is in local database coordinates.

virtual void makVrv::DtIntervisibilityDriver::slot_altitudeChanged ( const DtVector &  ,
double   
)
protectedvirtual

Signal sent when the altitude has changed.

virtual void makVrv::DtIntervisibilityDriver::slot_altitudeIsDragging ( bool  )
protectedvirtual

Called when altitude has entered/left dragging mode.

virtual void makVrv::DtIntervisibilityDriver::slot_place ( DtUniqueID  ,
const DtVector &  ,
double  altAboveGround 
)
protectedvirtual

Signal sent on left click of mouse on terrain or object. ID is the item clicked on. Vector is in local database coordinates.

Reimplemented in makVrf::DtVrfGuiIntervisibilityDriver.

virtual void makVrv::DtIntervisibilityDriver::finishEditing ( )
protectedvirtual

Called to finish the current creation and make object permanent.

Reimplemented in makVrf::DtVrfGuiIntervisibilityDriver.

virtual void makVrv::DtIntervisibilityDriver::slot_dragStart ( const DtSelectionManager::IdSet set,
const DtVector &   
)
protectedvirtual

Called when a drag operation is about to start, stash off information about current objects (in case of cancel) and proceed to allow editing.

Reimplemented in makVrf::DtVrfGuiIntervisibilityDriver.

virtual void makVrv::DtIntervisibilityDriver::modifyEditingObjects ( const DtVector &  pos,
double  altAboveGround 
)
protectedvirtual

Modifies all the objects being edited based on the new point and altitude. Altitude will be applied as a delta from the height above ground at the anchor position.

virtual void makVrv::DtIntervisibilityDriver::resetSelectionForEditableObjects ( )
protectedvirtual

Called after complete or cancel to reset selection state to original state. Should not be called directly.

virtual DtVector makVrv::DtIntervisibilityDriver::clamp ( const DtVector &  ,
double  altAboveGround 
) const
protectedvirtual

Clamps point to terrain, then applies delta altitude.

Reimplemented in makVrf::DtVrfGuiIntervisibilityDriver.

virtual void makVrv::DtIntervisibilityDriver::elementsRemoved ( const DtElementData::UniqueIdList )
protectedvirtual

Called when a simulation item is removed. If attached to an intervisibility object will remove that object.

void makVrv::DtIntervisibilityDriver::installElementDefinitions ( DtElementDefinitionManager manager)
protected

Creates and installed procedural element definitions into the manager.

virtual void makVrv::DtIntervisibilityDriver::slot_coordinateSystemChanged ( )
protectedvirtual

slot for when the coordinate system changes

virtual void makVrv::DtIntervisibilityDriver::slot_intervisibilityObjectsShown ( bool  show)
protectedvirtual

slot for when the visibility of intervisibility objects is toggled

virtual void makVrv::DtIntervisibilityDriver::slot_rangeLinesShown ( bool  show)
protectedvirtual

slot for when the visibility of range lines is toggled

Member Data Documentation

DtDe& makVrv::DtIntervisibilityDriver::myDe
protected
ElementMap makVrv::DtIntervisibilityDriver::myElements
protected
ListenerMap makVrv::DtIntervisibilityDriver::myListeners
protected
DtBasicEditingEventProcessor* makVrv::DtIntervisibilityDriver::myProcessor
protected
std::string makVrv::DtIntervisibilityDriver::myClassName
protected
DtBaseConnection* makVrv::DtIntervisibilityDriver::myConnection
protected
bool makVrv::DtIntervisibilityDriver::myAllowEditing
protected
bool makVrv::DtIntervisibilityDriver::myAllowCreating
protected
bool makVrv::DtIntervisibilityDriver::myDistribute
protected
DtSignalConnectionManager makVrv::DtIntervisibilityDriver::myConnections
protected
DtIntervisibilityElement* makVrv::DtIntervisibilityDriver::myCreatingElement
protected

If creating an element via the mouse, these parameters will not not be NULL.

DtIntervisibilityStateListener* makVrv::DtIntervisibilityDriver::myCreationListener
protected
DtSignalConnectionManager makVrv::DtIntervisibilityDriver::myProcessorConnections
protected
Editing makVrv::DtIntervisibilityDriver::myEditing
protected
DtVector makVrv::DtIntervisibilityDriver::myEditingAnchorLocation
protected
ListenerCreatorMap makVrv::DtIntervisibilityDriver::myListenerCreatorMap
protected

Map that will keep track of listener creator by string type.

DtChannel* makVrv::DtIntervisibilityDriver::myHiddenChannel
protected
DtIntersectorsContainer* makVrv::DtIntervisibilityDriver::myIntersectors = nullptr
protected
DtCoordinateSystem* makVrv::DtIntervisibilityDriver::myCoordinateSystem = nullptr
protected

local clone of the system wide coordinate system. for thread safety.


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

Document ID: Generated on Thu Oct 23 22:29:17 EDT 2025 from SVN revision 280951
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)