![]() |
VR-Forces 4.0.4 Class Documentation
|
The master window of the scene. More...

Public Types | |
| enum | SelectionMode { SelectionModeAll = 0, SelectionModeEntities = 1, SelectionModeTerrain = 2 } |
| enum | SelectionType { NoValidSelection, Entity, Prop, Terrain, Aggregate, Observer, ControlObject, OverlayObject, Intervisibility, Feature, Mixed } |
| The nature of the current selection. More... | |
| enum | SelectionOperation { NoOperation = 0, AddToSelection, RemoveFromSelection, MultipleSelection, SetSelection, ClearSelection, MaintainSelectionIfSelected } |
| typedef std::set< DtUniqueID > | IdSet |
Public Member Functions | |
| ~DtSelectionManager () | |
| DTOR. | |
| void | performSelectionOperation (SelectionOperation op, const IdSet &ids) |
| Utility function for specify the operation using a variable. | |
| void | setCurrentSelections (const IdSet &selections) |
| set the current selection set | |
| const DtSelectionManager::IdSet & | currentSelections () const |
| get the current selection set | |
| void | addToCurrentSelection (const IdSet &adds) |
| add to the current selection set | |
| void | maintainCurrentSelectionIfSelected (const IdSet &maintain) |
| If item is already selected, maintain the current selection, else act as SetSelection. | |
| void | removeFromCurrentSelection (const IdSet &removes) |
| add to the current selection set | |
| void | toggleFromCurrentSelection (const IdSet &toggles) |
| Each id current not selected will be selected and each id already selected will be deselected. | |
| void | removeFromCurrentSelection (const DtElementData::UniqueIdList &removes) |
| add to the current selection set | |
| SelectionMode | selectionMode () const |
| Selection Mode. | |
| void | setSelectionMode (SelectionMode mode) |
| bool | isSelectable (DtUniqueID id) const |
| Determine an element's selectability Determines, based on the element's type and current selection mode, if the object is selectable. | |
| bool | isSelectable (const DtElementEntry *entry) const |
| Determine an object's selectability. | |
| bool | isSelected (DtUniqueID id) const |
| Check to see if an object is selected. | |
| SelectionType | selectionType () const |
| virtual bool | propSelectionMajorityTransparent () |
| Is the majority of selected props transparent or opaque; used by toggle transparency selected. | |
| virtual void | slot_onElementsRemoved (const DtElementData::UniqueIdList &elementIds) |
| Called by signal whenever elements are removed. | |
| virtual void | backupCurrentSelection () |
| Puts the current selection onto the backup queue. | |
| virtual bool | restoreCurrentSelection () |
| Restores a previously backed up selection. | |
| bool | selectionIsVertex (const IdSet &selection) |
| bool | objectIsVertex (const DtUniqueID &id) |
| DtUniqueID | parentId (const DtUniqueID &id) |
| virtual bool | allItemsWantVertexSelection (const IdSet &) const |
| Returns true if the items in the selection set are vertices and the vertices parents all want vertex selection. | |
| void | addWantsVertexSelection (DtElementEntry::ElementType) |
| Adds an item to the wants to have vertex selection list. | |
| void | removeWantsVertexSelection (DtElementEntry::ElementType) |
| Removes an item to the wants to have vertex selection list. | |
| bool | wantsVertexSelection (DtElementID) const |
| Returns true if the object type wants vertex selection. | |
| virtual void | addSelectableObjectType (DtElementEntry::ElementType type, SelectionMode=SelectionModeAll) |
| {@ | |
| virtual void | removeSelectableObjectType (DtElementEntry::ElementType type, SelectionMode) |
| virtual void | removeSelectableObjectTypeFromAllModes (DtElementEntry::ElementType type) |
| virtual bool | objectTypeSelectable (DtElementEntry::ElementType type, SelectionMode mode) const |
| virtual bool | objectTypeSelectable (DtElementEntry::ObjectType type) const |
| Uses current selection mode to see if object type is selectable. | |
Static Public Member Functions | |
| static DtSelectionManager & | instance (DtDe &de) |
| Get the selection manager instance. | |
| static SelectionOperation | selectionOperationForMouseEvent (const DtMouseEvent &mouseEvent) |
| Choose the appropriate selection operation based on the mouse event. | |
| static bool | typeSupportsMultipleSelection (DtElementEntry::ObjectType type, bool vertexSelectsParent) |
| Check to see if an object type supports multiple selection. | |
Public Attributes | |
| boost::signal< void(const IdSet &selected, const IdSet &deselected, SelectionType newType, SelectionType oldType)> | signal_currentSelectionChanged |
| Emited when the current selection changes. | |
| boost::signal< void(const DtUniqueID &id, const DtUniqueID &parentId)> | signal_vertexSelected |
| Special case: emitted in addition to of currentSelectionChanged when a vertex is selected. | |
| boost::signal< void(const DtUniqueID &id, const DtUniqueID &parentId)> | signal_vertexDeselected |
| Special case: emitted in addition to currentSelectionChanged when a vertex is deselected. | |
| boost::signal< void(const IdSet &entityIds)> | signal_entityInfoToggled |
| Emitted when the selected entities have their info pin state toggled Perhaps this signal doesn't belong here... | |
| boost::signal< void()> | signal_selectionModeChanged |
| Emited when the selection mode changes. | |
Protected Types | |
| typedef std::set < DtElementEntry::ElementType > | WantsVertexSelection |
| typedef std::set < DtElementEntry::ElementType > | ElementTypeSet |
| typedef boost::unordered_map < SelectionMode, ElementTypeSet > | SelectionModeMap |
| typedef std::queue< IdSet > | IdSetQueue |
Protected Member Functions | |
| DtSelectionManager (DtDe &de) | |
| CTOR. | |
| void | addToCurrentSelection (DtUniqueID id) |
| add to the current selection set | |
| void | removeFromCurrentSelection (DtUniqueID id) |
| add to the current selection set | |
| void | announceCurrentSelectionChanged (const IdSet &selected, const IdSet &deselected, SelectionType oldType) |
| Announce the selection changes by emitting signals. | |
| void | updateSelectionDisplay (const IdSet &selected, const IdSet &deselected) |
| void | updateSelectionType () |
| SelectionType | elementSelectionType (DtElementEntry *entry) const |
| Get the selection type for an element. | |
| void | convertVertexIdsToParentIds (const IdSet &in, IdSet &out) |
Protected Attributes | |
| DtDe & | myDe |
| IdSet | myCurrentSelections |
| SelectionMode | mySelectionMode |
| bool | myIgnoreSelectionChanges |
| Set when a signal is raised to avoid loops. | |
| bool | myIgnoreSelectionModeChanges |
| SelectionType | mySelectionType |
| IdSetQueue | myBackupSelections |
| WantsVertexSelection | myWantsVertexSelection |
| SelectionModeMap | mySelectionModeMap |
| DtSignalConnectionManager | mySignals |
The master window of the scene.
| typedef std::set<DtUniqueID> makVrv::DtSelectionManager::IdSet |
typedef std::set<DtElementEntry::ElementType> makVrv::DtSelectionManager::WantsVertexSelection [protected] |
typedef std::set<DtElementEntry::ElementType> makVrv::DtSelectionManager::ElementTypeSet [protected] |
typedef boost::unordered_map<SelectionMode, ElementTypeSet> makVrv::DtSelectionManager::SelectionModeMap [protected] |
typedef std::queue<IdSet> makVrv::DtSelectionManager::IdSetQueue [protected] |
| makVrv::DtSelectionManager::DtSelectionManager | ( | DtDe & | de | ) | [protected] |
CTOR.
| static DtSelectionManager& makVrv::DtSelectionManager::instance | ( | DtDe & | de | ) | [static] |
Get the selection manager instance.
| void makVrv::DtSelectionManager::performSelectionOperation | ( | SelectionOperation | op, |
| const IdSet & | ids | ||
| ) |
Utility function for specify the operation using a variable.
| void makVrv::DtSelectionManager::setCurrentSelections | ( | const IdSet & | selections | ) |
set the current selection set
| const DtSelectionManager::IdSet& makVrv::DtSelectionManager::currentSelections | ( | ) | const |
get the current selection set
| void makVrv::DtSelectionManager::addToCurrentSelection | ( | const IdSet & | adds | ) |
add to the current selection set
| void makVrv::DtSelectionManager::maintainCurrentSelectionIfSelected | ( | const IdSet & | maintain | ) |
If item is already selected, maintain the current selection, else act as SetSelection.
This will only be true if all items are currently selected in the supplied set
| void makVrv::DtSelectionManager::removeFromCurrentSelection | ( | const IdSet & | removes | ) |
add to the current selection set
| void makVrv::DtSelectionManager::toggleFromCurrentSelection | ( | const IdSet & | toggles | ) |
Each id current not selected will be selected and each id already selected will be deselected.
| void makVrv::DtSelectionManager::removeFromCurrentSelection | ( | const DtElementData::UniqueIdList & | removes | ) |
add to the current selection set
Selection Mode.
| bool makVrv::DtSelectionManager::isSelectable | ( | DtUniqueID | id | ) | const |
Determine an element's selectability Determines, based on the element's type and current selection mode, if the object is selectable.
This form needs to look up the element, so it's better to use the form with a DtElementEntry argument if you have it.
| bool makVrv::DtSelectionManager::isSelectable | ( | const DtElementEntry * | entry | ) | const |
Determine an object's selectability.
Determines, based on the object's type and current selection mode, if the object is selectable.
| bool makVrv::DtSelectionManager::isSelected | ( | DtUniqueID | id | ) | const |
Check to see if an object is selected.
| virtual bool makVrv::DtSelectionManager::propSelectionMajorityTransparent | ( | ) | [virtual] |
Is the majority of selected props transparent or opaque; used by toggle transparency selected.
| virtual void makVrv::DtSelectionManager::slot_onElementsRemoved | ( | const DtElementData::UniqueIdList & | elementIds | ) | [virtual] |
Called by signal whenever elements are removed.
| virtual void makVrv::DtSelectionManager::backupCurrentSelection | ( | ) | [virtual] |
Puts the current selection onto the backup queue.
| virtual bool makVrv::DtSelectionManager::restoreCurrentSelection | ( | ) | [virtual] |
Restores a previously backed up selection.
If there are no selections backed up, returns false
| bool makVrv::DtSelectionManager::selectionIsVertex | ( | const IdSet & | selection | ) |
| bool makVrv::DtSelectionManager::objectIsVertex | ( | const DtUniqueID & | id | ) |
| DtUniqueID makVrv::DtSelectionManager::parentId | ( | const DtUniqueID & | id | ) |
| virtual bool makVrv::DtSelectionManager::allItemsWantVertexSelection | ( | const IdSet & | ) | const [virtual] |
Returns true if the items in the selection set are vertices and the vertices parents all want vertex selection.
Element types can be added to vertex selection by calling addWantsVertexSelection(). To remove, call removeWantsVertexSelection()
Adds an item to the wants to have vertex selection list.
Removes an item to the wants to have vertex selection list.
Returns true if the object type wants vertex selection.
| virtual void makVrv::DtSelectionManager::addSelectableObjectType | ( | DtElementEntry::ElementType | type, |
| SelectionMode | = SelectionModeAll |
||
| ) | [virtual] |
{@
Manages types that are valid for certain selection modes
| virtual void makVrv::DtSelectionManager::removeSelectableObjectType | ( | DtElementEntry::ElementType | type, |
| SelectionMode | |||
| ) | [virtual] |
| virtual void makVrv::DtSelectionManager::removeSelectableObjectTypeFromAllModes | ( | DtElementEntry::ElementType | type | ) | [virtual] |
| virtual bool makVrv::DtSelectionManager::objectTypeSelectable | ( | DtElementEntry::ElementType | type, |
| SelectionMode | mode | ||
| ) | const [virtual] |
| virtual bool makVrv::DtSelectionManager::objectTypeSelectable | ( | DtElementEntry::ObjectType | type | ) | const [virtual] |
Uses current selection mode to see if object type is selectable.
| static SelectionOperation makVrv::DtSelectionManager::selectionOperationForMouseEvent | ( | const DtMouseEvent & | mouseEvent | ) | [static] |
Choose the appropriate selection operation based on the mouse event.
| static bool makVrv::DtSelectionManager::typeSupportsMultipleSelection | ( | DtElementEntry::ObjectType | type, |
| bool | vertexSelectsParent | ||
| ) | [static] |
Check to see if an object type supports multiple selection.
Since it matters if we're currently selecting our parent with vertices and since this function is static, that must be passed in
| void makVrv::DtSelectionManager::addToCurrentSelection | ( | DtUniqueID | id | ) | [protected] |
add to the current selection set
| void makVrv::DtSelectionManager::removeFromCurrentSelection | ( | DtUniqueID | id | ) | [protected] |
add to the current selection set
| void makVrv::DtSelectionManager::announceCurrentSelectionChanged | ( | const IdSet & | selected, |
| const IdSet & | deselected, | ||
| SelectionType | oldType | ||
| ) | [protected] |
Announce the selection changes by emitting signals.
| void makVrv::DtSelectionManager::updateSelectionDisplay | ( | const IdSet & | selected, |
| const IdSet & | deselected | ||
| ) | [protected] |
| void makVrv::DtSelectionManager::updateSelectionType | ( | ) | [protected] |
| SelectionType makVrv::DtSelectionManager::elementSelectionType | ( | DtElementEntry * | entry | ) | const [protected] |
Get the selection type for an element.
| void makVrv::DtSelectionManager::convertVertexIdsToParentIds | ( | const IdSet & | in, |
| IdSet & | out | ||
| ) | [protected] |
| boost::signal<void (const IdSet& selected, const IdSet& deselected, SelectionType newType, SelectionType oldType)> makVrv::DtSelectionManager::signal_currentSelectionChanged |
Emited when the current selection changes.
| boost::signal<void (const DtUniqueID& id, const DtUniqueID& parentId)> makVrv::DtSelectionManager::signal_vertexSelected |
Special case: emitted in addition to of currentSelectionChanged when a vertex is selected.
| boost::signal<void (const DtUniqueID& id, const DtUniqueID& parentId)> makVrv::DtSelectionManager::signal_vertexDeselected |
Special case: emitted in addition to currentSelectionChanged when a vertex is deselected.
| boost::signal<void (const IdSet& entityIds)> makVrv::DtSelectionManager::signal_entityInfoToggled |
Emitted when the selected entities have their info pin state toggled Perhaps this signal doesn't belong here...
| boost::signal<void ()> makVrv::DtSelectionManager::signal_selectionModeChanged |
Emited when the selection mode changes.
DtDe& makVrv::DtSelectionManager::myDe [protected] |
IdSet makVrv::DtSelectionManager::myCurrentSelections [protected] |
Set when a signal is raised to avoid loops.