SceneOsgVisualizerBase¶
Package: inet.visualizer.osg.base
simple module SceneOsgVisualizerBase
Base module for scene visualizer simple modules on a 3D osg scene. It displays the scene either as a filled rectangle or as an image.
See also: SceneOsgVisualizer, SceneOsgEarthVisualizer, SceneVisualizerBase
Inheritance diagram¶
Known subclasses¶
Name |
Type |
Description |
|---|---|---|
simple module |
Visualizes the scene using |
|
simple module |
Visualizes the scene using osg. It displays the scene and the coordinate system axes. It sets the initial viewpoint of the 3D scene based on the bounding sphere of all network nodes. The viewpoint is located opposite to the coordinate system origin with respect to the sphere, and it faces towards the center of the sphere. |
Extends¶
Name |
Type |
Description |
|---|---|---|
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 |
cameraManipulator |
string |
“auto” |
Type of camera manipulator |
cameraDistanceFactor |
double |
5 |
Camera distance relative to the network bounding sphere radius |
zNear |
double |
1m |
Near distance for Z buffer optimization |
zFar |
double |
100000m |
Far distance for Z buffer optimization |
fieldOfView |
double |
30deg |
Camera field of view |
clearColor |
string |
“” |
Scene background color, not set by default |
displayScene |
bool |
true |
Display the scene, enabled by default |
sceneColor |
string |
“#A0E0A0” |
Scene solid color if scene texture is not provided, gray by default |
sceneOpacity |
double |
1.0 |
Scene opacity, opaque by default (not recommended to change) |
sceneImage |
string |
“” |
Scene texture (repeated), no image by default |
sceneImageSize |
double |
1m |
Scene texture size |
sceneShading |
bool |
true |
Exponential shading for scene color, enabled by default |
Properties¶
Name |
Value |
Description |
|---|---|---|
class |
SceneOsgVisualizerBase |
|
display |
i=block/app |
Source code¶
//
// Base module for scene visualizer simple modules on a 3D osg scene.
// It displays the scene either as a filled rectangle or as an image.
//
// @see ~SceneOsgVisualizer, ~SceneOsgEarthVisualizer, ~SceneVisualizerBase
//
simple SceneOsgVisualizerBase extends SceneVisualizerBase
{
parameters:
string cameraManipulator @enum("auto","trackball","overview","terrain","earth") = default("auto"); // Type of camera manipulator
double cameraDistanceFactor = default(5); // Camera distance relative to the network bounding sphere radius
double zNear @unit(m) = default(1m); // Near distance for Z buffer optimization
double zFar @unit(m) = default(100000m); // Far distance for Z buffer optimization
double fieldOfView @unit(deg) = default(30deg); // Camera field of view
string clearColor = default(""); // Scene background color, not set by default
bool displayScene = default(true); // Display the scene, enabled by default
string sceneColor = default("#A0E0A0"); // Scene solid color if scene texture is not provided, gray by default
double sceneOpacity = default(1.0); // Scene opacity, opaque by default (not recommended to change)
string sceneImage = default(""); // Scene texture (repeated), no image by default
double sceneImageSize @unit(m) = default(1m); // Scene texture size
bool sceneShading = default(true); // Exponential shading for scene color, enabled by default
@class(SceneOsgVisualizerBase);
}
File: src/inet/visualizer/osg/base/SceneOsgVisualizerBase.ned