com.jme3.scene.control
Class LightControl

java.lang.Object
  extended by com.jme3.scene.control.AbstractControl
      extended by com.jme3.scene.control.LightControl
All Implemented Interfaces:
Savable, Control

public class LightControl
extends AbstractControl

This Control maintains a reference to a Camera, which will be synched with the position (worldTranslation) of the current spatial.


Nested Class Summary
static class LightControl.ControlDirection
           
 
Field Summary
 
Fields inherited from class com.jme3.scene.control.AbstractControl
enabled, spatial
 
Constructor Summary
LightControl()
          Constructor used for Serialization.
LightControl(Light light)
           
LightControl(Light light, LightControl.ControlDirection controlDir)
           
 
Method Summary
 Control cloneForSpatial(Spatial newSpatial)
          Creates a clone of the Control, the given Spatial is the cloned version of the spatial to which this control is attached to.
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)
           
 
Methods inherited from class com.jme3.scene.control.AbstractControl
getSpatial, isEnabled, render, setEnabled, setSpatial, update
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LightControl

public LightControl()
Constructor used for Serialization.


LightControl

public LightControl(Light light)
Parameters:
light - The light to be synced.

LightControl

public LightControl(Light light,
                    LightControl.ControlDirection controlDir)
Parameters:
light - The light to be synced.
Method Detail

getLight

public Light getLight()

setLight

public void setLight(Light light)

getControlDir

public LightControl.ControlDirection getControlDir()

setControlDir

public void setControlDir(LightControl.ControlDirection controlDir)

controlUpdate

protected void controlUpdate(float tpf)
Description copied from class: AbstractControl
To be implemented in subclass.

Specified by:
controlUpdate in class AbstractControl

controlRender

protected void controlRender(RenderManager rm,
                             ViewPort vp)
Description copied from class: AbstractControl
To be implemented in subclass.

Specified by:
controlRender in class AbstractControl

cloneForSpatial

public Control cloneForSpatial(Spatial newSpatial)
Description copied from interface: Control
Creates a clone of the Control, the given Spatial is the cloned version of the spatial to which this control is attached to.

Returns:
A clone of this control for the spatial

read

public void read(JmeImporter im)
          throws java.io.IOException
Specified by:
read in interface Savable
Overrides:
read in class AbstractControl
Throws:
java.io.IOException

write

public void write(JmeExporter ex)
           throws java.io.IOException
Specified by:
write in interface Savable
Overrides:
write in class AbstractControl
Throws:
java.io.IOException