![]() |
VR-Forces 4.0.4 Class Documentation
|
This driver will manage the creation, modification and removal of intervisibility objects. More...

Classes | |
| class | DtIntervisibilityConnection |
| Connection for the DtIntervisibilityDriver. More... | |
| struct | OriginalInformation |
| Editing information. More... | |
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< AttachPoint > | AttachPoints |
Public Member Functions | |
| DtIntervisibilityDriver (DtDe &, const std::string &className) | |
| CTOR. | |
| virtual | ~DtIntervisibilityDriver () |
| DTOR. | |
| virtual bool | autoStart () const |
| Override to return true (does not look at configuration) | |
| DtIntervisibilityStateListener * | findListener (DtElementID id) |
| DtIntervisibilityElement * | findElement (DtElementID id) |
| virtual DtIntervisibilityElement * | createIntervisibilityLine (const DtVector &startPoint, const DtVector &endPoint) |
| Create and return a new intervisibility line with given start and end points. | |
| virtual void | createIntervisibilityLine (const AttachPoints &=AttachPoints()) |
| Creates a new intervisibility line object by using the event processor with the newly create element. | |
| const DtUnicode & | intervisibilityLine () const |
| String which represents the internal keyword used to create an intervisibility line. | |
| virtual DtIntervisibilityElement * | createIntervisibilityFan (const DtVector &startPoint, const DtVector &endPoint) |
| Create and return a new intervisibility fan with given start and end points. | |
| virtual void | createIntervisibilityFan (const AttachPoints &=AttachPoints()) |
| Creates a new intervisibility fan object by using the event processor. | |
| const DtUnicode & | intervisibilityFan () const |
| String which represents the internal keyword used to create an intervisibility fan. | |
| virtual DtIntervisibilityElement * | createIntervisibilityEntityFan (const DtVector &startPoint, const DtVector &endPoint) |
| Create and return a new intervisibility entity fan with given start and end points. | |
| virtual void | createIntervisibilityEntityFan (const AttachPoints &=AttachPoints()) |
| Creates a new intervisibility entity fan object by using the event processor. | |
| const DtUnicode & | intervisibilityEntityFan () const |
| String which represents the internal keyword used to create an intervisibility entity fan. | |
| void | addListenerCreator (const std::string &, DtIntervisibilityStateListenerCreator *) |
| Adds a new listener creator given the keyword. | |
| virtual void | cancelChanges () |
| Cancel current creation and remove temporary symbol. | |
| virtual void | destroy (DtElementID id) |
| Given the particular ID, destroys (removes) the object and also removes from selection. | |
| virtual void | destroyAll () |
| Destroys all intervisibility elements. | |
| virtual void | setAllowCreating (bool) |
| Sets whether or not the processor is enabled for creating. | |
| virtual void | setAllowEditing (bool) |
| Sets whether or not the processor supports editing of objects. | |
| virtual DtIntervisibilityElement * | create (const DtUnicode &definition, const DtVector &startPoint, const DtVector &endPoint) |
| Create and return a new element with the points as the starting points. | |
| virtual void | intervisibilityObjectsShown (bool show) |
| const std::string & | className () const |
| Returns the driver's class name. | |
| DtBaseConnection * | connection () |
| Returns the driver's connection. | |
| const DtBaseConnection * | connection () const |
| Returns the driver's connection (const). | |
Static Public Member Functions | |
| static DtIntervisibilityDriver * | findDriver (DtDe &de) |
| Returns the current intervisibility driver in the driver manager. | |
| static std::string | theInstanceName () |
| Returns the driver's instance (display) name. | |
Protected Types | |
| typedef boost::unordered_map < DtElementID, OriginalInformation > | Editing |
| typedef std::map< std::string, DtIntervisibilityStateListenerCreator * > | ListenerCreatorMap |
Protected Member Functions | |
| virtual DtBasicEditingEventProcessor * | createEventProcessor () const |
| Pure interface that must be implemented to be considered a shape driver creates the event processor used for mouse and keyboard controls. | |
| virtual DtIntervisibilityStateListener * | createListener (const std::string &definition) const |
| Creates a new listener to be used with the element being created. | |
| virtual DtIntervisibilityElement * | createElement (DtIntervisibilityStateListener *, const DtUnicode &definition) const |
| Creates a new shape element for the given listener. | |
| virtual void | create (const DtUnicode &elementDefinitionName, const AttachPoints &=AttachPoints()) |
| Creates a new element object by using the event processor. | |
| virtual bool | onTick () |
| call for each tick | |
| virtual bool | onStart () |
| Start the host output. | |
| virtual bool | onStop () |
| Stop the host output. | |
| virtual void | completeSetup () |
| Makes final connections. | |
| virtual void | slot_onCurrentSelectionChanged (const DtSelectionManager::IdSet &selected, const DtSelectionManager::IdSet &deselected) |
| Select/deselect objects. | |
| virtual void | select (const DtSelectionManager::IdSet &, bool) |
| Select/deselect all items in list. | |
| virtual void | connectProcessorSignals () |
| Connects up to event processor to handle signals. | |
| virtual void | slot_locationChanged (DtVector, double altAboveGround) |
| Signal sent when the mouse location has changed via a mouse move. | |
| virtual void | slot_altitudeChanged (DtVector, double) |
| Signal sent when the altitude has changed. | |
| virtual void | slot_altitudeIsDragging (bool) |
| Called when altitude has entered/left dragging mode. | |
| virtual void | slot_place (DtUniqueID, DtVector, double altAboveGround) |
| Signal sent on left click of mouse on terrain or object. | |
| virtual void | finishEditing () |
| Called to finish the current creation and make object permanent. | |
| virtual void | slot_dragStart (const DtSelectionManager::IdSet &set, const DtVector &) |
| Called when a drag operation is about to start, stash off information about current objects (in case of cancel) and proceed to allow editing. | |
| virtual void | modifyEditingObjects (const DtVector &pos, double altAboveGround) |
| Modifies all the objects being edited based on the new point and altitude. | |
| virtual void | resetSelectionForEditableObjects () |
| Called after complete or cancel to reset selection state to original state. | |
| virtual DtVector | clamp (const DtVector &, double altAboveGround) const |
| Clamps point to terrain, then applies delta altitude. | |
| virtual void | elementsRemoved (const DtElementData::UniqueIdList &) |
| Called when a simulation item is removed. | |
| void | installElementDefinitions (DtElementDefinitionManager &manager) |
| Creates and installed procedural element definitions into the manager. | |
Protected Attributes | |
| DtDe & | myDe |
| ElementMap | myElements |
| ListenerMap | myListeners |
| DtBasicEditingEventProcessor * | myProcessor |
| std::string | myClassName |
| DtBaseConnection * | myConnection |
| bool | myAllowEditing |
| bool | myAllowCreating |
| bool | myDistribute |
| DtSignalConnectionManager | myConnections |
| DtIntervisibilityElement * | myCreatingElement |
| If creating an element via the mouse, these parameters will not not be NULL. | |
| DtIntervisibilityStateListener * | myCreationListener |
| DtSignalConnectionManager | myProcessorConnections |
| Editing | myEditing |
| DtVector | myEditingAnchorLocation |
| ListenerCreatorMap | myListenerCreatorMap |
| Map that will keep track of listener creator by string type. | |
| DtChannel * | myHiddenChannel |
This driver will manage the creation, modification and removal of intervisibility objects.
Will use the event processor for mouse and keyboard processing if necessary.
| typedef boost::unordered_map<DtElementID, DtIntervisibilityElement*> makVrv::DtIntervisibilityDriver::ElementMap |
| typedef boost::unordered_map<DtElementID, DtIntervisibilityStateListener*> makVrv::DtIntervisibilityDriver::ListenerMap |
| typedef std::pair<DtElementID, DtVector> makVrv::DtIntervisibilityDriver::AttachPoint |
| typedef std::vector<AttachPoint> makVrv::DtIntervisibilityDriver::AttachPoints |
typedef boost::unordered_map<DtElementID, OriginalInformation> makVrv::DtIntervisibilityDriver::Editing [protected] |
typedef std::map<std::string, DtIntervisibilityStateListenerCreator*> makVrv::DtIntervisibilityDriver::ListenerCreatorMap [protected] |
| makVrv::DtIntervisibilityDriver::DtIntervisibilityDriver | ( | DtDe & | , |
| const std::string & | className | ||
| ) |
CTOR.
| virtual makVrv::DtIntervisibilityDriver::~DtIntervisibilityDriver | ( | ) | [virtual] |
DTOR.
| virtual bool makVrv::DtIntervisibilityDriver::autoStart | ( | ) | const [virtual] |
Override to return true (does not look at configuration)
Reimplemented from makVrv::DtDriver.
| 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 void 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.
| virtual void 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.
| 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 void 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.
| 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.
| virtual void makVrv::DtIntervisibilityDriver::intervisibilityObjectsShown | ( | bool | show | ) | [virtual] |
| static DtIntervisibilityDriver* makVrv::DtIntervisibilityDriver::findDriver | ( | DtDe & | de | ) | [static] |
Returns the current intervisibility driver in the driver manager.
Reimplemented in makVrf::DtVrfGuiIntervisibilityDriver.
| const std::string& makVrv::DtIntervisibilityDriver::className | ( | ) | const [inline, virtual] |
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 [protected, virtual] |
Pure interface that must be implemented to be considered a shape driver creates the event processor used for mouse and keyboard controls.
Reimplemented in exampleRangeLine::DtRangeLineDriver.
| virtual DtIntervisibilityStateListener* makVrv::DtIntervisibilityDriver::createListener | ( | const std::string & | definition | ) | const [protected, virtual] |
Creates a new listener to be used with the element being created.
Reimplemented in exampleRangeLine::DtRangeLineDriver.
| virtual DtIntervisibilityElement* makVrv::DtIntervisibilityDriver::createElement | ( | DtIntervisibilityStateListener * | , |
| const DtUnicode & | definition | ||
| ) | const [protected, virtual] |
Creates a new shape element for the given listener.
Reimplemented in exampleRangeLine::DtRangeLineDriver.
| virtual void makVrv::DtIntervisibilityDriver::create | ( | const DtUnicode & | elementDefinitionName, |
| const AttachPoints & | = AttachPoints() |
||
| ) | [protected, virtual] |
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 | ( | ) | [protected, virtual] |
call for each tick
Implements makVrv::DtDriver.
| virtual bool makVrv::DtIntervisibilityDriver::onStart | ( | ) | [protected, virtual] |
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 | ( | ) | [protected, virtual] |
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 | ( | ) | [protected, virtual] |
Makes final connections.
Reimplemented in exampleRangeLine::DtRangeLineDriver.
| virtual void makVrv::DtIntervisibilityDriver::slot_onCurrentSelectionChanged | ( | const DtSelectionManager::IdSet & | selected, |
| const DtSelectionManager::IdSet & | deselected | ||
| ) | [protected, virtual] |
Select/deselect objects.
| virtual void makVrv::DtIntervisibilityDriver::select | ( | const DtSelectionManager::IdSet & | , |
| bool | |||
| ) | [protected, virtual] |
Select/deselect all items in list.
| virtual void makVrv::DtIntervisibilityDriver::connectProcessorSignals | ( | ) | [protected, virtual] |
Connects up to event processor to handle signals.
| virtual void makVrv::DtIntervisibilityDriver::slot_locationChanged | ( | DtVector | , |
| double | altAboveGround | ||
| ) | [protected, virtual] |
Signal sent when the mouse location has changed via a mouse move.
Vector is in local database coordinates
| virtual void makVrv::DtIntervisibilityDriver::slot_altitudeChanged | ( | DtVector | , |
| double | |||
| ) | [protected, virtual] |
Signal sent when the altitude has changed.
| virtual void makVrv::DtIntervisibilityDriver::slot_altitudeIsDragging | ( | bool | ) | [protected, virtual] |
Called when altitude has entered/left dragging mode.
| virtual void makVrv::DtIntervisibilityDriver::slot_place | ( | DtUniqueID | , |
| DtVector | , | ||
| double | altAboveGround | ||
| ) | [protected, virtual] |
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 exampleRangeLine::DtRangeLineDriver.
| virtual void makVrv::DtIntervisibilityDriver::finishEditing | ( | ) | [protected, virtual] |
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 & | |||
| ) | [protected, virtual] |
Called when a drag operation is about to start, stash off information about current objects (in case of cancel) and proceed to allow editing.
| virtual void makVrv::DtIntervisibilityDriver::modifyEditingObjects | ( | const DtVector & | pos, |
| double | altAboveGround | ||
| ) | [protected, virtual] |
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 | ( | ) | [protected, virtual] |
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 [protected, virtual] |
Clamps point to terrain, then applies delta altitude.
| virtual void makVrv::DtIntervisibilityDriver::elementsRemoved | ( | const DtElementData::UniqueIdList & | ) | [protected, virtual] |
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.
Reimplemented in exampleRangeLine::DtRangeLineDriver.
DtDe& makVrv::DtIntervisibilityDriver::myDe [protected] |
std::string makVrv::DtIntervisibilityDriver::myClassName [protected] |
bool makVrv::DtIntervisibilityDriver::myAllowEditing [protected] |
bool makVrv::DtIntervisibilityDriver::myAllowCreating [protected] |
bool makVrv::DtIntervisibilityDriver::myDistribute [protected] |
If creating an element via the mouse, these parameters will not not be NULL.
Editing makVrv::DtIntervisibilityDriver::myEditing [protected] |
Map that will keep track of listener creator by string type.