AnyLogic
Expand
Font size
All Implemented Interfaces:
com.anylogic.engine.internal.Child, Locatable2D, Locatable3D, AggregatableAnimationElement, HasLevel, LevelElement, SVGElement, Serializable, Cloneable

public class ShapeTopLevelPresentationGroup
extends ShapeGroup
Top-level group of agent or experiment presentation
Author:
AnyLogic North America, LLC https://anylogic.com
See Also:
Serialized Form

Field Summary

Fields inherited from class com.anylogic.engine.presentation.Shape3D

UNKNOWN_NAME

Constructor Summary

ConstructorDescription
ShapeTopLevelPresentationGroup(Presentable presentable, boolean ispublic, double x, double y, double z, double rotationXY, Object... contents)
Constructs a top-level presentation group with specific attributes and possibly with some content

Method Summary

Modifier and TypeMethodDescription
voidadd(Level level)
This is a helper method to add all the markups and shapes contained in this level to this group
voidadd(MarkupShape shape)
Adds a space markup shape to the group.
Configuration3DgetConfiguration3D()
Returns 3D configuration of agent.
Returns null for experiments.
ShapeEmbeddedObjectPresentationgetOriginalOwner()
This method is internal and shouldn't be called by user.
it may be removed/renamed in future.
ShapeEmbeddedObjectPresentationgetOwner()
Returns the owner of this presentation if this is an agent presentation and it is embedded to another agent
This method returns null in case the agent is not embedded anywhere or if this is an experiment presentation
List<Object>getShapes()
Returns the collection of shapes in the group (not a copy).
voidinsert(int index, MarkupShape shape)
Adds a space markup to the group at the specified index (which defines z-order of shape in 2D animation).
booleanremove(MarkupShape shape)
Tries to remove a space markup shape from the group, returns false if the shape was not contained.
voidremoveSVGFromOwner(Shape oldOwner)
This method is internal and shouldn't be called by user.
it may be removed/renamed in future.
voidsetOwner_xjal(ShapeEmbeddedObjectPresentation owner)
This method shouldn't be called by user.
It is public due to technical reasons
voidsetPos(double x, double y)
This method is not supported for top-level 'presentation' group. Please create your own group and add all the contents to that group in order to have the intended control.
voidsetPos(double x, double y, double z)
This method is not supported for top-level 'presentation' group. Please create your own group and add all the contents to that group in order to have the intended control.
voidsetPos(Point p)
This method is not supported for top-level 'presentation' group. Please create your own group and add all the contents to that group in order to have the intended control.
voidsetRotation(double rotation)
This method is not supported for top-level 'presentation' group. Please create your own group and add all the contents to that group in order to have the intended control.
voidsetRotationX(double rotationX)
This method is not supported for top-level 'presentation' group. Please create your own group and add all the contents to that group in order to have the intended control.
voidsetRotationY(double rotationY)
This method is not supported for top-level 'presentation' group. Please create your own group and add all the contents to that group in order to have the intended control.
voidsetRotationZ(double rotationZ)
This method is not supported for top-level 'presentation' group. Please create your own group and add all the contents to that group in order to have the intended control.
voidsetScale(double s)
This method is not supported for top-level 'presentation' group. Please create your own group and add all the contents to that group in order to have the intended control.
voidsetScale(double sx, double sy)
This method is not supported for top-level 'presentation' group. Please create your own group and add all the contents to that group in order to have the intended control.
voidsetScale(double sx, double sy, double sz)
This method is not supported for top-level 'presentation' group. Please create your own group and add all the contents to that group in order to have the intended control.
voidsetScaleX(double sx)
This method is not supported for top-level 'presentation' group. Please create your own group and add all the contents to that group in order to have the intended control.
voidsetScaleY(double sy)
This method is not supported for top-level 'presentation' group. Please create your own group and add all the contents to that group in order to have the intended control.
voidsetScaleZ(double sz)
This method is not supported for top-level 'presentation' group. Please create your own group and add all the contents to that group in order to have the intended control.
voidsetVisible(boolean v)
This method is not supported for top-level 'presentation' group. Please create your own group and add all the contents to that group in order to have the intended control.
voidsetX(double x)
This method is not supported for top-level 'presentation' group. Please create your own group and add all the contents to that group in order to have the intended control.
voidsetY(double y)
This method is not supported for top-level 'presentation' group. Please create your own group and add all the contents to that group in order to have the intended control.
voidsetZ(double z)
This method is not supported for top-level 'presentation' group. Please create your own group and add all the contents to that group in order to have the intended control.

