public class Shape3DObject extends Shape3D implements com.anylogic.engine.internal.Child
Modifier and Type | Field and Description |
---|---|
static Object3DAxisOrder |
XYZ_AXIS_ORDER
Deprecated.
|
static Object3DAxisOrder |
YZX_AXIS_ORDER
Deprecated.
|
static Object3DAxisOrder |
ZXY_AXIS_ORDER
Deprecated.
|
UNKNOWN_NAME
Constructor and Description |
---|
Shape3DObject(Presentable presentable,
boolean ispublic,
double x,
double y,
double z,
double rotation,
double scale,
java.lang.String packagePrefix,
java.lang.String fileName,
Object3DAxisOrder axisOrder,
boolean applyShading,
double topLeftX,
double topLeftY,
double width,
double height)
Deprecated.
this constructor is deprecated and will be removed in future releases
|
Shape3DObject(Presentable presentable,
ShapeDrawMode drawMode,
boolean ispublic,
double x,
double y,
double z,
double rotation,
double scale,
boolean autoScale,
java.lang.String packagePrefix,
java.lang.String fileName,
Object3DAxisOrder axisOrder,
boolean applyShading,
double topLeftX,
double topLeftY,
double width,
double height)
Deprecated.
this constructor is deprecated and will be removed in future releases
|
Shape3DObject(Presentable presentable,
ShapeDrawMode drawMode,
boolean ispublic,
double x,
double y,
double z,
double rotation,
double scale,
boolean autoScale,
java.lang.String packagePrefix,
java.lang.String fileName,
Object3DAxisOrder axisOrder,
boolean applyShading,
double topLeftX,
double topLeftY,
double width,
double height,
java.lang.Long imageFileId,
Pair<java.lang.String,java.awt.Color>... customColors)
Deprecated.
this constructor is deprecated and will be deleted in future releases
|
Shape3DObject(Presentable presentable,
ShapeDrawMode drawMode,
boolean ispublic,
double x,
double y,
double z,
double rotation,
double scale,
boolean autoScale,
java.lang.String packagePrefix,
java.lang.String fileName,
Object3DAxisOrder axisOrder,
double topLeftX,
double topLeftY,
double width,
double height)
Constructs a 3D shape with specific attributes.
|
Shape3DObject(Presentable presentable,
ShapeDrawMode drawMode,
boolean ispublic,
double x,
double y,
double z,
double rotation,
double scale,
boolean autoScale,
java.lang.String packagePrefix,
java.lang.String fileName,
Object3DAxisOrder axisOrder,
Object3DInternalLighting internalLighting,
boolean ignoreSceneLights,
double topLeftX,
double topLeftY,
double width,
double height,
java.lang.Long imageFileId,
Pair<java.lang.String,java.awt.Color>... customColors)
Constructs a 3D shape with specific attributes.
|
Modifier and Type | Method and Description |
---|---|
Shape3DObject |
clone()
Creates and returns a copy of this shape (i.e. new shape instance).
|
boolean |
contains(double px,
double py)
|
void |
dispose()
Releases resources allocated by this object,
should be called on agent destroy.
|
double |
getAgentScalingFactor()
Returns additional scaling factor for sizing accordingly to the Scale element on the Agent.
|
java.lang.String |
getFilename()
Returns the name of 3D object file
|
java.lang.String |
getFilePath_xjal()
This method is internal and shouldn't be called by user.
|
Presentable |
getPresentable()
Returns the Presentable object (
Agent or Experiment ) where
this shape belongs to, or null. |
void |
postSVGShapeSpecificAttributes(java.util.List<java.lang.String> att,
java.util.List<java.lang.String> val,
boolean publicOnly)
Posts general properties specific to a particular shape class.
|
void |
restoreOwner(java.lang.Object owner)
Deprecated.
|
void |
setColor(java.lang.String materialName,
java.awt.Color color)
Changes custom color for the shape material with the given name.
|
canHandleClick, getDrawMode, getScaleZ, getZ, getZOffset, setDrawMode, setPos, setPos, setPos, setRotation, setScale, setScale, setScaleZ, setZ
executeUserAction, findSVGElement, getGroup, getLevel, getName, getRotation, getScaleX, getScaleY, getSVGId, getX, getY, isJava2DSwingPresentation, isPublic_xjal, isSVGPresentation, isVisible, onAggregatorVisibilityChanged, onClick, randomPointInside, randomPointInside, removeSVGFromOwner, removeSVGImage, resetSVGState, setLevel, setPublic_xjal, setScale, setScaleX, setScaleY, setVisible, setX, setY, updateDynamicProperties, updateDynamicPropertiesStructural, updateSVGProperties
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getX, getY
initializeInternal, postInitialize
@Deprecated public static final Object3DAxisOrder XYZ_AXIS_ORDER
@Deprecated public static final Object3DAxisOrder YZX_AXIS_ORDER
@Deprecated public static final Object3DAxisOrder ZXY_AXIS_ORDER
@Deprecated public Shape3DObject(Presentable presentable, boolean ispublic, double x, double y, double z, double rotation, double scale, java.lang.String packagePrefix, java.lang.String fileName, Object3DAxisOrder axisOrder, boolean applyShading, double topLeftX, double topLeftY, double width, double height)
@Deprecated public Shape3DObject(Presentable presentable, ShapeDrawMode drawMode, boolean ispublic, double x, double y, double z, double rotation, double scale, boolean autoScale, java.lang.String packagePrefix, java.lang.String fileName, Object3DAxisOrder axisOrder, boolean applyShading, double topLeftX, double topLeftY, double width, double height)
public Shape3DObject(Presentable presentable, ShapeDrawMode drawMode, boolean ispublic, double x, double y, double z, double rotation, double scale, boolean autoScale, java.lang.String packagePrefix, java.lang.String fileName, Object3DAxisOrder axisOrder, double topLeftX, double topLeftY, double width, double height)
presentable
- the presentable object owning this objectdrawMode
- where to draw this shape: 2D, 3D or 2D+3Dispublic
- if true
, the shape is visible on container's presentationx
- the x coordinate of the objecty
- the y coordinate of the objectz
- the z coordinate of the objectrotation
- the rotation of the object in radiansscale
- the scale of the objectautoScale
- if true
, shape will be additionally resized to match the scale of the agent this shape is located on. Please note that in this case generated 2D image file should be rendered using the final, multiplied scalepackagePrefix
- the package name of original agent where
this object is defined, formatted using '/' characters; with '/'
character at the beginning and at the endfileName
- the name of the 3D object fileaxisOrder
- axis order of this figure, may be used for orientation correction
for objects obtained from different 3D editorstopLeftX
- the x coordinate of the top-left corner of XY-projection of object in local object coordinatestopLeftY
- the y coordinate of the top-left corner of XY-projection of object in local object coordinateswidth
- the width of the XY-projection of object in local object coordinatesheight
- the height of the XY-projection of object in local object coordinatesimageFileId
- internal id used to find generated png imagecustomColors
- array of pairs: material name, color@SafeVarargs @Deprecated public Shape3DObject(Presentable presentable, ShapeDrawMode drawMode, boolean ispublic, double x, double y, double z, double rotation, double scale, boolean autoScale, java.lang.String packagePrefix, java.lang.String fileName, Object3DAxisOrder axisOrder, boolean applyShading, double topLeftX, double topLeftY, double width, double height, java.lang.Long imageFileId, Pair<java.lang.String,java.awt.Color>... customColors)
@SafeVarargs public Shape3DObject(Presentable presentable, ShapeDrawMode drawMode, boolean ispublic, double x, double y, double z, double rotation, double scale, boolean autoScale, java.lang.String packagePrefix, java.lang.String fileName, Object3DAxisOrder axisOrder, Object3DInternalLighting internalLighting, boolean ignoreSceneLights, double topLeftX, double topLeftY, double width, double height, java.lang.Long imageFileId, Pair<java.lang.String,java.awt.Color>... customColors)
presentable
- the presentable object owning this objectdrawMode
- where to draw this shape: 2D, 3D or 2D+3Dispublic
- if true
, the shape is visible on container's presentationx
- the x coordinate of the objecty
- the y coordinate of the objectz
- the z coordinate of the objectrotation
- the rotation of the object in radiansscale
- the scale of the objectautoScale
- if true
, shape will be additionally resized to match the scale of the agent this shape is located on. Please note that in this case generated 2D image file should be rendered using the final, multiplied scalepackagePrefix
- the package name of original agent where
this object is defined, formatted using '/' characters; with '/'
character at the beginning and at the endfileName
- the name of the 3D object fileaxisOrder
- axis order of this figure, may be used for orientation correction
for objects obtained from different 3D editorsinternalLighting
- defines how the internal lights (which this 3D object may contain) will operate on the scene:
turned off,
lighting this 3D object only (self lighting), or
lighting on the global level (like headlamp of the car).ignoreSceneLights
- allows to disable lighting of this 3D object by other lights located on the model scene - useful when 3D object
contains internal lights and shouldn't be double-lighted.topLeftX
- the x coordinate of the top-left corner of XY-projection of object in local object coordinatestopLeftY
- the y coordinate of the top-left corner of XY-projection of object in local object coordinateswidth
- the width of the XY-projection of object in local object coordinatesheight
- the height of the XY-projection of object in local object coordinatesimageFileId
- internal id used to find generated png imagecustomColors
- array of pairs: material name, colorpublic java.lang.String getFilename()
public void setColor(java.lang.String materialName, java.awt.Color color)
materialName
- the name of the material. Please refer to Properties View of this 3D object in AnyLogic.color
- new color, or null
to reset the color to default value@AnyLogicInternalAPI public java.lang.String getFilePath_xjal()
public double getAgentScalingFactor()
public boolean contains(double px, double py)
Shape
public Presentable getPresentable()
Shape
Agent
or Experiment
) where
this shape belongs to, or null.getPresentable
in class Shape
@AnyLogicInternalCodegenAPI @Deprecated public void restoreOwner(java.lang.Object owner)
Shape
restoreOwner
in interface com.anylogic.engine.internal.Child
restoreOwner
in class Shape
owner
- owner of this object, usually Agent
,
Experiment
or
ShapeGroup
public final Shape3DObject clone()
Shape
public void postSVGShapeSpecificAttributes(java.util.List<java.lang.String> att, java.util.List<java.lang.String> val, boolean publicOnly)
Shape
postSVGShapeSpecificAttributes
in class Shape
att
- attribute namesval
- attribute valuespublicOnly
- TODO@AnyLogicInternalCodegenAPI public void dispose()
Copyright © AnyLogic North America, LLC. All Rights Reserved.