Package com.anylogic.engine.presentation
- java.lang.Object
- com.anylogic.engine.presentation.Camera3D
- All Implemented Interfaces:
com.anylogic.engine.internal.Child
,AggregatableAnimationElement
,HasLevel
,LevelElement
,Serializable
,Cloneable
public class Camera3D extends Object
3D camera object. Used in 3D windows.
Has location and view direction.
- Author:
- AnyLogic North America, LLC https://anylogic.com
- See Also:
- Serialized Form
Constructor | Description |
---|---|
Camera3D() |
This constructor calls
update() and should be used in
the cameras changing at a model run-time |
Camera3D | |
Camera3D |
Creates a copy of the given camera
|
Camera3D |
Creates new camera object
|
Modifier and Type | Method | Description |
---|---|---|
Camera3D | clone() | |
void | copyToClipboard() |
Copies camera settings to the system clipboard in the format supported
by AnyLogic IDE.
To paste the camera setting in the AnyLogic, please select the camera object, open "General" page of its Property View and press the button with clipboard icon ("Paste") located in the properties page. |
boolean | equals |
Returns
true if the given obj is
3D camera with the same location/rotation
parameters. |
Level | getLevel() |
Returns the level containing this shape.
|
Presentable | getPresentable() | |
double | getRotationX() |
Returns the rotation of the camera around X axis (CW, from +Y to +Z).
Zero rotation value corresponds to horizontal orientation of the camera (parallel with XY-plane). |
double | getRotationZ() |
Returns the rotation of the camera in radians around Z axis (CW from +X to +Y)
|
double | getX() |
Returns the x coordinate of the camera location
|
double | getY() |
Returns the y coordinate of the camera location
|
double | getZ() |
Returns the z coordinate of the camera location
|
void | onAggregatorVisibilityChanged() |
This method is internal and shouldn't be called by user.
it may be removed/renamed in future. |
final void | restoreOwner |
Deprecated.
|
void | setContextReference_xjal |
Deprecated.
|
void | setLevel |
This method is internal and shouldn't be called by user.
it may be removed/renamed in future. |
void | setPos |
Sets the camera location
|
void | setRotationX |
Sets the rotation of the camera around X axis (CW, from +Y to +Z).
Zero rotation value corresponds to horizontal orientation of the camera (parallel with XY-plane). |
void | setRotationZ |
Sets the rotation of the camera in radians around Z axis (CW from +X to +Y)
|
void | setX |
Sets the x coordinate of the camera location
|
void | setY |
Sets the y coordinate of the camera location
|
void | setZ |
Sets the z coordinate of the camera location
|
String | toString() | |
void | update() |
User extension point for cameras changing at a model run-time
This callback method should be overridden to set up-to-date values of camera properties using methods setX(double) ,
setY(double) etc.Default implementation does nothing |
boolean | updateDynamicPropertiesStructural |
public Camera3D()
This constructor calls
update()
and should be used in
the cameras changing at a model run-time- See Also:
-
update()
public Camera3D(Camera3D c)
Creates a copy of the given camera
- Parameters:
c
- the camera to copy, should be notnull
public Camera3D(ShapeGroup group, double x, double y, double z, double rotationX, double rotationZ)
Creates new camera object
- Parameters:
group
- the group owning this shapex
- the x coordinate of groupy
- the y coordinate of groupz
- the z coordinate of grouprotationX
- the rotation of the camera in radians around X axis (CW from +Y to +Z).
Zero rotation value corresponds to horizontal orientation of the camera (parallel with XY-plane).rotationZ
- the rotation of the camera in radians around Z axis (CW from +X to +Y)
public Camera3D(double x, double y, double z, double rotationX, double rotationZ)
public double getX()
Returns the x coordinate of the camera location
- Returns:
- the x coordinate of the camera location
public void setX(double x)
Sets the x coordinate of the camera location
- Parameters:
x
- the x coordinate of the camera location
public double getY()
Returns the y coordinate of the camera location
- Returns:
- the y coordinate of the camera location
public void setY(double y)
Sets the y coordinate of the camera location
- Parameters:
y
- the y coordinate of the camera location
public double getZ()
Returns the z coordinate of the camera location
- Returns:
- the z coordinate of the camera location
public void setZ(double z)
Sets the z coordinate of the camera location
- Parameters:
z
- the z coordinate of the camera location
public double getRotationZ()
Returns the rotation of the camera in radians around Z axis (CW from +X to +Y)
- Returns:
- the rotation of the camera in radians around Z axis (CW from +X to +Y)
public void setRotationZ(double rotationZ)
Sets the rotation of the camera in radians around Z axis (CW from +X to +Y)
- Parameters:
rotationZ
- the new value of rotation in radians around Z axis (CW from +X to +Y)
public double getRotationX()
Returns the rotation of the camera around X axis (CW, from +Y to +Z).
Zero rotation value corresponds to horizontal orientation of the camera (parallel with XY-plane).
Zero rotation value corresponds to horizontal orientation of the camera (parallel with XY-plane).
- Returns:
- the rotation around X axis (CW, from +Y to +Z), in radians
public void setRotationX(double rotationX)
Sets the rotation of the camera around X axis (CW, from +Y to +Z).
Zero rotation value corresponds to horizontal orientation of the camera (parallel with XY-plane).
Zero rotation value corresponds to horizontal orientation of the camera (parallel with XY-plane).
- Parameters:
rotationX
- the new value of rotation around X axis (CW, from +Y to +Z), in radians
public void setPos(double x, double y, double z)
Sets the camera location
- Parameters:
x
- the x coordinate of the camera locationy
- the y coordinate of the camera locationz
- the z coordinate of the camera location
public void update()
User extension point for cameras changing at a model run-time
This callback method should be overridden to set up-to-date values of camera properties using methods
Default implementation does nothing
This callback method should be overridden to set up-to-date values of camera properties using methods
setX(double)
,
setY(double)
etc.Default implementation does nothing
public Camera3D clone()
public boolean equals(Object obj)
Returns
true
if the given obj is
3D camera with the same location/rotation
parameters.@AnyLogicLegacyAPI public void copyToClipboard()
Copies camera settings to the system clipboard in the format supported
by AnyLogic IDE.
To paste the camera setting in the AnyLogic, please select the camera object, open "General" page of its Property View and press the button with clipboard icon ("Paste") located in the properties page.
To paste the camera setting in the AnyLogic, please select the camera object, open "General" page of its Property View and press the button with clipboard icon ("Paste") located in the properties page.
public String toString()
public void onAggregatorVisibilityChanged()
Description copied from interface:
AggregatableAnimationElement
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.
@AnyLogicInternalAPI public boolean updateDynamicPropertiesStructural(boolean publicOnly)
- Returns:
true
if update was done (usually for visible elements, respecting public flag etc.)
public Presentable getPresentable()
public Level getLevel()
Returns the level containing this shape.
The returned value is
null
for shapes in the experiments.@AnyLogicInternalAPI public void setLevel(Level level)
This method is internal and shouldn't be called by user.
it may be removed/renamed in future. Please use
it may be removed/renamed in future. Please use
Level.add(Shape)
instead.- Specified by:
setLevel
in interfaceLevelElement
@AnyLogicInternalCodegenAPI @Deprecated public final void restoreOwner(Object owner)
Deprecated.
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
- Parameters:
owner
- owner of this object, usuallyAgent
,Experiment
orShapeGroup
@AnyLogicInternalAPI @Deprecated public void setContextReference_xjal(Presentable contextReference)
Deprecated.