Methods inherited from class com.anylogic.engine.presentation.Shape3D

canHandleClick, getDrawMode, getScaleZ, getZ, getZOffset, setDrawMode

Methods inherited from class java.lang.Object

equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Methods inherited from interface com.anylogic.engine.markup.AggregatableAnimationElement

initializeInternal, postInitialize

Methods inherited from interface com.anylogic.engine.Locatable2D

getX, getY

Constructor Details

ShapeTopLevelPresentationGroup

public ShapeTopLevelPresentationGroup(Presentable presentable,
 boolean ispublic,
 double x,
 double y,
 double z,
 double rotationXY,
 Object... contents)
Constructs a top-level presentation group with specific attributes and possibly with some content
Parameters:
presentable - the presentable object owning this shape
ispublic - if true, the shape is visible on container's presentation
x - the x coordinate of group
y - the y coordinate of group
z - the z coordinate of group
rotationXY - the rotation of the group in radians
contents - the (possibly, empty) initial set of shapes (Shape objects, int ids, ReplicatedShape or Light3D objects)

Method Details

add

public void add(MarkupShape shape)
Adds a space markup shape to the group. Note that it is your responsibility to remove the shape from the another group, if any!
Parameters:
shape - the space markup shape to add

add

public void add(Level level)
This is a helper method to add all the markups and shapes contained in this level to this group
Parameters:
level -

insert

public void insert(int index,
 MarkupShape shape)
Adds a space markup to the group at the specified index (which defines z-order of shape in 2D animation). Note that it is your responsibility to remove the shape from the another group, if any!
Parameters:
index - index at which the specified markup is to be inserted (from 0 to size(), inclusive)
shape - the space markup shape to add
Since:
7.2

remove

public boolean remove(MarkupShape shape)
Tries to remove a space markup shape from the group, returns false if the shape was not contained.
Parameters:
shape - the space markup shape to remove
Returns:
true if the group contained the shape, false otherwise

getShapes

public List<Object> getShapes()
Returns the collection of shapes in the group (not a copy). The collection can contain either members of class Shape for shapes, and of class ReplicatedShape for replicated shapes. It may also contain 3D lights, cameras and space markup elements.
Overrides:
getShapes in class ShapeGroup
Returns:
the collection of shapes in the group

getOwner

public ShapeEmbeddedObjectPresentation getOwner()
Returns the owner of this presentation if this is an agent presentation and it is embedded to another agent
This method returns null in case the agent is not embedded anywhere or if this is an experiment presentation
Returns:
the owner of this presentation

getOriginalOwner

@AnyLogicInternalAPI
public ShapeEmbeddedObjectPresentation getOriginalOwner()
This method is internal and shouldn't be called by user.
it may be removed/renamed in future.

getConfiguration3D

public Configuration3D getConfiguration3D()
Returns 3D configuration of agent.
Returns null for experiments.
Returns:
3D configuration of agent

setOwner_xjal

@AnyLogicInternalAPI
public void setOwner_xjal(ShapeEmbeddedObjectPresentation owner)
This method shouldn't be called by user.
It is public due to technical reasons

removeSVGFromOwner

@AnyLogicInternalAPI
public void removeSVGFromOwner(Shape oldOwner)
Description copied from interface: SVGElement
This method is internal and shouldn't be called by user.
it may be removed/renamed in future.
Specified by:
removeSVGFromOwner in interface SVGElement
Overrides:
removeSVGFromOwner in class Shape
Parameters:
oldOwner - may be null

setVisible

@AnyLogicInternalAPI
public void setVisible(boolean v)
This method is not supported for top-level 'presentation' group. Please create your own group and add all the contents to that group in order to have the intended control.
Overrides:
setVisible in class ShapeGroup
Parameters:
v - visibility: true - visible, false - not

setRotation

@AnyLogicInternalAPI
public void setRotation(double rotation)
This method is not supported for top-level 'presentation' group. Please create your own group and add all the contents to that group in order to have the intended control.
Overrides:
setRotation in class ShapeGroup
Parameters:
rotation - the new value of horizontal rotation in radians
See Also:

setRotationZ

@AnyLogicInternalAPI
public void setRotationZ(double rotationZ)
This method is not supported for top-level 'presentation' group. Please create your own group and add all the contents to that group in order to have the intended control.
Overrides:
setRotationZ in class ShapeGroup
Parameters:
rotationZ - the new value of rotation around Z-axis in radians

