AnyLogic
Expand
Font size
All Implemented Interfaces:
com.anylogic.engine.internal.Child, AggregatableAnimationElement, HasLevel, LevelElement, SVGElement, Serializable, Cloneable
Direct Known Subclasses:
Light3D.Daylight, Light3D.Moonlight

public class Light3DAmbient
extends Light3D
3D ambient light, may be added to 3D groups for scene lighting
Ambient light is a light that had scattered for many times, so that it does not have any certain direction. Ambient light does not die out and is uniformly distributed all over the space.
Author:
AnyLogic North America, LLC https://anylogic.com
See Also:
Light3DSerialized Form

Nested Class Summary

Nested classes/interfaces inherited from class com.anylogic.engine.presentation.Light3D

Light3D.CarHeadlight, Light3D.Daylight, Light3D.Moonlight, Light3D.StreetLight

Constructor Summary

ConstructorDescription
Light3DAmbient(boolean ispublic, Color diffuseColor, Color specularColor, Color ambientColor, boolean global)
Creates new 3D ambient light

Method Summary

Modifier and TypeMethodDescription
final Light3DAmbientclone()
Creates and returns a copy of this light (i.e.
LevelgetLevel()
Returns the level containing this shape.
final voidrestoreOwner(Object owner)
Deprecated.
voidsetContextReference_xjal(Presentable contextReference)
Deprecated.
voidsetLevel(Level level)
This method is internal and shouldn't be called by user.
it may be removed/renamed in future.
booleanupdateDynamicPropertiesStructural(boolean publicOnly) 

Methods inherited from class java.lang.Object

equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Methods inherited from interface com.anylogic.engine.markup.AggregatableAnimationElement

initializeInternal, postInitialize

Constructor Details

Light3DAmbient

public Light3DAmbient(boolean ispublic,
 Color diffuseColor,
 Color specularColor,
 Color ambientColor,
 boolean global)
Creates new 3D ambient light
Parameters:
ispublic - if true, the light persists on container's presentation
diffuseColor - the diffuse color component
specularColor - the specular color component
ambientColor - the ambient color component
global - if true, the light affects shapes outside the group the light is placed in

Method Details

clone

public final Light3DAmbient 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
Overrides:
clone in class Light3D

updateDynamicPropertiesStructural

@AnyLogicInternalAPI
public boolean updateDynamicPropertiesStructural(boolean publicOnly)
Returns:
true if update was done (usually for visible elements, respecting public flag etc.)

getLevel

public Level getLevel()
Returns the level containing this shape. The returned value is null for shapes in the experiments.
Specified by:
getLevel in interface HasLevel
Returns:
the level containing this shape

setLevel

@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 Level.add(Shape) instead.
Specified by:
setLevel in interface LevelElement

restoreOwner

@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
Specified by:
restoreOwner in interface com.anylogic.engine.internal.Child
Parameters:
owner - owner of this object, usually Agent, Experiment or ShapeGroup

setContextReference_xjal

@AnyLogicInternalAPI
@Deprecated
public void setContextReference_xjal(Presentable contextReference)
Deprecated.