Package com.anylogic.engine.presentation
          
          
- java.lang.Object
- com.anylogic.engine.presentation.Shape
- com.anylogic.engine.presentation.ShapeControl
- com.anylogic.engine.presentation.ShapeWindow3D
- All Implemented Interfaces:
- com.anylogic.engine.internal.Child,- Locatable2D,- AggregatableAnimationElement,- HasLevel,- LevelElement,- SVGElement,- UsdElement,- Serializable,- Cloneable
public class ShapeWindow3D extends ShapeControl
The window showing 3D world on the model animation.
This is a shape like any control which is located on the model animation canvas. It draws the 3D scene from the field of view of selected camera.
3D window has custom context popup menu with additional items:
Window has several navigation modes:
This is a shape like any control which is located on the model animation canvas. It draws the 3D scene from the field of view of selected camera.
3D window has custom context popup menu with additional items:
- "Copy camera" - copies current view as camera setting to be pasted in the AnyLogic (at design-time) in the "General" properties page of any 3D camera of the model.
- "Camera" submenu - allows navigation to any camera defined on the current agent.
Window has several navigation modes:
- NAVIGATION_FULL- works only when the window isn't linked with camera
- NAVIGATION_LIMITED_TO_Z_ABOVE_ZERO- works only when the window isn't linked with camera
- NAVIGATION_ROTATION_ONLY
- NAVIGATION_NONE
- Author:
- AnyLogic North America, LLC https://anylogic.com
- See Also:
- Serialized Form
| Modifier and Type | Field | Description | 
|---|---|---|
| static final Navigation3DType | NAVIGATION_FULL | Navigation is fully allowed | 
| static final Navigation3DType | NAVIGATION_LIMITED_TO_Z_ABOVE_ZERO | Navigation is only allowed above Z=0 plane | 
| static final Navigation3DType | NAVIGATION_NONE | Navigation is prohibited. Default when window is linked with camera. | 
| static final Navigation3DType | NAVIGATION_ROTATION_ONLY | Navigation mode where user is able to rotate view only. Can be used when window is linked with camera. | 
| Constructor | Description | 
|---|---|
| ShapeWindow3D | Creates a (persistent) 3d scene window control. | 
| Modifier and Type | Method | Description | 
|---|---|---|
| Camera3D | createCamera() | Returns new instance of  Camera3Dhaving the most recent camera parameters set in setCamera functions.Due to technical reasons, this function doesn't reflect current position of the animation GUI navigation. | 
| void | executeAction() | This method is internal and shouldn't be called by user. it may be removed/renamed in future. | 
| double | getFarClippingDistance() | Returns the "far-clipping" distance, which controls how much of the scene is shown (how far in depth is it visible) | 
| com.anylogic.engine.internal.presentation.ISVGComponent | getSVGComponent() | |
| void | setCamera | Sets the 3D Window to the given camera (and doesn't follow
 the camera) | 
| void | setCamera | Sets the 3D Window to the given camera and optionally starts following it. | 
| void | setCamera | Sets the 3D Window to the given camera and optionally starts following it. | 
| void | setNavigationMode | Sets the navigation mode (the freedom level of camera manipulation
 using mouse). | 
| SVGElement | updateSVGProperties | This method is internal and shouldn't be called by user. it may be removed/renamed in future. Updates SVG properties of the element that are then sent to the rendering client. | 
action, clone, contains, getCenter, getHeight, getPresentable, getWidth, isEnabled, postSVGShapeSpecificAttributes, randomPointInside, restoreOwner, setEnabled, setHeight, setValueToDefault, setWidthcanHandleClick, executeUserAction, findSVGElement, getDrawMode, getGroup, getGroupOrOwner, getInspect, getLevel, getName, getOrGenerateUSDId, getRotation, getScaleX, getScaleY, getSVGId, getUsdVersion, getX, getY, isJava2DSwingPresentation, isOnly3D, isPublic_xjal, isSVGPresentation, isVisible, isVisibleCurrently, onAggregatorVisibilityChanged, onClick, randomPointInside, removeSVGFromOwner, removeSVGImage, resetSVGState, setChangedUsdVersion, setInspect, setLevel, setNextChangedUsdVersion, setPos, setPos, setPublic_xjal, setRotation, setScale, setScale, setScaleX, setScaleY, setVisible, setX, setY, updateDynamicProperties, updateDynamicPropertiesStructuralpublic static final Navigation3DType NAVIGATION_NONE
Navigation is prohibited.
Default when window is linked with camera.
Default when window is linked with camera.
public static final Navigation3DType NAVIGATION_FULL
Navigation is fully allowed
public static final Navigation3DType NAVIGATION_LIMITED_TO_Z_ABOVE_ZERO
Navigation is only allowed above Z=0 plane
public static final Navigation3DType NAVIGATION_ROTATION_ONLY
Navigation mode where user is able to rotate view only.
Can be used when window is linked with camera.
Can be used when window is linked with camera.
@AnyLogicInternalAPI public double getFarClippingDistance()
Returns the "far-clipping" distance, which controls how much of the scene is shown (how far in depth is it visible)
public void setCamera(Camera3D camera) 
Sets the 3D Window to the given camera (and doesn't follow
 the camera)
