Description | Example | Return Message | Group

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:

With the Window3D command the user can also control these advanced options:

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.

Note: If the application is minimized this command will Nack.

Note: * This option is only available when running STK Desktop.

Remove [WindowID <WinNumber>] Removes a 3D Graphics window.

Note: * 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.

Note: 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).

Note: * 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.

Note: * 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.

Note: * 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.

Note: * 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.

Note: 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.

Note: * 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.

Note: * 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.

Note: * This option is only available when running STK Desktop.

SetFrame {Normal | Minimal | None} [WindowID <WinNumber>]
  • Normal. 3D Graphics window displays with a title bar and border.
  • Minimal. 3D Graphics window hides the title bar and changes the border to a re-sizing border.
  • None. 3D Graphics window hides the title bar and border for seamless graphics integration into other applications.

Note: If the application is full-screen, just the title bar will be shown or hidden.

Note: * 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.

Note: * 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.

Note: "<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:
  • Edit. Turns on object edit mode for an object. You must include Path <TruncObjectPath>.
  • EditApply. Saves changes but leaves the object in edit mode.
  • EditOK. Saves changes and turns off edit mode
  • EditCancel. Turns off edit mode without saving changes.
InpDevMode Mode {RubberBandAsyncPick | RubberBandViewLLA} [WindowID <WinNumber>] Specify one of the following:
  • RubberBandAsyncPick. This option allows you to set the input device mode when async3dpick is enabled such that you can drag out a rubberband box and return the names of objects inside the dragged box through the connect socket. The output format will depend on the asyn3dpick mode you are in. This option allows you to drag out the rubberband box once and then puts you back into normal async3dpick mode.
  • Note: This is only valid when async mode and async3dpicking is enabled. (See ConControl and Async3dPick commands.)

  • RubberBandViewLLA. Sets the input mode to enable you to drag a rubberband box, and have STK zoom into that area on a 3D Graphics window. This option allows you to drag out the rubberband box once and then puts you back in a normal pick mode.
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.
  • RBLineWidth <LineWidth> - specify the line width for the rubberband box. <LineWidth> is a value between 1.0 and 10.0.
  • RBColor {Color} - Color can be entered by name, index, rgb or hex value, for valid {Color} options see Common Options.
  • RBCrosshairSize <Size> - specify the pixel size of the crosshair in the rubberband box, <Size> must be greater than 0
  • WindowID <WinNumber>
InpDevMode Mode {Pick | AsyncPick | LastPickMode | ViewLatLonAlt | PanLLA} [WindowID <WinNumber>] Specify one of the following:
  • Pick. Sets the 3D pick mode to normal picking.
  • AsyncPick. This pick mode enables you to double-click an object or central body in a 3D Graphics window to return the path or position of that object.
  • LastPickMode. Returns the 3D pick mode to the previously used pick mode.
  • ViewLatLonAlt. This pick mode enables you to double-click with the Shift key depressed on a position on the globe to set the View To/From to LatLonAlt for that position.
  • PanLLA. Enables you to "grab" the central body to move it to the desired view position using Shift-Left Mouse Button. Set Mode to ViewLatLonAlt to turn this option off.
InpDevMode Mode {GreasePencil | GreasePencilOK} [WindowID <WinNumber>] Specify one of the following:
  • GreasePencil to enable Grease Pencil mode.
  • GreasePencilOK to disable Grease Pencil mode.

See Grease Pencil 3D Editing 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.
  • Color {Color}
  • PointScale <Value>
  • AxisScale <Value>
  • LineWidth <Value>
  • LineStyle {LineStyle}
  • NegativeAltitude {Yes | No}
  • Droplines {Yes | No}

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} Sets offscreen rendering method for all new windows. Enter PBuffer to turn on offscreen rendering, and enter OpenGL to turn off offscreen rendering.

Note: * This option is only available when running STK Desktop.

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 the user 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

The Window3D Cursor and Window3D Joystick commands allow the user to enable and disable their use. These are described in the table below:

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

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 in meters. 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 in meters. Valid range is greater than the value for NearPlane. <Value> is entered in Connect distance units.

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.

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

Note: If you attempt to set Stereo mode and your video card does not accept this mode, the command will Nack.

EyeSeperationFactor <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.
AutoSteroEnable {On | Off} If On then the projection distance is ignored and the value is computed from the distance between From and To objects in the window.

Example

To create a new 3D graphics window:

Window3D * CreateWindow Type Normal

To create an attitude view window for Satellite1 and title the window:

Window3D * CreateWindow Type Attitude Path Satellite/Satellite1 Title "Satellite1 Att View"

To place 3D Graphics window #2 at x: 200, y: 200:

Window3D * Place 200 200 WindowID 2

To change the size of the first 3D Graphics window:

Window3D * Size 640 400

To remove the 3D window with an ID of 2:

Window3d * Remove WindowID 2

To set the edit controls to be red, with line width of 3 and point scale of 5:

Window3d * EditData LineWidth 3.0 PointScale 5.0 Color #ff0000

To turn on object editing for Facility1, in window 2:

Window3d * InpDevMode Mode Edit Path Facility/Facility1 WindowID 2

To apply editing for current object, and turn off edit mode:

Window3d * InpDevMode Mode EditOK

To set input mode to allow a rubberband box to be dragged on the 3D window:

Window3d * InpDevMode Mode RubberBandViewLLA

To set the RubberBand box in Window 2 to have a line width of 2 and crosshair size of 24 pixels:

Window3D * InpDevMode RBLineWidth 2 RBCrosshairSize 24 WindowID 2

To set the offscreen rendering method for the first 3d window to use a pixel buffer:

Window3d * SetRenderMethod Method PBuffer

To enable the cursor for 3D window 2:

Window3d * Cursor Enable On WindowID 2

To enable the joystick for the first 3D window:

Window3d * Joystick Enable On

To set view volume to have a minimum visible distance of 1000.0 meters and maximum visible distance of 10000000 meters:

Window3d * ViewVolume MinVisibleDist 1000.0 MaxVisibleDist 10000000.0

To enable depth cone crossover with a crossover altitude of 100 for the first 3D Window:

Window3d * DepthConeCrossover Enable On Altitude 100.0 WindowID 1

To set the display mode to Stereo, and specify an eye separation distance and projection distance (setting AutoStereoEnable to off allows the projection distance to be used):

Window3D * DisplayMode Mode Stereo EyeSeperationFactor 0.10 ProjectionDistance 145 AutoStereoEnable Off

Use the following commands to set up an asynchronous rubberband pick:

Async3DPick * On Advanced

Window3d * InpDevMode Mode RubberBandAsyncPick

ReturnMessage

Group Membership

This command belongs to the following group(s):

VO

VO Window

Version

11

STK Programming Interface 11.0.1