![]() |
VR-Forces Developer's Guide
|
Manages automatic expansion and collapsing of aggregates based on map scale and echelon level.
This manager automatically controls the collapse/expand state of aggregate units based on the current map scale. It allows configuration of which echelon levels should be collapsed at specific map scales.

Classes | |
| struct | AutoCollapseInfo |
Static Public Member Functions | |
| static DtAutoCollapseExpandEchelonManager & | instance (DtDe &de) |
Protected Types | |
| using | HierarchyLevels = std::map< int, std::set< DtElementID >> |
| using | AutoCollapseMap = std::map< DtElementID, AutoCollapseInfo > |
Protected Member Functions | |
| virtual bool | setChildElementsToAutomatic (const DtElementID &id) |
| virtual void | slot_postTick () |
| virtual void | hierarchyItemsModified (const DtElementAttributeManager::EntryAttributesList &l) |
| virtual void | hierarchyItemsRemoved (const DtElementData::UniqueIdList &idList) |
| virtual void | recalculateLevels () |
| virtual int | levelFor (DtElementID id) const |
| virtual void | bottomUpHierarchy () |
| virtual int | bottomUpHierarchy (DtElementEntry *entry) |
| virtual void | findDefaultChannel () |
| virtual DtElementID | findHighestLevelUserControlled (const DtElementID &startingId) |
| virtual bool | userControlled (const DtElementID &id) const |
| virtual void | slot_channelAboutToBeDestroyed (DtChannelManager *, DtChannel *channel) |
Protected Attributes | |
| DtDe & | myDe |
| HierarchyLevels | myHierarchyLevels |
| DtSignalConnectionManager | myConnectionManager |
| int | myLastCollapsedLevel = 0 |
| AutoCollapseMap | myAutoCollapseMap |
| AutoCollapseMap | myUserSpecifiedMap |
| bool | myNextExpandCollapseIsUser |
| std::map< int, double > | myMapScaleCollapse |
| bool | myEnabled |
| bool | myRecalculateLevels |
| double | myCurrentScale |
| double | myPreviousViewResolution |
| DtChannel * | myChannel |
| boost::signals2::connection | myChannelDestroyConnection |
|
protected |
Type alias for hierarchy level mapping.
|
protected |
Type alias for auto-collapse information map.
| makVrv::DtAutoCollapseExpandEchelonManager::DtAutoCollapseExpandEchelonManager | ( | DtDe & | ) |
CTOR.
| de | Reference to the DtDe (Distributed Entity) object |
|
overridevirtual |
DTOR.
|
delete |
not allowed
|
delete |
not allowed
|
delete |
not allowed
|
delete |
not allowed
|
delete |
not allowed
|
static |
Returns the singleton instance of the manager for the given DtDe.
| de | Reference to the DtDe object |
|
virtual |
Set the map scale thresholds for automatic collapse.
Configures at which map scales aggregates should automatically collapse to specific echelon levels. The map uses the echelon level as the key and the map scale (in meters per screen inch) as the value.
| mapScaleCollapse | Map of echelon level to map scale threshold |
| const std::map<int, double>& makVrv::DtAutoCollapseExpandEchelonManager::collapseLevelsAboveMapScales | ( | ) | const |
Get the current map scale collapse configuration.
|
virtual |
Enable or disable the auto collapse/expand system.
| enabled | True to enable automatic collapse/expand, false to disable |
|
virtual |
Check if the auto collapse/expand system is enabled.
|
virtual |
Set which channel to use for scale calculations.
| name | Name of the channel to monitor for scale changes |
|
virtual |
Notify the manager that the map scale has changed.
Called when the display's map scale changes (e.g., user zooms in/out). The manager will automatically adjust which aggregates are expanded or collapsed based on the configured thresholds.
| scaleInMeters | The new map scale in meters per screen inch |
|
virtual |
Collapse all aggregates to a specific echelon level.
Manually collapses all aggregates to the specified level depth, unless they have been manually expanded/collapsed by the user. If level is 0, expands all aggregates that are not user-controlled.
| level | The echelon level to collapse to (0 = expand all) |
|
virtual |
Expand all items that have been automatically collapsed.
Expands all aggregates that were collapsed by the auto-collapse system, but preserves user-controlled collapse states.
|
virtual |
Mark the next expand/collapse operation as user-initiated.
When true, the next expand/collapse operation will be recorded as a user action, preventing the auto-collapse system from overriding it.
| b | True if next operation is user-initiated |
|
virtual |
Reset aggregates to automatic control.
Removes user-control flags from the specified aggregates, allowing the auto-collapse system to manage their state again. If no IDs are specified, resets all aggregates to automatic control.
| ids | Set of unique IDs to reset (empty = reset all) |
|
virtual |
Mark aggregates as user-controlled.
Flags the specified aggregates as being under user control, preventing the auto-collapse system from automatically changing their state.
| ids | Set of unique IDs to mark as user-controlled |
| expanding | True if the user action was to expand, false if collapsing |
|
virtual |
Check if an aggregate is under user control.
| id | Unique ID of the aggregate to check |
|
protectedvirtual |
Recursive to remove all child element IDs from myUserSpecified.
|
protectedvirtual |
Called after each simulation tick to process pending updates.
|
protectedvirtual |
Handle modifications to hierarchy items.
| l | List of modified hierarchy entries |
|
protectedvirtual |
Handle removal of hierarchy items.
| idList | List of removed unique IDs |
|
protectedvirtual |
Recalculate the hierarchy levels for all aggregates.
|
protectedvirtual |
Get the echelon level for a specific aggregate.
| id | Unique ID of the aggregate |
|
protectedvirtual |
Calculate hierarchy using bottom-up approach.
Calculates levels where each aggregate has its own level structure. A 1-level aggregate collapses at level 1, while a 4-level aggregate collapses at level 4. Walks the chain of each element individually.
|
protectedvirtual |
Calculate bottom-up hierarchy for a specific element.
| entry | Pointer to the element entry to process |
|
protectedvirtual |
Find and set the default channel for scale monitoring.
|
protectedvirtual |
Find the highest level user-controlled aggregate in the hierarchy.
|
protectedvirtual |
Check if an element id is in the myUserSpecifiedMap Doesn't check children.
|
protectedvirtual |
Slot called when the monitored channel is about to be destroyed.
|
protected |
Map of hierarchy levels to sets of unique IDs at each level.
|
protected |
Manages signal connections for this manager.
|
protected |
The last level that was collapsed to.
|
protected |
Map of aggregate IDs to their auto-collapse information.
|
protected |
Map of aggregates that have been explicitly controlled by the user.
|
protected |
Flag indicating if the next expand/collapse is user-initiated.
Map of echelon level to map scale threshold (meters per screen inch)
|
protected |
Flag indicating if auto-collapse/expand is enabled.
|
protected |
Flag indicating if hierarchy levels need recalculation.
|
protected |
Current map scale in meters per screen inch.
|
protected |
Previous view resolution for change detection.
|
protected |
Pointer to the channel being monitored for scale changes.
|
protected |