com.xj.anylogic.engine.presentation
Class Shape3DImage

java.lang.Object
  extended by com.xj.anylogic.engine.presentation.Shape
      extended by com.xj.anylogic.engine.presentation.ShapeImage
          extended by com.xj.anylogic.engine.presentation.Shape3DImage
All Implemented Interfaces:
com.xj.anylogic.engine.internal.Child, com.xj.anylogic.engine.internal.presentation.Accessor3D_xjal, com.xj.anylogic.engine.internal.presentation.WorldObject3D_xjal, Locatable2D, Locatable3D, java.io.Serializable, java.lang.Cloneable

public class Shape3DImage
extends ShapeImage
implements Locatable3D, com.xj.anylogic.engine.internal.presentation.WorldObject3D_xjal

Persistent shape representing an image drawn on a horizontal rectangle in the 3D world. Also visible on 2D animation.
Top-left corner of the image is drawn at (x, y, z) coordinates.

Author:
XJ Technologies Company Ltd. www.anylogic.com
See Also:
Serialized Form

Field Summary
 
Fields inherited from class com.xj.anylogic.engine.presentation.Shape
UNKNOWN_NAME
 
Constructor Summary
Shape3DImage(Presentable presentable, boolean ispublic, double x, double y, double z, double rotation, double width, double height, java.lang.String packagePrefix, java.lang.String[] filenames)
          Constructs a 3D image shape with specific attributes.
 
Method Summary
 void add(java.lang.String filename)
          Adds an image to the image shape.
 Shape3DImage clone()
          Creates and returns a copy of this shape (i.e. new shape instance).
 Element3D_xjal get3DElement_xjal()
          This method is internal and shouldn't be accessed by user.
 double getZ()
          Returns the z coordinate of the shape.
 double getZOffset()
          Returns the offset from z coordinate of the location base.
 void remove(int i)
          Removes the image with the given index from the image shape.
 void set3DElement_xjal(Element3D_xjal element3D)
          This method is internal and shouldn't be accessed by user.
 void setContextReference_xjal(Presentable contextReference)
          This method is internal and shouldn't be accessed by user.
 void setHeight(double height)
          Sets the height of the image.
 void setIndex(int index)
          Sets the index of the image to display.
 void setPos(double x, double y)
          Sets (x, y) coordinates of the shape.
 void setPos(double x, double y, double z)
          Sets coordinates of the shape
 void setRotation(double rotation)
          Sets the rotation of the shape.
 void setScale(double scale)
          Sets the scale of the figure along all the axes
 void setScale(double sx, double sy)
          Sets the scales of the shape along both axes
 void setScaleX(double sx)
          Sets the scale of the shape along x axis
 void setScaleY(double sy)
          Sets the scale of the shape along y axis
 void setSize(double width, double height)
          Sets the width and height of the image.
 void setVisible(boolean visible)
          Sets the visibility of the shape.
 void setWidth(double width)
          Sets the width of the image.
 void setX(double x)
          Sets the x coordinate of the shape
 void setY(double y)
          Sets the y coordinate of the shape
 void setZ(double z)
          Sets the z coordinate of the figure
 
Methods inherited from class com.xj.anylogic.engine.presentation.ShapeImage
contains, draw, getHeight, getImageFileName, getImageFileNames, getIndex, getPresentable, getWidth, onClickAt, restoreOwner
 
Methods inherited from class com.xj.anylogic.engine.presentation.Shape
canHandleClick, getGroup, getName, getRotation, getScaleX, getScaleY, getX, getY, isVisible, onClick
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.xj.anylogic.engine.Locatable2D
getX, getY
 
Methods inherited from interface com.xj.anylogic.engine.internal.presentation.WorldObject3D_xjal
getPresentable
 

Constructor Detail

Shape3DImage

public Shape3DImage(Presentable presentable,
                    boolean ispublic,
                    double x,
                    double y,
                    double z,
                    double rotation,
                    double width,
                    double height,
                    java.lang.String packagePrefix,
                    java.lang.String[] filenames)
Constructs a 3D image shape with specific attributes.

Parameters:
presentable - the presentable object owning this image
ispublic - if true, the shape is visible on container's presentation
x - the x coordinate of the image upper left corner
y - the y coordinate of the image upper left corner
z - the z coordinate of the image
rotation - the rotation of the image around Z-axis from +X to +Y, in radians
width - the width of the image
height - the height of the image
packagePrefix - the package name of original active object where this image is defined, formatted using '/' characters; with '/' character at the beginning and at the end
filenames - the array of image file names
Method Detail

clone

public Shape3DImage clone()
Description copied from class: Shape
Creates and returns a copy of this shape (i.e. new shape instance).
The returned shape is the object of the same class
The returned copy isn't automatically added to the group this shape belongs to.
The clone is created in the context of the same experiment or active object

Note that cloning of GIS shape, controls and charts is not supported

