Package com.anylogic.engine.presentation
- Field Summary
- Constructor Summary
- Method Summary
- Methods inherited from class com.anylogic.engine.presentation.Shape3D
- Methods inherited from class com.anylogic.engine.presentation.Shape
- Methods inherited from class java.lang.Object
- Methods inherited from interface com.anylogic.engine.markup.AggregatableAnimationElement
- Methods inherited from interface com.anylogic.engine.Locatable2D
- Constructor Details
- Method Details
- java.lang.Object
- com.anylogic.engine.presentation.Shape
- com.anylogic.engine.presentation.Shape3D
- com.anylogic.engine.presentation.ShapeEmbeddedObjectPresentation
- All Implemented Interfaces:
com.anylogic.engine.internal.Child
,Locatable2D
,Locatable3D
,AggregatableAnimationElement
,HasLevel
,LevelElement
,SVGElement
,UsdElement
,Serializable
,Cloneable
public class ShapeEmbeddedObjectPresentation extends Shape3D
Persistent presentation of Embedded Object shape. Contains a single shape -
top-level presentation group of embedded object. May not be replicated. The
user can add, remove and change shapes in the group dynamically.
Shapes contained in a group have reference to that group.
Shapes contained in a group have reference to that group.
- Author:
- AnyLogic North America, LLC https://anylogic.com
- See Also:
- Serialized Form
Constructor | Description |
---|---|
ShapeEmbeddedObjectPresentation |
Constructs an embedded object presentation with specific attributes
|
Modifier and Type | Method | Description |
---|---|---|
final Shape | clone() |
This method is not supported and throws exception:
Embedded object presentation cannot be cloned |
boolean | contains |
Test if the shape contains the point with the given coordinates
(relative to this shape's container, i.e.
|
void | deactivate() |
This method is internal and shouldn't be called by user.
it may be removed/renamed in future. Tells the shape to forget about its current embedded object. |
SVGElement | findSVGElement |
This method is internal and shouldn't be called by user.
it may be removed/renamed in future. |
Agent | getEmbeddedObject() |
Returns the embedded object drawn by this shape
|
Agent | getPresentable() |
Returns the presentable (
Agent ) where this shape belongs to. |
boolean | isVisibleCurrently() |
Takes into account visibility of the
Level |
boolean | isZeroOrigin_xjal() |
This method is internal and shouldn't be called by user.
it may be removed/renamed in future. |
void | resetSVGState() |
This method is internal and shouldn't be called by user.
it may be removed/renamed in future. |
void | restoreOwner |
Deprecated.
|
void | setActive | |
void | setAgentVisible |
Hides or shows the embedded object presentation.
|
void | setEmbeddedObject_xjal | |
boolean | updateDynamicPropertiesStructural | |
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. |
canHandleClick, getDrawMode, getScaleZ, getZ, getZOffset, setDrawMode, setPos, setPos, setPos, setRotation, setScale, setScale, setScaleZ, setZ
executeUserAction, getGroup, getLevel, getName, getOrGenerateUSDId, getRotation, getScaleX, getScaleY, getSVGId, getUsdVersion, getX, getY, isJava2DSwingPresentation, isPublic_xjal, isSVGPresentation, isVisible, onAggregatorVisibilityChanged, onClick, postSVGShapeSpecificAttributes, randomPointInside, randomPointInside, removeSVGFromOwner, removeSVGImage, setChangedUsdVersion, setLevel, setNextChangedUsdVersion, setPublic_xjal, setScale, setScaleX, setScaleY, setVisible, setX, setY, updateDynamicProperties
public ShapeEmbeddedObjectPresentation(Agent agent, ShapeDrawMode drawMode, boolean ispublic, double x, double y, double z, double rotation, boolean drawAgentWithOffset, boolean scaleIsAutomatic, Agent embeddedObject)
Constructs an embedded object presentation with specific attributes
- Parameters:
agent
- the agent owning this shapedrawMode
- where to draw this shape: 2D, 3D or 2D+3Dispublic
- iftrue
, the shape is visible on container's presentationx
- the x coordinate of embedded presentationy
- the y coordinate of embedded presentationz
- the z coordinate of embedded presentationrotation
- the rotation of the embedded presentation in radiansshowIn3D
- iftrue
all the public 3D shapes from embedded object presentation will be drawn on a parent agent, otherwise embedded object presentation will draw only 2D shapes (including 2D-projections of 3D shapes of embedded object)drawAgentWithOffset
- this setting is for agents which live in space coordinates: its specifies whether agent animation should be drawn with offset to this shape (AnyLogic 6 style) or not (AnyLogic 7+). This setting reflects only agents which have space set (e.g. live in space)scaleIsAutomatic
- this setting enables automatic scaling of agent animation depending on its Scale element and the Scale of space the agent lives inembeddedObject
- the embedded object
public Agent getPresentable()
Returns the presentable (
Agent
) where this shape belongs to.- Overrides:
getPresentable
in classShape
- Returns:
- the presentable where this shape belongs to
public Agent getEmbeddedObject()
Returns the embedded object drawn by this shape
- Returns:
- the embedded object drawn by this shape
@AnyLogicInternalAPI public void setActive(boolean active)
@AnyLogicInternalAPI public void deactivate()
This method is internal and shouldn't be called by user.
it may be removed/renamed in future.
Tells the shape to forget about its current embedded object. The shape itself continues to render (being empty) and may reactivate with new embedded object later.
it may be removed/renamed in future.
Tells the shape to forget about its current embedded object. The shape itself continues to render (being empty) and may reactivate with new embedded object later.
@AnyLogicInternalCodegenAPI public void setEmbeddedObject_xjal(Agent embeddedObject)
@AnyLogicInternalCodegenAPI @Deprecated public void restoreOwner(Object owner)
Deprecated.
Description copied from class:
Shape
This method normally should not be called by user
This method restores owner of this object
The method is used in snapshot saving/loading
This method restores owner of this object
The method is used in snapshot saving/loading
- Specified by:
restoreOwner
in interfacecom.anylogic.engine.internal.Child
- Overrides:
restoreOwner
in classShape
- Parameters:
owner
- owner of this object, usuallyAgent
,Experiment
orShapeGroup
@AnyLogicInternalAPI public boolean updateDynamicPropertiesStructural(boolean publicOnly)
- Overrides:
updateDynamicPropertiesStructural
in classShape
- Returns:
true
if:
1. update was done (usually for visible elements, respecting public flag etc.)
AND
2. further update of structural changes is applicable
public boolean isVisibleCurrently()
Description copied from class:
Shape
Takes into account visibility of the
Level
- Overrides:
isVisibleCurrently
in classShape
public void setAgentVisible(boolean v)
Hides or shows the embedded object presentation. Works independently
of setVisible().
- Parameters:
v
- true to show, false to hide
@AnyLogicInternalAPI public boolean isZeroOrigin_xjal()
This method is internal and shouldn't be called by user.
it may be removed/renamed in future.
it may be removed/renamed in future.
public boolean contains(double px, double py)
Description copied from class:
Shape
public final Shape clone()
This method is not supported and throws exception:
Embedded object presentation cannot be cloned
Embedded object presentation cannot be cloned
@AnyLogicInternalAPI public SVGElement updateSVGProperties(List<SVGCommand> output, ShapeDrawMode drawMode, boolean publicOnly, SVGElement owner, SVGElement elbehind)
Description copied from interface:
SVGElement
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. 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:
updateSVGProperties
in interfaceSVGElement
- Overrides:
updateSVGProperties
in classShape
- Parameters:
output
- the list of commands to add todrawMode
- TODOpublicOnly
- drawing context: if true, only shapes that are marked as public only are updatedowner
- the SVG element that serves as a container for this elementelbehind
- 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
null
if 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 givenowner
when the svg element is added to a different place (e.g. GIS map).
@AnyLogicInternalAPI public void resetSVGState()
Description copied from interface:
SVGElement
This method is internal and shouldn't be called by user.
it may be removed/renamed in future.
it may be removed/renamed in future.
- Specified by:
resetSVGState
in interfaceSVGElement
- Overrides:
resetSVGState
in classShape
@AnyLogicInternalAPI public SVGElement findSVGElement(long svgId)
Description copied from interface:
SVGElement
This method is internal and shouldn't be called by user.
it may be removed/renamed in future.
it may be removed/renamed in future.
- Specified by:
findSVGElement
in interfaceSVGElement
- Overrides:
findSVGElement
in classShape