com.jme3.scene.control
Class AbstractControl

java.lang.Object
  extended by com.jme3.scene.control.AbstractControl
All Implemented Interfaces:
Savable, Control
Direct Known Subclasses:
AnimControl, BillboardControl, CameraControl, LightControl, LodControl, NormalRecalcControl, SkeletonControl, TerrainLodControl, UpdateControl

public abstract class AbstractControl
extends java.lang.Object
implements Control

An abstract implementation of the Control interface.


Field Summary
protected  boolean enabled
           
protected  Spatial spatial
           
 
Constructor Summary
AbstractControl()
           
 
Method Summary
protected abstract  void controlRender(RenderManager rm, ViewPort vp)
          To be implemented in subclass.
protected abstract  void controlUpdate(float tpf)
          To be implemented in subclass.
 Spatial getSpatial()
           
 boolean isEnabled()
           
 void read(JmeImporter im)
           
 void render(RenderManager rm, ViewPort vp)
          Should be called prior to queuing the spatial by the RenderManager.
 void setEnabled(boolean enabled)
           
 void setSpatial(Spatial spatial)
           
 void update(float tpf)
          Updates the control.
 void write(JmeExporter ex)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.jme3.scene.control.Control
cloneForSpatial
 

Field Detail

enabled

protected boolean enabled

spatial

protected Spatial spatial
Constructor Detail

AbstractControl

public AbstractControl()
Method Detail

setSpatial

public void setSpatial(Spatial spatial)
Specified by:
setSpatial in interface Control
Parameters:
spatial - the spatial to be controlled. This should not be called from user code.

getSpatial

public Spatial getSpatial()

setEnabled

public void setEnabled(boolean enabled)

isEnabled

public boolean isEnabled()

controlUpdate

protected abstract void controlUpdate(float tpf)
To be implemented in subclass.


controlRender

protected abstract void controlRender(RenderManager rm,
                                      ViewPort vp)
To be implemented in subclass.


update

public void update(float tpf)
Description copied from interface: Control
Updates the control. This should not be called from user code.

Specified by:
update in interface Control
Parameters:
tpf - Time per frame.

render

public void render(RenderManager rm,
                   ViewPort vp)
Description copied from interface: Control
Should be called prior to queuing the spatial by the RenderManager. This should not be called from user code.

Specified by:
render in interface Control

write

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

read

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