Window3D
Create or remove a 3D Graphics window, enable zooming, edit objects, set render methods, set 3D pick modes, or drill-down to hidden objects in the 3D Graphics window *
Syntax
Window3D <ScenarioPath> {Window3dOptions}
Related commands
Description
The Window3D command allows you to:
- Create a new 3D Graphics window, using the default 3D Graphics window properties.
- Set render methods.
- Set 3D pick modes.
- Enable or disable Grease Pencil mode.
- Remove an existing 3D Graphics window.
- Edit area targets, facilities, places and great arc vehicles in the 3D Graphics window.
- Zoom into a portion of the globe.
- Drill-down to hidden objects in the 3D Graphics window.
With the Window3D command you can also control these advanced options:
- Enable and disable the cursor.
- Control the joystick.
- Control view volume.
- Enable or disable, and set parameters for, depth cone crossover.
- Set display mode parameters.
- Add a pop-up balloon with user information.
- Enable or disable atmosphere and set fog density.
- Apply post-process color correction filters.
Where applicable (see table below), include the WindowID <WinNumber> parameter to specify a 3D Graphics window. If WindowID <WinNumber> is not included then the command will effect the first 3D Graphics window.
{Window3dOption} | Description |
---|---|
CreateWindow Type {Normal | Attitude} [Path <TruncObjectPath>] [Title "<WindowTitle>"] | Creates a new 3D Graphics window or a new Attitude View window. You can specify a Path for an Attitude window only, <TruncObjectPath> is a vehicle truncated path. You can specify the window title for any type of window.
If the application is minimized this command will Nack. * This option is only available when running STK Desktop. |
Remove [WindowID <WinNumber>] | Removes a 3D Graphics window.
* This option is only available when running STK Desktop. |
Place <X> <Y> [WindowID <WinNumber>] | Indicates X,Y position of 3D Graphics window on the screen, where 0,0 is in the upper left corner of the screen. This command will move the 3D Graphics window to the new location and activate the map window.
If your monitor configuration includes multiple monitors, use negative values in the Place command to move the window to the left or upper monitor(s). * This option is only available when running STK Desktop. |
Size <Width> <Height> [WindowID <WinNumber>] | <Width> and <Height> indicates the new size of the 3D Graphics window. This command will resize the 3D Graphics window and activate the map window.
* This option is only available when running STK Desktop. |
InnerSize <Width> <Height> [WindowID <WinNumber>] | <Width> and <Height> indicates the new size of the 3D Graphics window, discounting the borders and frame. This command will resize the 3D Graphics window and activate the map window.
* This option is only available when running STK Desktop. |
Iconify [WindowID <WinNumber>] | This option is only applicable to integrated windows and the window will be iconified in the workarea. If the window is floating or docked then the command is ignored.
* This option is only available when running STK Desktop. |
Raise [WindowID <WinNumber>] | This command restores the 3D Graphics window to the foreground and activates the map window.
If another program has the focus it may not allow the application to be shown, but the taskbar buttons will flash. This is a function of Windows2000 and above. * This option is only available when running STK Desktop. |
Minimize [WindowID <WinNumber>] | This option is only applicable to integrated windows and the window will be minimized in the workarea. If the window is floating or docked then the command is ignored.
* This option is only available when running STK Desktop. |
Maximize [WindowID <WinNumber>] | This option is only applicable to integrated windows and the window will be maximized in the workarea. If the window is floating or docked then the command is ignored.
* This option is only available when running STK Desktop. |
SetFrame {Normal | Minimal | None} [WindowID <WinNumber>] |
If the application is full-screen, just the title bar will be shown or hidden. * This option is only available when running STK Desktop. |
SetTitle "<New Title>" [WindowID <WinNumber>] | Change the title of a 3D Graphics window to "<New Title>", and activate the 3D Graphics window.
* This option is only available when running STK Desktop. |
Toolbar {Hide | Show} "<ToolbarName>" | Hide or show the specified toolbar in the 3D Graphics window.
Specify the name of a toolbar that is valid for the selected 3D graphics window. If an invalid toolbar name is entered a message will appear in the Message Viewer. "<ToolbarName>" is case-sensitive. |
Dock {Top | Bottom | Left | Right} [WindowID <WinNumber>] | Dock the window to the main application. |
Integrate [WindowID <WinNumber>] | Integrate the window into the main application. |
Float [WindowID <WinNumber>] | Float the window. |
InpDevMode Mode {Edit | EditApply | EditCancel | EditOK} [Path <TruncObjectPath>] [WindowID <WinNumber>] | Controls object editing. Specify one of the following:
|
InpDevMode Mode {RubberBandAsyncPick | RubberBandViewLLA} [WindowID <WinNumber>] | Specify one of the following:
This is only valid when async mode and async3dpicking is enabled. (See ConControl and Async3dPick commands.) |
InpDevMode {RBLineWidth <LineWidth> [|] RBColor {Color} [|] RBCrosshairSize <Size> [|] WindowID <WinNumber>} | Specify the appearance of a rubberband box. Any or all parameters can be included on one command line.
|
InpDevMode Mode {Pick | AsyncPick | LastPickMode | ViewLatLonAlt | PanLLA} [WindowID <WinNumber>] | Specify one of the following:
|
InpDevMode Mode {GreasePencil | GreasePencilOK} [WindowID <WinNumber>] | Specify one of the following:
See Grease Pencil 3D Editing Tool in STK Help for more information on using this mode. |
InpDevMode Mode {Measure | MeasureOK} [WindowID <WinNumber>] | Specify one of the following:
Use this tool to measure simple great arc range and bearing on the 3D globe. See 3D Measure tool in STK Help for more information on using this mode. |
EditData {Options} | Defines the appearance of the edit controls that appear when Object Editing is turned on (see InpDevMode Mode Edit). Any or all options can be entered on the command line.
For valid {Color} and {LineStyle} options see Common Options. LineWidth <Value> is a number between 1.0 and 10.0 |
PickHitMode Mode {<ClosestPickHit> | <DrillPickHit>} [WindowID <WinNumber>] | Enables you to drill-down to objects that are covered by other objects in the 3D Graphics window. For example, if facility1 covers facility2 and facility2 covers facility3, the first double-click selects facility1, the second selects facility2, and the third selects facility3. The fourth double-click returns you to facility1. |
SetRenderMethod Method {OpenGL | PBuffer} [WindowID <WinNumber>] | Enter PBuffer to turn on offscreen rendering and set it to use a pixel buffer (PBuffer). Enter OpenGL to turn off offscreen rendering. |
SetNewWindowRenderMethod Method {OpenGL | PBuffer} | This option has been deprecated in STK 11.2. This option will be maintained for backward compatibility only, and it will now have no effect. Sets offscreen rendering method for all new windows. Enter PBuffer to turn on offscreen rendering, and enter OpenGL to turn off offscreen rendering. |
PolygonMode Mode {Fill | Line} [WindowID <WinNumber>] | Specify whether to display all polygons as wire-frames (line). |
InpDevMode ModeID "PLLA" ModeAction {Start | End} [WindowID <WinNumber>] | Using this command with the Start option, places the 3D window in lat/lon/alt view mode, and allows you to grab the central body to move it to the desired view position. To grab and rotate the Central Body, use Shift-Left Mouse Button. Once the desired view position is obtained, use the End option to turn off this mode. |
Advanced Options - Cursor and Joystick
The Window3D Cursor and Window3D Joystick commands allow you to enable and disable their use. These are described in the table:
{AdvancedOption} | Description |
---|---|
Cursor Enable {On | Off} [WindowID <WinNumber>] | Enable or disable the cursor for the 3D window. |
Joystick Enable {On | Off} [WindowID <WinNumber>] | Enable or disable the joystick for the 3D window. If enable is set to On then a joystick can be used along with the mouse. This command will Nack if a joystick is not connected. |
Advanced Options - ViewVolume
The following table describes the options for the Window3D ViewVolume command, used to set ViewVolume parameters.
Format for this command is:
Window3D <ScenarioPath> ViewVolume ({ViewVolumeOptions} ...) [WindowID <WinNumber>]
{ViewVolumeOptions} | Description |
---|---|
FarNearRatio <Value> | The <Value> is a ratio that determines the visual quality in the viewing volume. Lower values increase visual quality. Valid value is greater than or equal to 1.1. The default value is 1000, and it is recommended that this value not be changed. |
FieldOfView <Value> | The <Value> is a floating-point number that is the view angle, entered in degrees. Valid range is 0.1 to 160.0. |
MinVisibleDist <Value> | The <Value> defines the minimum viewing distance. Valid value is greater than 0.01 meters and less than the value for FarPlane. <Value> is entered in Connect distance units. |
MaxVisibleDist <Value> | The <Value> defines the maximum viewing distance. Valid range is greater than the value for NearPlane. <Value> is entered in Connect distance units. |
Advanced Options - DepthConeCrossover
The following table describes the options for the Window3D DepthConeCrossover command, used to set depth cone crossover parameters.
Format for this command is:
Window3D <ScenarioPath> DepthConeCrossover ({DepthConeOptions} ...) [WindowID <WinNumber>]
{DepthConeOptions} | Description |
---|---|
Enable {On | Off} | It enable is On then the depth cone is used for viewing from above the crossover altitude and depth buffer is used for viewing below the crossover altitude. If enable is Off then only the depth cone is used. |
Altitude <Value> | The <Value> is the crossover altitude that the depth cone uses. Valid value is greater or equal to 0.0, and the value is entered in meters. |
Advanced Options - DisplayMode
The following table describes the options for the Window3D DisplayMode command, used to set display mode parameters.
Format for this command is:
Window3D <ScenarioPath> DisplayMode ({DisplayModeOptions} ...) [WindowID <WinNumber>]
{DisplayModeOptions} | Description |
---|---|
Mode {Mono | Stereo | RedBlueStereo | SideBySideStereo | LeftEye | RightEye} | If the value is set to Stereo then the scene is rendered using a stereo view.
If RedBlueStereo is set this enables you to view 3D animations with red/blue 3D glasses. If SideBySideStereo is set then the left eye and right eye images are rendered individually beside each other in the same window. If LeftEye is set then the scene is rendered from the perspective of the left eye. If RightEye is set then the scene is rendered from the perspective of the right eye. If you attempt to set Stereo mode and your video card does not accept this mode, the command will Nack. |
EyeSeparationFactor <Value> | The default eye separation factor is 0.02. Increasing this number will increase the overall left/right eye separation, which makes the image appear to have more depth. Valid value is between 0.0 and 1.0. |
ProjectionDistance <Value> | The <Value> is the projection distance for the left and right eyes. Valid value is greater than 0.0. |
StereoProjectionMode {FixedDistance | Automatic | Parallel} | Sets the type of projection used for the left and right eyes.
FixedDistance uses the value set for ProjectionDistance. Objects at this distance will appear to have no depth. Objects further than this distance will appear to go into the screen. Objects nearer than this distance will appear to pop out of the screen Automatic mode ignores the value set for ProjectionDistance and automatically calculates the projection distance based on the distance between From and To objects in the window. Parallel mode ignores the value set for ProjectionDistance and instead uses a parallel projection for each eye. In this mode all objects appear to go into the screen. Head mounted stereographic systems typically require a parallel projection. This option replaces the AutoStereoEnable option. |
VirtualRealityDevice "<DeviceName>" | Attaches a Virtual Reality device to the 3D window. This command overrides all other settings specified with the Windows3D DisplayMode command. To disconnect a VR device from a 3D window, use the Windows3D DisplayMode command to set any display mode other than VirtualRealityDevice. Use the optional WindowID <WinNumber> to specify the 3D window to attach to. A list of available VR devices can be obtained with the VO_R AvailableVrDevices command. |
Advanced Options - Balloon
The following table describes the options for the Window3D Balloon command, with which a pop-up balloon, containing user defined text, can be added to the 3D Window.
Format for this command is:
Window3D <ScenarioPath> Balloon ({BalloonOptions} ...) [WindowID <WinNumber>]
{BalloonOptions} | Description |
---|---|
Show {On | Off} | Turn on or off the display of the balloon. |
Text "<String>" | Specify the text in the balloon.
The Text option can be included multiple times in the command for multi-line text. |
TextColor {Color} | Set the text color. For valid {Color} options see Common Options. |
BackColor {Color} | Set the background color. For valid {Color} options see Common Options. |
LLA <Latitude> <Longitude> <Altitude> | Set the position of the balloon. <Latitude> and <Longitude> are entered in degrees. <Altitude> is entered in Connect distance units. |
SystemDef "<System>" <X> <Y> <Z> | Set the offset of the balloon from a VGT system. <X>, <Y>, and <Z> are entered in Connect distance units. |
Advanced Options - Atmosphere
The following table describes the options for the Window3D Atmosphere command, used to control atmosphere visibility and fog density.
Format for this command is:
Window3D <ScenarioPath> Atmosphere {AtmosOption} [WindowID <WinNumber>]
{AtmosOption} | Description |
---|---|
Enable {On | Off} | Show or hide atmosphere on the 3D Graphics Window. The default is On. |
FogDensity <Value> | Enter a real number between 0.0 and 1.0. The default is 0.0. |
Advanced Options - ColorCorrection
The following table describes the options for the Window3D ColorCorrection command, used to control brightness, contrast, and gamma correction post-processing effects.
Format for this command is:
Window3D <ScenarioPath> ColorCorrection {ColorCorrOption} [WindowID <WinNumber>]
{ColorCorrOption} | Description |
---|---|
Brightness <Value>} | Controls the overall brightness of the 3D Graphics Window. Enter an integer between -127 and 127. The default is 0. |
Contrast <Value> | Controls the contrast on the 3D Graphics Window, the difference between the darkest and lightest points. Enter an integer between -127 and 127. The default is 0. |
Gamma <Value> | Controls the luminance on the 3D Graphics Window, which can be used to adjust how it is viewed on different monitors. Enter real number between 0 and 16. The default is 1.0. |
Examples
To create a new 3D graphics window:
To create an attitude view window for Satellite1 and title the window:
To place 3D Graphics window #2 at x: 200, y: 200:
To change the size of the first 3D Graphics window:
To remove the 3D window with an ID of 2:
To set the edit controls to be red, with line width of 3 and point scale of 5:
To turn on object editing for Facility1, in window 2:
To apply editing for current object, and turn off edit mode:
To set input mode to allow a rubberband box to be dragged on the 3D window:
To set the RubberBand box in Window 2 to have a line width of 2 and crosshair size of 24 pixels:
To set the offscreen rendering method for the first 3d window to use a pixel buffer:
Examples
To enable the cursor for 3D window 2:
To enable the joystick for the first 3D window:
To set view volume to have a minimum visible distance of 1000.0 meters and maximum visible distance of 10000000 meters:
To enable depth cone crossover with a crossover altitude of 100 for the first 3D Window:
To set the display mode to Stereo, and specify an eye separation distance and projection distance:
Use the following commands to set up an asynchronous rubberband pick:
Add a balloon pop-up to 3D window 2:
Add a multi-line balloon pop-up, that is offset from Satellite1's Body system, then set the colors of the balloon:
To turn on the display of Atmosphere and then set the fog density:
To adjust the brightness and contrast on the 3D graphics window:
To adjust the gamma correction to the optimal value for non-gamma corrected monitors:
To attach the "Oculus Rift" device to 3D window 1:
Return message
Group membership
This command belongs to the following group(s):
Version
11.3