- Parameters:
- camera- the camera for the 3D Window
public void setCamera(Camera3D camera, boolean follow) 
Sets the 3D Window to the given camera and optionally starts following it.
- Parameters:
- camera- the camera for the 3D Window
- follow- if- truethis window will track camera movements. 'Follow' mode supports only 2 navigation modes:- NAVIGATION_NONEand- NAVIGATION_ROTATION_ONLY. If navigation mode is not supported, it will be set to- NAVIGATION_NONE
public void setCamera(Camera3D camera, boolean follow, long transitionTimeout) 
Sets the 3D Window to the given camera and optionally starts following it.
- Parameters:
- camera- the camera for the 3D Window
- follow- if- truethis window will track camera movements. 'Follow' mode supports only 2 navigation modes:- NAVIGATION_NONEand- NAVIGATION_ROTATION_ONLY. If navigation mode is not supported, it will be set to- NAVIGATION_NONE
- transitionTimeout- if non-zero, then the current camera position and orientation will evolve to the given- cameraduring the given timeout of real milliseconds (i.e. not model-time units)
@AnyLogicInternalAPI public SVGElement updateSVGProperties(List<SVGCommand> output, ShapeDrawMode drawMode, boolean publicOnly, SVGElement owner, SVGElement elbehind, boolean isInReplicatedShape) 
Description copied from interface: 
SVGElementThis method is internal and shouldn't be called by user.
it may be removed/renamed in future.
Updates SVG properties of the element that are then sent to the rendering client. If the element is not yet in the SVG scene, generates "C" command, if it is there, but some properties are out of date, generates "U" command. If SVG drawing of this element is not needed because of public only settings, or permanently not needed, or not supported yet, returns false and does nothing.
it may be removed/renamed in future.
Updates SVG properties of the element that are then sent to the rendering client. If the element is not yet in the SVG scene, generates "C" command, if it is there, but some properties are out of date, generates "U" command. If SVG drawing of this element is not needed because of public only settings, or permanently not needed, or not supported yet, returns false and does nothing.
- Specified by:
- updateSVGPropertiesin interface- SVGElement
- Overrides:
- updateSVGPropertiesin class- Shape
- Parameters:
- output- the list of commands to add to
- drawMode- TODO
- publicOnly- drawing context: if true, only shapes that are marked as public only are updated
- owner- the SVG element that serves as a container for this element
- elbehind- the SVG element behind this one, or null if none or if order is irrelevant
- Returns:
- the actual owner this element has been added to or nullif element is not drawn (e.g. drawing of this element is not needed because of public only settings, permanently not needed or not supported - hence SVG id is not set). The actual owner may differ from the givenownerwhen the svg element is added to a different place (e.g. GIS map).
@AnyLogicLegacyAPI public Camera3D createCamera()
Returns new instance of 
Due to technical reasons, this function doesn't reflect current position of the animation GUI navigation.
Camera3D having the most recent camera parameters set in setCamera functions.Due to technical reasons, this function doesn't reflect current position of the animation GUI navigation.
- Returns:
- new instance on each call
@AnyLogicInternalAPI public void executeAction()
Description copied from class: 
ShapeControlThis method is internal and shouldn't be called by user.
it may be removed/renamed in future.
it may be removed/renamed in future.
- Overrides:
- executeActionin class- ShapeControl
@AnyLogicInternalAPI public com.anylogic.engine.internal.presentation.ISVGComponent getSVGComponent()
- Specified by:
- getSVGComponentin interface- SVGElement
- Overrides:
- getSVGComponentin class- ShapeControl