public class CameraControl extends AbstractControl
Modifier and Type | Class and Description |
---|---|
static class |
CameraControl.ControlDirection |
enabled, spatial
Constructor and Description |
---|
CameraControl()
Constructor used for Serialization.
|
CameraControl(Camera camera) |
CameraControl(Camera camera,
CameraControl.ControlDirection controlDir) |
Modifier and Type | Method and Description |
---|---|
protected void |
controlRender(RenderManager rm,
ViewPort vp)
To be implemented in subclass.
|
protected void |
controlUpdate(float tpf)
To be implemented in subclass.
|
Camera |
getCamera() |
CameraControl.ControlDirection |
getControlDir() |
void |
read(JmeImporter im) |
void |
setCamera(Camera camera) |
void |
setControlDir(CameraControl.ControlDirection controlDir) |
void |
write(JmeExporter ex) |
cloneFields, cloneForSpatial, getSpatial, isEnabled, jmeClone, render, setEnabled, setSpatial, update
public CameraControl()
public CameraControl(Camera camera)
camera
- The Camera to be synced.public CameraControl(Camera camera, CameraControl.ControlDirection controlDir)
camera
- The Camera to be synced.controlDir
- SpatialToCamera or CameraToSpatialpublic Camera getCamera()
public void setCamera(Camera camera)
public CameraControl.ControlDirection getControlDir()
public void setControlDir(CameraControl.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 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