SceneCanvasVisualizer

Package: inet.visualizer.canvas.scene

simple module SceneCanvasVisualizer

Visualizes the scene on a 2D canvas. It provides the 3D coordinate system’s 2D orthographic projection for other visualizers. This is used to get a consistent visualization across all visualizers. It can also display the coordinate system axes.

See also: SceneOsgVisualizer, SceneVisualizer, SceneVisualizerBase, ISceneVisualizer

inet.visualizer.canvas.scene.SceneCanvasVisualizerSceneCanvasVisualizersimple

Usage diagram

Inheritance diagram

Used in compound modules

Name

Type

Description

IntegratedCanvasVisualizer

compound module

Integrates all canvas visualizers into a single module. It supports disabling any submodule visualizer by providing an empty string as its type.

IntegratedMultiCanvasVisualizer

compound module

Integrates all canvas visualizers into a single module. It supports disabling any submodule visualizer by providing an empty string as its type.

SceneVisualizer

compound module

Integrates canvas and osg scene visualizers into a single module.

Extends

Name

Type

Description

SceneVisualizerBase

simple module

Base module for scene visualizer simple modules. It determines the bounds of the scene, which is the minimum area where the whole simulation fits in. The scene encloses all physical objects and the constraint area of all mobile nodes. The visualizer also provides a timer that can be used to periodically update the user interface independently of the underlying simulation. The actual visualization of the scene is done in 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

physicalEnvironmentModule

string

“physicalEnvironment”

The physical environment module, refers to a top-level submodule by default

networkNodeVisualizerModule

string

“^.networkNodeVisualizer”

The network node visualizer, refers to a sibling submodule by default

axisLength

double

nan m

Length of x, y, and z axes, no axis by default

animationSpeed

double

0

Always active animation speed independent of any visualization, the value must be in the range (0, +inf)

sceneMinX

double

nan m

Lower bound of x coordinates in the scene

sceneMinY

double

nan m

Lower bound of y coordinates in the scene

sceneMinZ

double

nan m

Lower bound of z coordinates in the scene

sceneMaxX

double

nan m

Upper bound of x coordinates in the scene

sceneMaxY

double

nan m

Upper bound of y coordinates in the scene

sceneMaxZ

double

nan m

Upper bound of z coordinates in the scene

zIndex

double

0

Determines the drawing order of figures relative to other visualizers

viewAngle

string

“x right y down z out”

View angle is either

viewScale

string

“1 1”

The 2D scale is applied after the view projection

viewTranslation

string

“0 0”

The 2D translation is applied after the view projection

descriptionFigure

string

“”

If not empty, it should be the name of a text figure; it will display the active configuration’s description

Properties

Name

Value

Description

class

SceneCanvasVisualizer

display

i=block/app

Source code

//
// Visualizes the scene on a 2D canvas. It provides the 3D coordinate
// system's 2D orthographic projection for other visualizers. This is used to get
// a consistent visualization across all visualizers. It can also display the
// coordinate system axes.
//
// @see ~SceneOsgVisualizer, ~SceneVisualizer, ~SceneVisualizerBase, ~ISceneVisualizer
//
simple SceneCanvasVisualizer extends SceneVisualizerBase like ISceneVisualizer
{
    parameters:
        double zIndex = default(0); // Determines the drawing order of figures relative to other visualizers
        string viewAngle @mutable = default("x right y down z out"); // View angle is either
                                                                     //   - a valid combination of the words: x, y, z, left/right, up/down, in/out or
                                                                     //   - one of isometric, isometricN (where 0 <= N < 48)
                                                                     //   - 3 rotation angles and leftHanded/rightHanded
        string viewScale @mutable = default("1 1"); // The 2D scale is applied after the view projection
        string viewTranslation @mutable = default("0 0"); // The 2D translation is applied after the view projection
        string descriptionFigure = default(""); // If not empty, it should be the name of a text figure; it will display the active configuration's description
        @class(SceneCanvasVisualizer);
}

File: src/inet/visualizer/canvas/scene/SceneCanvasVisualizer.ned