SceneVisualizer

Package: inet.visualizer.common

compound module SceneVisualizer

Integrates canvas and osg scene visualizers into a single module.

See also: SceneCanvasVisualizer, SceneOsgVisualizer, SceneVisualizerBase, ISceneVisualizer

Usage diagram

Inheritance diagram

Parameters

Name

Type

Default value

Description

visualizationTargetModule

string

“^”

visualizationSubjectModule

string

“^”

Properties

Name

Value

Description

display

i=block/app

Unassigned submodule parameters

Name

Type

Default value

Description

canvasVisualizer.displayStringTextFormat

string

“”

Determines the text that is written on top of the submodule, supports displaying pars, watches, and module-specific information

canvasVisualizer.visualizationTargetModule

string

“^”

Module path relative to the visualizer which determines where the visualization should appear in the user interface, parent module by default

canvasVisualizer.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

canvasVisualizer.tags

string

“”

Tag added to each visualization for disambiguation in the runtime environment

canvasVisualizer.physicalEnvironmentModule

string

“physicalEnvironment”

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

canvasVisualizer.networkNodeVisualizerModule

string

“^.networkNodeVisualizer”

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

canvasVisualizer.axisLength

double

nan m

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

canvasVisualizer.animationSpeed

double

0

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

canvasVisualizer.sceneMinX

double

nan m

Lower bound of x coordinates in the scene

canvasVisualizer.sceneMinY

double

nan m

Lower bound of y coordinates in the scene

canvasVisualizer.sceneMinZ

double

nan m

Lower bound of z coordinates in the scene

canvasVisualizer.sceneMaxX

double

nan m

Upper bound of x coordinates in the scene

canvasVisualizer.sceneMaxY

double

nan m

Upper bound of y coordinates in the scene

canvasVisualizer.sceneMaxZ

double

nan m

Upper bound of z coordinates in the scene

canvasVisualizer.zIndex

double

0

Determines the drawing order of figures relative to other visualizers

canvasVisualizer.viewAngle

string

“x right y down z out”

View angle is either

canvasVisualizer.viewScale

string

“1 1”

The 2D scale is applied after the view projection

canvasVisualizer.viewTranslation

string

“0 0”

The 2D translation is applied after the view projection

canvasVisualizer.descriptionFigure

string

“”

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

osgVisualizer.displayStringTextFormat

string

“”

Determines the text that is written on top of the submodule, supports displaying pars, watches, and module-specific information

osgVisualizer.visualizationTargetModule

string

“^”

Module path relative to the visualizer which determines where the visualization should appear in the user interface, parent module by default

osgVisualizer.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

osgVisualizer.tags

string

“”

Tag added to each visualization for disambiguation in the runtime environment

osgVisualizer.physicalEnvironmentModule

string

“physicalEnvironment”

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

osgVisualizer.networkNodeVisualizerModule

string

“^.networkNodeVisualizer”

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

osgVisualizer.axisLength

double

nan m

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

osgVisualizer.animationSpeed

double

0

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

osgVisualizer.sceneMinX

double

nan m

Lower bound of x coordinates in the scene

osgVisualizer.sceneMinY

double

nan m

Lower bound of y coordinates in the scene

osgVisualizer.sceneMinZ

double

nan m

Lower bound of z coordinates in the scene

osgVisualizer.sceneMaxX

double

nan m

Upper bound of x coordinates in the scene

osgVisualizer.sceneMaxY

double

nan m

Upper bound of y coordinates in the scene

osgVisualizer.sceneMaxZ

double

nan m

Upper bound of z coordinates in the scene

osgVisualizer.cameraManipulator

string

“auto”

Type of camera manipulator

osgVisualizer.cameraDistanceFactor

double

5

Camera distance relative to the network bounding sphere radius

osgVisualizer.zNear

double

1m

Near distance for Z buffer optimization

osgVisualizer.zFar

double

100000m

Far distance for Z buffer optimization

osgVisualizer.fieldOfView

double

30deg

Camera field of view

osgVisualizer.clearColor

string

“#FFFFFF”

Scene background color, not set by default

osgVisualizer.displayScene

bool

true

Display the scene, enabled by default

osgVisualizer.sceneColor

string

“#A0E0A0”

Scene solid color if scene texture is not provided, gray by default

osgVisualizer.sceneOpacity

double

1.0

Scene opacity, opaque by default (not recommended to change)

osgVisualizer.sceneImage

string

“”

Scene texture (repeated), no image by default

osgVisualizer.sceneImageSize

double

1m

Scene texture size

osgVisualizer.sceneShading

bool

true

Exponential shading for scene color, enabled by default

Source code

//
// Integrates canvas and osg scene visualizers into a single module.
//
// @see ~SceneCanvasVisualizer, ~SceneOsgVisualizer, ~SceneVisualizerBase, ~ISceneVisualizer
//
module SceneVisualizer like ISceneVisualizer
{
    parameters:
        @display("i=block/app");
        string visualizationTargetModule = default("^");
        string visualizationSubjectModule = default("^");
        *.visualizationTargetModule = default(absPath(this.visualizationTargetModule));
        *.visualizationSubjectModule = default(absPath(this.visualizationSubjectModule));
    submodules:
        canvasVisualizer: <default(firstAvailableOrEmpty("SceneCanvasVisualizer"))> like ISceneVisualizer if typename != "" {
            parameters:
                @display("p=100,100");
        }
        osgVisualizer: <default(firstAvailableOrEmpty("SceneOsgVisualizer"))> like ISceneVisualizer if typename != "" {
            parameters:
                @display("p=100,200");
        }
}

File: src/inet/visualizer/common/SceneVisualizer.ned