MobilityVisualizerBase¶
Package: inet.visualizer.base
simple module MobilityVisualizerBase
Base module for mobility visualizer simple modules. It subscribes
to the mobilityStateChanged signal in the module determined by the
visualizationSubjectModule parameter. The actual visualization of mobility is done in
derived modules.
See also: MobilityCanvasVisualizer, MobilityOsgVisualizer, IMobilityVisualizer, VisualizerBase
Inheritance diagram¶
Known subclasses¶
Name |
Type |
Description |
|---|---|---|
simple module |
Visualizes multiple mobilities on a 2D canvas. It moves visual representations according to their mobility model. It also displays recent movement as a polyline, current velocity vector, and current orientation. |
|
simple module |
Visualizes multiple mobilities on a 3D osg scene. It moves the visual representation according to their mobility model. It also displays recent movement as a polyline, current velocity vector, and current orientation. |
Extends¶
Name |
Type |
Description |
|---|---|---|
simple module |
Base module for visualizer simple modules. It simply provides the visualization target module for derived modules. |
Parameters¶
Name |
Type |
Default value |
Description |
|---|---|---|---|
displayStringTextFormat |
string |
“” |
Determines the text that is written on top of the submodule, supports displaying pars, watches, and module-specific information |
visualizationTargetModule |
string |
“^” |
Module path relative to the visualizer which determines where the visualization should appear in the user interface, parent module by default |
visualizationSubjectModule |
string |
“^” |
Module path relative to the visualizer which determines what part of the simulation model the visualizer displays in the user interface, parent module by default |
tags |
string |
“” |
Tag added to each visualization for disambiguation in the runtime environment |
networkNodeVisualizerModule |
string |
“^.networkNodeVisualizer” |
The network node visualizer module, refers to a sibling submodule by default |
displayMobility |
bool |
true |
Display mobility, enabled by default |
animationSpeed |
double |
0 |
Animation speed while objects are moving around, value must be in the range (0, +inf) |
moduleFilter |
string |
“**.mobility” |
Which mobilities are considered, matches all mobilities by default |
displayPositions |
bool |
false |
Display a circle indicating the current position, disabled by default |
positionCircleRadius |
double |
4 |
Radius of the circle |
positionCircleLineWidth |
double |
1 |
Line width of the circle |
positionCircleLineColor |
string |
“dark” |
Position circle line color is a list of colors or a color group name (e.g. dark, light), a set of dark colors by default |
positionCircleFillColor |
string |
“dark” |
Position circle fill color is a list of colors or a color group name (e.g. dark, light), a set of dark colors by default |
displayOrientations |
bool |
false |
Display a 3D cone indicating the current orientation, disabled by default |
orientationPieRadius |
double |
32 |
On-screen radius of the orientation cone, in pixels |
orientationPieSize |
double |
0.2 |
Angular half-width of the orientation cone as a fraction of a full circle; must be in the open interval (0, 0.5) |
orientationPieOpacity |
double |
0.25 |
Opacity of the orientation cone |
orientationLineColor |
string |
“black” |
Orientation line color, black by default |
orientationLineStyle |
string |
“solid” |
Orientation line style (solid, dashed, dotted) |
orientationLineWidth |
double |
1 |
Orientation line width |
orientationFillColorUp |
string |
“blue” |
Fill color of the orientation base disc when the cone points up (toward the viewer); empty means the disc is not filled |
orientationFillColorDown |
string |
“red” |
Fill color of the orientation base disc when the cone points down (away from the viewer); empty means the disc is not filled |
displayVelocities |
bool |
false |
Display an arrow indicating the current velocity, disabled by default |
velocityArrowScale |
double |
1 |
Velocity scaling factor to pixels |
velocityLineColor |
string |
“black” |
Velocity line color, black by default |
velocityLineStyle |
string |
“solid” |
Velocity line style (solid, dashed, dotted) |
velocityLineWidth |
double |
1 |
Velocity line width |
velocityProjection |
string |
“projected” |
How the velocity arrow is projected on an equirectangular map: “projected” applies the full equirectangular distortion; “trueLength” uses the map heading (sheared direction) at true length; “isometric” preserves true heading and length. No effect without a geographic/equirectangular projection. |
orientationProjection |
string |
“projected” |
How the orientation cone is projected on an equirectangular map: “projected” shears the base disc per the equirectangular distortion; “isometric” preserves true heading and length (the base disc stays circular); “trueLength” uses the map heading at true length. No effect without a geographic/equirectangular projection. |
displayMovementTrails |
bool |
false |
Display a line along the recent path of mobilities, disabled by default |
movementTrailLineColor |
string |
“dark” |
Movement trail line color is a list of colors or a color group name (e.g. dark, light), a set of dark colors by default |
movementTrailLineStyle |
string |
“solid” |
Movement trail line style (solid, dashed, dotted) |
movementTrailLineWidth |
double |
1 |
Movement trail line width |
trailLength |
int |
100 |
Number of sections in the trail |
movementTrailSegmentHideThreshold |
double |
inf |
Trail segments longer than this many pixels (e.g. a node wrapping across the map on an equirectangular projection) are treated as discontinuities and hidden, so the trail shows as disjoint pieces; the default (positive infinity) hides nothing |
Properties¶
Name |
Value |
Description |
|---|---|---|
class |
MobilityVisualizerBase |
|
display |
i=block/app |
Source code¶
//
// Base module for mobility visualizer simple modules. It subscribes
// to the `mobilityStateChanged` signal in the module determined by the
// `visualizationSubjectModule` parameter. The actual visualization of mobility is done in
// derived modules.
//
// @see ~MobilityCanvasVisualizer, ~MobilityOsgVisualizer, ~IMobilityVisualizer, ~VisualizerBase
//
simple MobilityVisualizerBase extends VisualizerBase
{
parameters:
string networkNodeVisualizerModule = default("^.networkNodeVisualizer"); // The network node visualizer module, refers to a sibling submodule by default
bool displayMobility = default(true); // Display mobility, enabled by default
double animationSpeed = default(0); // Animation speed while objects are moving around, value must be in the range (0, +inf)
string moduleFilter @mutable = default("**.mobility"); // Which mobilities are considered, matches all mobilities by default
bool displayPositions = default(false); // Display a circle indicating the current position, disabled by default
double positionCircleRadius = default(4); // Radius of the circle
double positionCircleLineWidth = default(1); // Line width of the circle
string positionCircleLineColor = default("dark"); // Position circle line color is a list of colors or a color group name (e.g. dark, light), a set of dark colors by default
string positionCircleFillColor = default("dark"); // Position circle fill color is a list of colors or a color group name (e.g. dark, light), a set of dark colors by default
bool displayOrientations = default(false); // Display a 3D cone indicating the current orientation, disabled by default
double orientationPieRadius = default(32); // On-screen radius of the orientation cone, in pixels
double orientationPieSize = default(0.2); // Angular half-width of the orientation cone as a fraction of a full circle; must be in the open interval (0, 0.5)
double orientationPieOpacity = default(0.25); // Opacity of the orientation cone
string orientationLineColor = default("black"); // Orientation line color, black by default
string orientationLineStyle = default("solid"); // Orientation line style (solid, dashed, dotted)
double orientationLineWidth = default(1); // Orientation line width
string orientationFillColorUp = default("blue"); // Fill color of the orientation base disc when the cone points up (toward the viewer); empty means the disc is not filled
string orientationFillColorDown = default("red"); // Fill color of the orientation base disc when the cone points down (away from the viewer); empty means the disc is not filled
bool displayVelocities = default(false); // Display an arrow indicating the current velocity, disabled by default
double velocityArrowScale = default(1); // Velocity scaling factor to pixels
string velocityLineColor = default("black"); // Velocity line color, black by default
string velocityLineStyle = default("solid"); // Velocity line style (solid, dashed, dotted)
double velocityLineWidth = default(1); // Velocity line width
string velocityProjection @enum("projected", "trueLength", "isometric") = default("projected"); // How the velocity arrow is projected on an equirectangular map: "projected" applies the full equirectangular distortion; "trueLength" uses the map heading (sheared direction) at true length; "isometric" preserves true heading and length. No effect without a geographic/equirectangular projection.
string orientationProjection @enum("projected", "trueLength", "isometric") = default("projected"); // How the orientation cone is projected on an equirectangular map: "projected" shears the base disc per the equirectangular distortion; "isometric" preserves true heading and length (the base disc stays circular); "trueLength" uses the map heading at true length. No effect without a geographic/equirectangular projection.
bool displayMovementTrails = default(false); // Display a line along the recent path of mobilities, disabled by default
string movementTrailLineColor = default("dark"); // Movement trail line color is a list of colors or a color group name (e.g. dark, light), a set of dark colors by default
string movementTrailLineStyle = default("solid"); // Movement trail line style (solid, dashed, dotted)
double movementTrailLineWidth = default(1); // Movement trail line width
int trailLength = default(100); // Number of sections in the trail
double movementTrailSegmentHideThreshold = default(inf); // Trail segments longer than this many pixels (e.g. a node wrapping across the map on an equirectangular projection) are treated as discontinuities and hidden, so the trail shows as disjoint pieces; the default (positive infinity) hides nothing
@class(MobilityVisualizerBase);
}