|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.xj.anylogic.engine.presentation.Shape
com.xj.anylogic.engine.presentation.ShapeLineFill
com.xj.anylogic.engine.presentation.ShapeMultiplePoints
com.xj.anylogic.engine.presentation.ShapePolyLine
com.xj.anylogic.engine.presentation.Shape3DPolyLine
public class Shape3DPolyLine
Persistent 3D polyline shape. Also visible on 2D animation.
3D surface is actually an extrusion of an ordinary Polyline shape by
Z-Height amount along +Z axis.
Note that 3D polyline has a differen
| Field Summary |
|---|
| Fields inherited from class com.xj.anylogic.engine.presentation.Shape |
|---|
UNKNOWN_NAME |
| Constructor Summary | |
|---|---|
Shape3DPolyLine()
Constructs a polyline with default attributes. |
|
Shape3DPolyLine(boolean ispublic,
double x,
double y,
double z,
java.lang.Object lineColor,
java.lang.Object fillColor,
int npoints,
double[] dx,
double[] dy,
double[] dz,
boolean closed,
double zHeight,
double lineWidth,
int lineStyle)
Constructs a 3D polyline with specific attributes. |
|
| Method Summary | |
|---|---|
Shape3DPolyLine |
clone()
Creates and returns a copy of this shape (i.e. new shape instance). |
void |
draw(Panel panel,
java.awt.Graphics2D g,
java.awt.geom.AffineTransform xform,
boolean publicOnly)
Draws the polyline in a given context |
Element3D_xjal |
get3DElement_xjal()
This method is internal and shouldn't be accessed by user. |
double |
getPointDz(int i)
Returns the z coordinate of a particular point of the shape relative to the start point. |
Presentable |
getPresentable()
Returns the Presentable object (ActiveObject or Experiment) where this shape belongs to, or null. |
double |
getScaleZ()
Returns the scale of the shape along z axis |
double |
getZ()
Returns the z coordinate of the shape. |
double |
getZHeight()
Returns the height of the polyline along Z-axis |
double |
getZOffset()
Returns the offset from z coordinate of the location base. |
Point |
randomPointInside()
Returns the randomly chosen point inside the fill-area of the polyline (like if it was closed). |
void |
set3DElement_xjal(Element3D_xjal element3D)
This method is internal and shouldn't be accessed by user. |
void |
setClosed(boolean closed)
Sets the shape closed or open. |
void |
setContextReference_xjal(Presentable contextReference)
This method is internal and shouldn't be accessed by user. |
void |
setFillColor(java.lang.Object fillColor)
Sets the fill color (or Texture) of the shape. |
void |
setLineColor(java.lang.Object lineColor)
Sets the line color (or Texture) of the shape. |
void |
setLineStyle(int style)
Does nothing: the only supported in 3D line style is solid |
void |
setLineWidth(double width)
Sets the line width of the shape, 0 means thinnest possible |
void |
setNPoints(int n)
Sets the number of points in the shape. |
void |
setPoint(int i,
double ptdx,
double ptdy)
Sets the coordinates of a particular point of the shape relative to the start point. |
void |
setPoint(int i,
double ptdx,
double ptdy,
double ptdz)
Sets the coordinates of a particular point of the shape relative to the start point. |
void |
setPointDx(int i,
double ptdx)
Sets the x coordinate of a particular point of the shape relative to the start point. |
void |
setPointDy(int i,
double ptdy)
Sets the y coordinate of a particular point of the shape relative to the start point. |
void |
setPointDz(int i,
double ptdz)
Sets the z coordinate of a particular point of the shape relative to the start point. |
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 |
setScaleZ(double sz)
Sets the scale of the shape along z axis |
void |
setVisible(boolean visible)
Sets the visibility of the shape. |
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 |
void |
setZHeight(double zHeight)
Sets the height of the polyline along Z-axis |
| Methods inherited from class com.xj.anylogic.engine.presentation.ShapePolyLine |
|---|
contains, getXMax, getXMin, getYMax, getYMin, length, onClickAt, randomPointInside |
| Methods inherited from class com.xj.anylogic.engine.presentation.ShapeMultiplePoints |
|---|
getNPoints, getPointDx, getPointDy, isClosed |
| Methods inherited from class com.xj.anylogic.engine.presentation.ShapeLineFill |
|---|
getFillColor, getFillTexture, getLineColor, getLineStyle, getLineTexture, getLineWidth, setFillColor, setLineColor |
| Methods inherited from class com.xj.anylogic.engine.presentation.Shape |
|---|
canHandleClick, getGroup, getName, getRotation, getScaleX, getScaleY, getX, getY, isVisible, onClick, restoreOwner |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface com.xj.anylogic.engine.Path2D |
|---|
getNPoints, getPointDx, getPointDy, getX, getY |
| Constructor Detail |
|---|
public Shape3DPolyLine()
public Shape3DPolyLine(boolean ispublic,
double x,
double y,
double z,
java.lang.Object lineColor,
java.lang.Object fillColor,
int npoints,
double[] dx,
double[] dy,
double[] dz,
boolean closed,
double zHeight,
double lineWidth,
int lineStyle)
ispublic - if true, the polyline is visible on container's presentationx - the x coordinate of the polyline start pointy - the y coordinate of the polyline start pointz - the z coordinate of the polyline start pointlineColor - line color (or Texture) of the polylinefillColor - fill color (or Texture) of the polylinenpoints - the number of points in the polylinedx - the array of (at least npoints) polyline points x coordinates relative to the start pointdy - the array of (at least npoints) polyline points y coordinates relative to the start pointdz - the array of (at least npoints) polyline points z coordinates relative to the start pointclosed - if true, the polyline is drawn as closedzHeight - the height of a polyline along Z-axislineWidth - the polyline widthlineStyle - the polyline stroke style
(only solid is supported)| Method Detail |
|---|
public void draw(Panel panel,
java.awt.Graphics2D g,
java.awt.geom.AffineTransform xform,
boolean publicOnly)
draw in class ShapePolyLinepanel - the panel where the drawing is doneg - the graphics where the drawing takes placexform - the "original" transform that must be restored before drawingpublicOnly - if true, the shape is only drawn if it is publicpublic Shape3DPolyLine clone()
Shape
clone in class ShapePolyLinepublic void setX(double x)
Shape
setX in class Shapex - the new value of x coordinatepublic void setY(double y)
Shape
setY in class Shapey - the new value of y coordinatepublic void setZ(double z)
z - the new value of z coordinatepublic double getZ()
getZ in interface Locatable3DgetZ in interface Path3Dpublic double getZOffset()
Locatable3DgetZHeight() for
some 3D shapes
getZOffset in interface Locatable3Dpublic void setZHeight(double zHeight)
zHeight - the new value of z-heightpublic double getZHeight()
public void setPointDx(int i,
double ptdx)
ShapeMultiplePoints
setPointDx in class ShapeMultiplePointsi - the index of the point (starting from 0)ptdx - the new x coordinate of the point relative to the start point
public void setPointDy(int i,
double ptdy)
ShapeMultiplePoints
setPointDy in class ShapeMultiplePointsi - the index of the point (starting from 0)ptdy - the new y coordinate of the point relative to the start point
public void setPointDz(int i,
double ptdz)
i - the index of the point (starting from 0)ptdz - the new z coordinate of the point relative to the start pointpublic double getPointDz(int i)
getPointDz in interface Path3Di - the index of the point (starting from 0)
public void setPoint(int i,
double ptdx,
double ptdy)
setPoint in class ShapeMultiplePointsi - the index of the point (starting from 0)ptdx - the new x coordinate of the point relative to the start pointptdy - the new y coordinate of the point relative to the start point
public void setPoint(int i,
double ptdx,
double ptdy,
double ptdz)
i - the index of the point (starting from 0)ptdx - the new x coordinate of the point relative to the start pointptdy - the new y coordinate of the point relative to the start pointptdz - the new z coordinate of the point relative to the start pointpublic void setClosed(boolean closed)
ShapeMultiplePoints
setClosed in class ShapeMultiplePointsclosed - visibility: true - visible, false - notpublic void setNPoints(int n)
ShapeMultiplePoints
setNPoints in class ShapeMultiplePointsn - the new number of pointspublic void setLineWidth(double width)
ShapeLineFill
setLineWidth in class ShapeLineFillwidth - the new line width of the shapepublic void setLineStyle(int style)
setLineStyle in class ShapeLineFillstyle - the new style of the shapepublic void setLineColor(java.lang.Object lineColor)
ShapeLineFillTexture) of the shape.
setLineColor in class ShapeLineFilllineColor - the new line color, null = do not draw the shape linepublic void setFillColor(java.lang.Object fillColor)
ShapeLineFillTexture) of the shape.
setFillColor in class ShapeLineFillfillColor - the new fill color, null = do not fill the shape
public void setPos(double x,
double y)
setPos in class Shapex - the new value of x coordinatey - the new value of y coordinate
public void setPos(double x,
double y,
double z)
x - the new value of x coordinatey - the new value of y coordinatez - the new value of z coordinatepublic void setScale(double scale)
setScale in class ShapePolyLinescale - the new value of scale
public void setScale(double sx,
double sy)
Shape
setScale in class ShapePolyLinesx - the new value of scale along x axis, 1 = keep original sizesy - the new value of scale along y axis, 1 = keep original sizepublic void setScaleX(double sx)
Shape
setScaleX in class ShapePolyLinesx - the new value of scale along x axis, 1 = keep original sizepublic void setScaleY(double sy)
Shape
setScaleY in class ShapePolyLinesy - the new value of scale along y axis, 1 = keep original sizepublic void setScaleZ(double sz)
sz - the new value of scale along z axis, 1 = keep original sizepublic double getScaleZ()
public void setRotation(double rotation)
Shape
setRotation in class ShapePolyLinerotation - the new value of rotation in radianspublic void setVisible(boolean visible)
Shape
setVisible in class Shapevisible - visibility: true - visible, false - notpublic Presentable getPresentable()
Shape
getPresentable in interface com.xj.anylogic.engine.internal.presentation.WorldObject3D_xjalgetPresentable in class Shapepublic Element3D_xjal get3DElement_xjal()
com.xj.anylogic.engine.internal.presentation.Accessor3D_xjal
get3DElement_xjal in interface com.xj.anylogic.engine.internal.presentation.Accessor3D_xjalpublic void set3DElement_xjal(Element3D_xjal element3D)
com.xj.anylogic.engine.internal.presentation.Accessor3D_xjal
set3DElement_xjal in interface com.xj.anylogic.engine.internal.presentation.Accessor3D_xjalpublic void setContextReference_xjal(Presentable contextReference)
com.xj.anylogic.engine.internal.presentation.WorldObject3D_xjal
setContextReference_xjal in interface com.xj.anylogic.engine.internal.presentation.WorldObject3D_xjalpublic Point randomPointInside()
ShapePolyLine
randomPointInside in class ShapePolyLine
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||