|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.xj.anylogic.engine.presentation.Light3D
public abstract class Light3D
Base class for all 3D lights, may be added to 3D groups for scene lighting
The light consists of a number of different components: Ambient, Diffuse and
Specular.
Color object.
For example, Black means "No light",
White - white light with maximum intensity,
Red - red light with maximum intensity (e.g. green shape will be invisible under this light),
Dark Red - red light with low intensity.Color).
Shape3DGroup.add(Light3D),
Serialized Form| Method Summary | |
|---|---|
Light3D |
clone()
Creates and returns a copy of this light (i.e. new light instance). |
Element3D_xjal |
get3DElement_xjal()
This method is internal and shouldn't be accessed by user. |
java.awt.Color |
getAmbientColor()
Returns the ambient color component |
java.awt.Color |
getDiffuseColor()
Returns the diffuse color component |
ShapeGroup |
getGroup()
Returns the group containing this light. |
java.lang.String |
getName()
If the light is declared as field in a presentable object class (ActiveObject), e.g. if it was drawn in the graphical editor, returns the name of the field, otherwise returns the string Shape.UNKNOWN_NAME. |
Presentable |
getPresentable()
Returns the Presentable object (ActiveObject or Experiment) where this light belongs to, or null. |
java.awt.Color |
getSpecularColor()
Returns the specular color component |
boolean |
isEnabled()
Returns true if this light is turned on |
boolean |
isGlobal()
Returns true if this light affects shapes outside the parent group of this light |
void |
restoreOwner(java.lang.Object owner)
This method normally should not be called by user This method restores owner of this object The method is used in snapshot saving/loading |
void |
set3DElement_xjal(Element3D_xjal element3D)
This method is internal and shouldn't be accessed by user. |
void |
setAmbientColor(java.awt.Color ambientColor)
Sets the ambient color component |
void |
setContextReference_xjal(Presentable contextReference)
This method is internal and shouldn't be accessed by user. |
void |
setDiffuseColor(java.awt.Color diffuseColor)
Sets the diffuse color component |
void |
setEnabled(boolean enabled)
Enables or disables this light |
void |
setGlobal(boolean global)
Sets whether this light should affect shapes outside the parent group of this light |
void |
setSpecularColor(java.awt.Color specularColor)
Sets the specular color component |
void |
update()
User extension point for dynamic properties update code |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public java.awt.Color getDiffuseColor()
public void setDiffuseColor(java.awt.Color diffuseColor)
diffuseColor - the diffuse color componentpublic java.awt.Color getSpecularColor()
public void setSpecularColor(java.awt.Color specularColor)
specularColor - the specular color componentpublic java.awt.Color getAmbientColor()
public void setAmbientColor(java.awt.Color ambientColor)
ambientColor - the ambient color componentpublic boolean isGlobal()
true if this light affects shapes outside the parent group of this light
true if this light affects shapes outside the parent group of this lightpublic void setGlobal(boolean global)
global - true if this light should affect shapes outside the parent group of this lightpublic void setEnabled(boolean enabled)
enabled - true to turn on the lightpublic boolean isEnabled()
true if this light is turned on
true if this light is enabledpublic ShapeGroup getGroup()
public Presentable getPresentable()
null.
getPresentable in interface com.xj.anylogic.engine.internal.presentation.WorldObject3D_xjalnullpublic java.lang.String getName()
Shape.UNKNOWN_NAME.
Shape.UNKNOWN_NAMEpublic void update()
public Light3D clone()
clone in class java.lang.Objectpublic final void restoreOwner(java.lang.Object owner)
restoreOwner in interface com.xj.anylogic.engine.internal.Childowner - owner of this object, usually ActiveObject,
Experiment or
ShapeGrouppublic void setContextReference_xjal(Presentable contextReference)
com.xj.anylogic.engine.internal.presentation.WorldObject3D_xjal
setContextReference_xjal in interface com.xj.anylogic.engine.internal.presentation.WorldObject3D_xjalpublic void set3DElement_xjal(Element3D_xjal element3D)
com.xj.anylogic.engine.internal.presentation.Accessor3D_xjal
set3DElement_xjal in interface com.xj.anylogic.engine.internal.presentation.Accessor3D_xjalpublic Element3D_xjal get3DElement_xjal()
com.xj.anylogic.engine.internal.presentation.Accessor3D_xjal
get3DElement_xjal in interface com.xj.anylogic.engine.internal.presentation.Accessor3D_xjal
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||