public class Light3DPoint extends Light3D
point
of space.
It shines uniformly in all directions.Light3D
,
Serialized FormLight3D.CarHeadlight, Light3D.Daylight, Light3D.Moonlight, Light3D.StreetLight
Constructor and Description |
---|
Light3DPoint(boolean ispublic,
double x,
double y,
double z,
double constantAttenuation,
double linearAttenuation,
double quadraticAttenuation,
java.awt.Color diffuseColor,
java.awt.Color specularColor,
java.awt.Color ambientColor,
boolean global)
Creates new 3D point light
|
Modifier and Type | Method and Description |
---|---|
Light3DPoint |
clone()
Creates and returns a copy of this light (i.e. new light instance).
|
float |
getConstantAttenuation()
Returns the constant attenuation factor of the light
|
Level |
getLevel()
Returns the level containing this shape.
|
float |
getLinearAttenuation()
Returns the linear attenuation factor of the light
|
float |
getQuadraticAttenuation()
Returns the quadratic attenuation factor of the light
|
float |
getX()
Returns the x coordinate of the light source position
|
float |
getY()
Returns the y coordinate of the light source position
|
float |
getZ()
Returns the z coordinate of the light source position
|
void |
restoreOwner(java.lang.Object owner)
Deprecated.
|
void |
setAttenuation(double constantAttenuation,
double linearAttenuation,
double quadraticAttenuation)
Sets the attenuation factors of the light fading with the distance.
|
void |
setConstantAttenuation(double constantAttenuation)
Sets the constant attenuation factor of the light
|
void |
setContextReference_xjal(Presentable contextReference)
Deprecated.
|
void |
setLevel(Level level)
This method is internal and shouldn't be called by user.
|
void |
setLinearAttenuation(double linearAttenuation)
Sets the linear attenuation factor of the light
|
void |
setPos(double x,
double y,
double z)
Sets the light source position
|
void |
setQuadraticAttenuation(double quadraticAttenuation)
Sets the quadratic attenuation factor of the light
|
void |
setX(double x)
Sets the x coordinate of the light source position
|
void |
setY(double y)
Sets the y coordinate of the light source position
|
void |
setZ(double z)
Sets the z coordinate of the light source position
|
boolean |
updateDynamicPropertiesStructural(boolean publicOnly) |
executeUserAction, findSVGElement, getAmbientColor, getDiffuseColor, getGroup, getName, getPresentable, getSpecularColor, getSVGId, isEnabled, isGlobal, onAggregatorVisibilityChanged, removeSVGFromOwner, resetSVGState, setAmbientColor, setDiffuseColor, setEnabled, setGlobal, setSpecularColor, update, updateSVGProperties
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
initializeInternal, postInitialize
public Light3DPoint(boolean ispublic, double x, double y, double z, double constantAttenuation, double linearAttenuation, double quadraticAttenuation, java.awt.Color diffuseColor, java.awt.Color specularColor, java.awt.Color ambientColor, boolean global)
ispublic
- if true
, the light persists on container's presentationx
- the x coordinate of light source locationy
- the y coordinate of light source locationz
- the z coordinate of light source locationconstantAttenuation
- the constant attenuation factorlinearAttenuation
- the linear attenuation factorquadraticAttenuation
- the quadraticAttenuation attenuation factordiffuseColor
- the diffuse color componentspecularColor
- the specular color componentambientColor
- the ambient color componentglobal
- if true
, the light affects shapes outside the group
the light is placed inpublic float getX()
public void setX(double x)
x
- the x coordinate of the light source positionpublic float getY()
public void setY(double y)
y
- the y coordinate of the light source positionpublic float getZ()
public void setZ(double z)
z
- the z coordinate of the light source positionpublic void setPos(double x, double y, double z)
x
- the x coordinate of the light source positiony
- the y coordinate of the light source positionz
- the z coordinate of the light source positionpublic float getConstantAttenuation()
public void setConstantAttenuation(double constantAttenuation)
constantAttenuation
- the constant attenuation factor of the lightpublic float getLinearAttenuation()
public void setLinearAttenuation(double linearAttenuation)
linearAttenuation
- the linear attenuation factor of the lightpublic float getQuadraticAttenuation()
public void setQuadraticAttenuation(double quadraticAttenuation)
quadraticAttenuation
- the quadratic attenuation factor of the lightpublic void setAttenuation(double constantAttenuation, double linearAttenuation, double quadraticAttenuation)
d
is a distance from the light source):attenuation factor = 1 / (kC + kLd + kQd2)
constantAttenuation
- constant attenuation factor: kC
linearAttenuation
- linear attenuation factor: kL
quadraticAttenuation
- quadratic attenuation factor: kQ
public final Light3DPoint clone()
Light3D
@AnyLogicInternalAPI public boolean updateDynamicPropertiesStructural(boolean publicOnly)
true
if update was done (usually for visible elements, respecting public flag etc.)public Level getLevel()
null
for shapes in the experiments.@AnyLogicInternalAPI public void setLevel(Level level)
Level#add(Shape)
instead.setLevel
in interface LevelElement
@AnyLogicInternalCodegenAPI @Deprecated public final void restoreOwner(java.lang.Object owner)
restoreOwner
in interface com.anylogic.engine.internal.Child
owner
- owner of this object, usually Agent
,
Experiment
or
ShapeGroup
@AnyLogicInternalAPI @Deprecated public void setContextReference_xjal(Presentable contextReference)
Copyright © AnyLogic North America, LLC. All Rights Reserved.