Overrides:
clone in class ShapeImage

setX

public void setX(double x)
Description copied from class: Shape
Sets the x coordinate of the shape

Overrides:
setX in class Shape
Parameters:
x - the new value of x coordinate

setY

public void setY(double y)
Description copied from class: Shape
Sets the y coordinate of the shape

Overrides:
setY in class Shape
Parameters:
y - the new value of y coordinate

setZ

public void setZ(double z)
Sets the z coordinate of the figure

Parameters:
z - the new value of z coordinate

getZ

public double getZ()
Returns the z coordinate of the shape.

Specified by:
getZ in interface Locatable3D
Returns:
the z coordinate of the shape

getZOffset

public double getZOffset()
Description copied from interface: Locatable3D
Returns the offset from z coordinate of the location base.
This e.g. returns getZHeight() for some 3D shapes

Specified by:
getZOffset in interface Locatable3D
Returns:
the offset from z coordinate of the location

setWidth

public void setWidth(double width)
Description copied from class: ShapeImage
Sets the width of the image.

Overrides:
setWidth in class ShapeImage
Parameters:
width - the width of the image

setHeight

public void setHeight(double height)
Description copied from class: ShapeImage
Sets the height of the image.

Overrides:
setHeight in class ShapeImage
Parameters:
height - the height of the image

setSize

public void setSize(double width,
                    double height)
Description copied from class: ShapeImage
Sets the width and height of the image.

Overrides:
setSize in class ShapeImage
Parameters:
width - the new width of the image
height - the new height of the image

setPos

public void setPos(double x,
                   double y)
Sets (x, y) coordinates of the shape.
Z-coordinate is left unchanged

Overrides:
setPos in class Shape
Parameters:
x - the new value of x coordinate
y - the new value of y coordinate

setPos

public void setPos(double x,
                   double y,
                   double z)
Sets coordinates of the shape

Parameters:
x - the new value of x coordinate
y - the new value of y coordinate
z - the new value of z coordinate

setScale

public void setScale(double scale)
Sets the scale of the figure along all the axes

Overrides:
setScale in class Shape
Parameters:
scale - the new value of scale

setScale

public void setScale(double sx,
                     double sy)
Description copied from class: Shape
Sets the scales of the shape along both axes

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

setScaleX

public void setScaleX(double sx)
Description copied from class: Shape
Sets the scale of the shape along x axis

Overrides:
setScaleX in class Shape
Parameters:
sx - the new value of scale along x axis, 1 = keep original size

setScaleY

public void setScaleY(double sy)
Description copied from class: Shape
Sets the scale of the shape along y axis

Overrides:
setScaleY in class Shape
Parameters:
sy - the new value of scale along y axis, 1 = keep original size

setRotation

public void setRotation(double rotation)
Description copied from class: Shape
Sets the rotation of the shape.

Overrides:
setRotation in class Shape
Parameters:
rotation - the new value of rotation in radians

setVisible

public void setVisible(boolean visible)
Description copied from class: Shape
Sets the visibility of the shape.

Overrides:
setVisible in class Shape
Parameters:
visible - visibility: true - visible, false - not

setIndex

public void setIndex(int index)
Description copied from class: ShapeImage
Sets the index of the image to display.

Overrides:
setIndex in class ShapeImage
Parameters:
index - the index of the image to display

add

public void add(java.lang.String filename)
Description copied from class: ShapeImage
Adds an image to the image shape.

Overrides:
add in class ShapeImage
Parameters:
filename - the file name of the image being added

remove

public void remove(int i)
Description copied from class: ShapeImage
Removes the image with the given index from the image shape.

Overrides:
remove in class ShapeImage
Parameters:
i - the index of the image

get3DElement_xjal

public Element3D_xjal get3DElement_xjal()
Description copied from interface: com.xj.anylogic.engine.internal.presentation.Accessor3D_xjal
This method is internal and shouldn't be accessed by user.
It is public due to technical reasons.

Specified by:
get3DElement_xjal in interface com.xj.anylogic.engine.internal.presentation.Accessor3D_xjal

set3DElement_xjal

public void set3DElement_xjal(Element3D_xjal element3D)
Description copied from interface: com.xj.anylogic.engine.internal.presentation.Accessor3D_xjal
This method is internal and shouldn't be accessed by user.
It is public due to technical reasons.

Specified by:
set3DElement_xjal in interface com.xj.anylogic.engine.internal.presentation.Accessor3D_xjal

setContextReference_xjal

public void setContextReference_xjal(Presentable contextReference)
Description copied from interface: com.xj.anylogic.engine.internal.presentation.WorldObject3D_xjal
This method is internal and shouldn't be accessed by user.
It is public due to technical reasons.

Specified by:
setContextReference_xjal in interface com.xj.anylogic.engine.internal.presentation.WorldObject3D_xjal


Copyright © 1991-2008 XJ Technlogies. All Rights Reserved.