Package com.anylogic.engine.presentation
- java.lang.Object
- com.anylogic.engine.presentation.Light3D
- com.anylogic.engine.presentation.Light3DDirectional
- All Implemented Interfaces:
com.anylogic.engine.internal.Child
,AggregatableAnimationElement
,HasLevel
,LevelElement
,SVGElement
,UsdElement
,Serializable
,Cloneable
public class Light3DDirectional extends Light3D
3D directional light, may be added to 3D groups for scene lighting
Directional source of light is located in some infinitely distant point. It shines in the specified direction. You can think of a directional source of light as the Sun.
Lighting is performed along the given direction which is specified using 2 angles: orientation around X and Z axes.
Directional source of light is located in some infinitely distant point. It shines in the specified direction. You can think of a directional source of light as the Sun.
Lighting is performed along the given direction which is specified using 2 angles: orientation around X and Z axes.
- Author:
- AnyLogic North America, LLC https://anylogic.com
- See Also:
-
Light3D
Serialized Form
Constructor | Description |
---|---|
Light3DDirectional |
Creates new 3D directional light
|
Modifier and Type | Method | Description |
---|---|---|
final Light3DDirectional | clone() |
Creates and returns a copy of this light (i.e.
|
float | getAngleX() |
Returns the orientation of the light around X axis (CW, from +Y to +Z).
Zero angle value corresponds to horizontal orientation of the light (parallel with XY-plane). |
float | getAngleZ() |
Returns the orientation of the light around Z axis (CW, from +X to +Y).
Zero angle value corresponds to orientation of the light towards -Y direction (to the North). |
Level | getLevel() |
Returns the level containing this shape.
|
final void | restoreOwner |
Deprecated.
|
void | setAngleX |
Sets the orientation of the light around X axis (CW, from +Y to +Z).
Zero angle value corresponds to horizontal orientation of the light (parallel with XY-plane). |
void | setAngleZ |
Sets the orientation of the light around Z axis (CW, from +X to +Y).
Zero angle value corresponds to orientation of the light towards -Y direction (to the North). |
void | setContextReference_xjal |
Deprecated.
|
void | setLevel |
This method is internal and shouldn't be called by user.
it may be removed/renamed in future. |
boolean | updateDynamicPropertiesStructural |
executeUserAction, findSVGElement, getAmbientColor, getDiffuseColor, getGroup, getName, getOrGenerateUSDId, getPresentable, getSpecularColor, getSVGId, isEnabled, isGlobal, onAggregatorVisibilityChanged, removeSVGFromOwner, resetSVGState, setAmbientColor, setDiffuseColor, setEnabled, setGlobal, setSpecularColor, update, updateSVGProperties
public Light3DDirectional(boolean ispublic, double angleX, double angleZ, Color diffuseColor, Color specularColor, Color ambientColor, boolean global)
Creates new 3D directional light
- Parameters:
ispublic
- iftrue
, the light persists on container's presentationangleX
- the orientation around X axis (CW, from +Y to +Z), in radiansangleZ
- the orientation around Z axis (CW, from +X to +Y), in radiansdiffuseColor
- the diffuse color componentspecularColor
- the specular color componentambientColor
- the ambient color componentglobal
- iftrue
, the light affects shapes outside the group the light is placed in
public float getAngleZ()
Returns the orientation of the light around Z axis (CW, from +X to +Y).
Zero angle value corresponds to orientation of the light towards -Y direction (to the North).
Zero angle value corresponds to orientation of the light towards -Y direction (to the North).
- Returns:
- the orientation around Z axis (CW, from +X to +Y), in radians
public void setAngleZ(double angleZ)
Sets the orientation of the light around Z axis (CW, from +X to +Y).
Zero angle value corresponds to orientation of the light towards -Y direction (to the North).
Zero angle value corresponds to orientation of the light towards -Y direction (to the North).
- Parameters:
angleZ
- the new value of orientation around Z axis (CW, from +X to +Y), in radians
public float getAngleX()
Returns the orientation of the light around X axis (CW, from +Y to +Z).
Zero angle value corresponds to horizontal orientation of the light (parallel with XY-plane).
Zero angle value corresponds to horizontal orientation of the light (parallel with XY-plane).
- Returns:
- orientation around X axis (CW, from +Y to +Z), in radians
public void setAngleX(double angleX)
Sets the orientation of the light around X axis (CW, from +Y to +Z).
Zero angle value corresponds to horizontal orientation of the light (parallel with XY-plane).
Zero angle value corresponds to horizontal orientation of the light (parallel with XY-plane).
- Parameters:
angleX
- the new value of orientation around X axis (CW, from +Y to +Z), in radians
public final Light3DDirectional clone()
Description copied from class:
Light3D
Creates and returns a copy of this light (i.e. new light instance).
The returned light has the same type and parameters
The returned copy isn't automatically added to the group this light belongs to.
The clone is created in the context of the same agent
The returned light has the same type and parameters
The returned copy isn't automatically added to the group this light belongs to.
The clone is created in the context of the same agent
@AnyLogicInternalAPI public boolean updateDynamicPropertiesStructural(boolean publicOnly)
- Returns:
true
if update was done (usually for visible elements, respecting public flag etc.)
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.