3D Window

3D window plays the role of a placeholder for 3D animation. It defines the area on the presentation diagram where 3D animation will be shown at runtime. If you want 3D animation to be displayed for your agent, you must add 3D window onto its diagram. 

There can be several 3D windows on one diagram, each one displaying a particular part of the common 3D scene (analogous to several displays on operator's console showing different views shot by different cameras).

You can configure your 3D window to display a certain part of the 3D scene by default by choosing a camera that will shoot the window's content. Just direct your camera in the graphical editor at the shapes that you want to see in 3D window on model startup. This option is exceptionally useful since it is easier to position a camera once rather than navigating to the required part of 3D scene every time a model is launched.

 To add a 3D window onto a diagram of agent
  1. Drag the  3D Window  element from the 3D section of the  Presentation palette to the graphical editor.
  2. Grey area will appear in the graphical editor. 
  1. Navigate to the Properties view. 
  2. If you want a particular part of the presentation to appear in this 3D window on model startup, set up a camera that will "shoot" picture to be displayed in this 3D window. To enable this, first add camera onto the diagram as described here, then type the name of this camera in the Camera field.  
  3. If you plan to move your camera at model runtime, and you want your 3D window to follow the camera and show the picture that currently gets into its focus, choose the option Follow Camera.
  4. Navigate to the Scene section of the window's properties. Here you can change the background color of the 3D animation scene (using the Background color control), as well as turn on the grid for 3D window (and optionally change its color). The grid is usually turned on to indicate the Z=0 plane at model runtime. By default the grid is turned off (No color is chosen in the Grid color control).
    Note: Changing grid and background color settings affects not only this particular 3D window, but all 3D windows of this agent type, since all of them share common 3D animation scene. 

Properties

General

Name – The name of the window. It is used to identify and access the element from code.

Ignore – If selected, the window will be excluded from the model.

Camera – Here you can select a camera that will "shoot" pictures for this window, i.e. you define, the part of the presentation that will get into this window. 

Follow camera – [Disabled if Camera is Not specified] Here you can choose whether this window should follow the camera while it is moving at the model runtime. If the option is selected, the window will always show the picture that is getting into the moving focus of the camera.

Navigation type – Here you can choose the navigation type that defines the freedom level of camera manipulation via mouse.

Full - Navigation is fully allowed. This navigation type works only when the window does not follow a camera
Limited to Z above 0 - Navigation is only allowed above Z=0 plane. This navigation type works only when the window does not follow a camera.
Rotation only - The navigation mode in which the user is able to rotate the window only. It can be used when the window follows a camera.
None - Navigation is prohibited. It is the default navigation type. The window follows a camera.
Scene

Properties on the Scene page are applied to the whole 3D animation scene (and not to this particular 3D window only) that is common for all 3D windows of this agent. Therefore, if you set the grid to be shown for a 3D window, turn the grid on for all other 3D windows of the same agent type.

Grid color – Grid color of the 3D animation scene. The grid is turned off by default (No color is chosen).

Background color – Background color of the 3D animation scene.

Position and size

X – The x-coordinate of the window's upper left corner.

Y – The y-coordinate of the window's upper left corner.

Width – The width of the window (in pixels). 

Height – The height of the window (in pixels).

Advanced

Create view area at runtime – If selected, a view area containing this 3D window will be automatically created to enable easy navigation to/from this 3D window at model runtime. This view area will not be visible at design time, you will be able only to navigate to it using common navigation tools. The view area will have the name of the corresponding 3D window defined as its title.

Show name – If selected, the name of the window will be displayed on the presentation diagram.

Far clipping distance - The distance (in pixels) that regulates the visibility depth of the 3D animation scene (i.e., the distance from the camera at which the scene can be seen). The part of the 3D scene that is located beyond the far clipping distance will not be visible. Refer to the Far clipping distance section for details.

Navigation modes

At model runtime, you can navigate through 3D animation scene displayed in the 3D window using the commands that are described here. AnyLogic supports several navigation modes providing various freedom levels of camera manipulation when using the mouse:

Related topics

 3D animation

 Creating 3D animation

 API Reference: ShapeWindow3D Class