setRotationY

@AnyLogicInternalAPI
public void setRotationY(double rotationY)
This method is not supported for top-level 'presentation' group. Please create your own group and add all the contents to that group in order to have the intended control.
Overrides:
setRotationY in class ShapeGroup
Parameters:
rotationY - the new value of rotation around Y axis (CW from +Z to +X), in radians

setRotationX

@AnyLogicInternalAPI
public void setRotationX(double rotationX)
This method is not supported for top-level 'presentation' group. Please create your own group and add all the contents to that group in order to have the intended control.
Overrides:
setRotationX in class ShapeGroup
Parameters:
rotationX - the new value of rotation around X axis (CW from +Y to +Z), in radians

setZ

@AnyLogicInternalAPI
public void setZ(double z)
This method is not supported for top-level 'presentation' group. Please create your own group and add all the contents to that group in order to have the intended control.
Overrides:
setZ in class Shape3D
Parameters:
z - the new value of z coordinate

setPos

@AnyLogicInternalAPI
public void setPos(double x,
 double y)
This method is not supported for top-level 'presentation' group. Please create your own group and add all the contents to that group in order to have the intended control.
Overrides:
setPos in class Shape3D
Parameters:
x - the new value of x coordinate
y - the new value of y coordinate

setPos

@AnyLogicInternalAPI
public void setPos(double x,
 double y,
 double z)
This method is not supported for top-level 'presentation' group. Please create your own group and add all the contents to that group in order to have the intended control.
Overrides:
setPos in class Shape3D
Parameters:
x - the new value of x coordinate
y - the new value of y coordinate
z - the new value of z coordinate

setPos

@AnyLogicInternalAPI
public void setPos(Point p)
This method is not supported for top-level 'presentation' group. Please create your own group and add all the contents to that group in order to have the intended control.
Overrides:
setPos in class Shape3D
Parameters:
p - the Point object containing coordinates

setScaleZ

@AnyLogicInternalAPI
public void setScaleZ(double sz)
This method is not supported for top-level 'presentation' group. Please create your own group and add all the contents to that group in order to have the intended control.
Overrides:
setScaleZ in class Shape3D
Parameters:
sz - the new value of scale along z axis, 1 = keep original size

setScale

@AnyLogicInternalAPI
public void setScale(double sx,
 double sy,
 double sz)
This method is not supported for top-level 'presentation' group. Please create your own group and add all the contents to that group in order to have the intended control.
Overrides:
setScale in class Shape3D
Parameters:
sx - the new value of scale along x axis, 1 = keep original size
sy - the new value of scale along y axis, 1 = keep original size
sz - the new value of scale along z axis, 1 = keep original size

setScale

@AnyLogicInternalAPI
public void setScale(double s)
This method is not supported for top-level 'presentation' group. Please create your own group and add all the contents to that group in order to have the intended control.
Overrides:
setScale in class Shape3D
Parameters:
s - the new value of scale along all the axes, 1 = keep original size

setX

@AnyLogicInternalAPI
public void setX(double x)
This method is not supported for top-level 'presentation' group. Please create your own group and add all the contents to that group in order to have the intended control.
Overrides:
setX in class Shape
Parameters:
x - the new value of x coordinate

setY

@AnyLogicInternalAPI
public void setY(double y)
This method is not supported for top-level 'presentation' group. Please create your own group and add all the contents to that group in order to have the intended control.
Overrides:
setY in class Shape
Parameters:
y - the new value of y coordinate

setScaleX

@AnyLogicInternalAPI
public void setScaleX(double sx)
This method is not supported for top-level 'presentation' group. Please create your own group and add all the contents to that group in order to have the intended control.
Overrides:
setScaleX in class Shape
Parameters:
sx - the new value of scale along x axis, 1 = keep original size

setScaleY

@AnyLogicInternalAPI
public void setScaleY(double sy)
This method is not supported for top-level 'presentation' group. Please create your own group and add all the contents to that group in order to have the intended control.
Overrides:
setScaleY in class Shape
Parameters:
sy - the new value of scale along y axis, 1 = keep original size

setScale

@AnyLogicInternalAPI
public void setScale(double sx,
 double sy)
This method is not supported for top-level 'presentation' group. Please create your own group and add all the contents to that group in order to have the intended control.
Overrides:
setScale in class Shape
Parameters:
sx - the new value of scale along x axis, 1 = keep original size
sy - the new value of scale along y axis, 1 = keep original size