public class LightControl extends AbstractControl
Modifier and Type | Class and Description |
---|---|
static class |
LightControl.ControlDirection |
enabled, spatial
Constructor and Description |
---|
LightControl()
Constructor used for Serialization.
|
LightControl(Light light) |
LightControl(Light light,
LightControl.ControlDirection controlDir) |
Modifier and Type | Method and Description |
---|---|
void |
cloneFields(Cloner cloner,
java.lang.Object original)
Implemented to perform deep cloning for this object, resolving
local cloned references using the specified cloner.
|
protected void |
controlRender(RenderManager rm,
ViewPort vp)
To be implemented in subclass.
|
protected void |
controlUpdate(float tpf)
To be implemented in subclass.
|
LightControl.ControlDirection |
getControlDir() |
Light |
getLight() |
void |
read(JmeImporter im) |
void |
setControlDir(LightControl.ControlDirection controlDir) |
void |
setLight(Light light) |
void |
write(JmeExporter ex) |
cloneForSpatial, getSpatial, isEnabled, jmeClone, render, setEnabled, setSpatial, update
public LightControl()
public LightControl(Light light)
light
- The light to be synced.public LightControl(Light light, LightControl.ControlDirection controlDir)
light
- The light to be synced.controlDir
- SpatialToCamera or CameraToSpatialpublic Light getLight()
public void setLight(Light light)
public LightControl.ControlDirection getControlDir()
public void setControlDir(LightControl.ControlDirection controlDir)
protected void controlUpdate(float tpf)
AbstractControl
controlUpdate
in class AbstractControl
tpf
- time per frame (in seconds)protected void controlRender(RenderManager rm, ViewPort vp)
AbstractControl
controlRender
in class AbstractControl
rm
- the RenderManager rendering the controlled Spatial (not null)vp
- the ViewPort being rendered (not null)public void cloneFields(Cloner cloner, java.lang.Object original)
JmeCloneable
Note: during normal clone operations the original object will not be needed as the clone has already had all of the fields shallow copied.
cloneFields
in interface JmeCloneable
cloneFields
in class AbstractControl
cloner
- The cloner that is performing the cloning operation. The
cloneFields method can call back into the cloner to make
clones of its subordinate fields.original
- The original object from which this object was cloned.
This is provided for the very rare case that this object needs
to refer to its original for some reason. In general, all of
the relevant values should have been transferred during the
shallow clone, and this object need only clone what it wants.public void read(JmeImporter im) throws java.io.IOException
read
in interface Savable
read
in class AbstractControl
java.io.IOException
public void write(JmeExporter ex) throws java.io.IOException
write
in interface Savable
write
in class AbstractControl
java.io.IOException