public class RtsCam
extends java.lang.Object
implements com.jme3.scene.control.Control, com.jme3.input.controls.ActionListener
Modifier and Type | Class and Description |
---|---|
static class |
RtsCam.Degree |
Constructor and Description |
---|
RtsCam(com.jme3.renderer.Camera cam,
com.jme3.scene.Spatial target) |
Modifier and Type | Method and Description |
---|---|
com.jme3.scene.control.Control |
cloneForSpatial(com.jme3.scene.Spatial spatial) |
float |
getMaxSpeed(RtsCam.Degree dg) |
float |
getMaxValue(RtsCam.Degree dg) |
float |
getMinValue(RtsCam.Degree dg) |
com.jme3.math.Vector3f |
getPosition() |
boolean |
isEnabled() |
void |
onAction(java.lang.String name,
boolean isPressed,
float tpf) |
void |
read(com.jme3.export.JmeImporter im) |
void |
registerWithInput(com.jme3.input.InputManager inputManager) |
void |
render(com.jme3.renderer.RenderManager rm,
com.jme3.renderer.ViewPort vp) |
void |
setCenter(com.jme3.math.Vector3f center) |
void |
setEnabled(boolean enabled) |
void |
setMaxSpeed(RtsCam.Degree deg,
float maxSpd,
float accelTime) |
void |
setMinMaxValues(RtsCam.Degree dg,
float min,
float max) |
void |
setSpatial(com.jme3.scene.Spatial spatial) |
void |
update(float tpf) |
void |
write(com.jme3.export.JmeExporter ex) |
public RtsCam(com.jme3.renderer.Camera cam, com.jme3.scene.Spatial target)
public void setMaxSpeed(RtsCam.Degree deg, float maxSpd, float accelTime)
public void registerWithInput(com.jme3.input.InputManager inputManager)
public void write(com.jme3.export.JmeExporter ex) throws java.io.IOException
write
in interface com.jme3.export.Savable
java.io.IOException
public void read(com.jme3.export.JmeImporter im) throws java.io.IOException
read
in interface com.jme3.export.Savable
java.io.IOException
public com.jme3.scene.control.Control cloneForSpatial(com.jme3.scene.Spatial spatial)
cloneForSpatial
in interface com.jme3.scene.control.Control
public void setSpatial(com.jme3.scene.Spatial spatial)
setSpatial
in interface com.jme3.scene.control.Control
public void setEnabled(boolean enabled)
public boolean isEnabled()
public void update(float tpf)
update
in interface com.jme3.scene.control.Control
public float getMaxSpeed(RtsCam.Degree dg)
public float getMinValue(RtsCam.Degree dg)
public float getMaxValue(RtsCam.Degree dg)
public void setMinMaxValues(RtsCam.Degree dg, float min, float max)
public com.jme3.math.Vector3f getPosition()
public void setCenter(com.jme3.math.Vector3f center)
public void render(com.jme3.renderer.RenderManager rm, com.jme3.renderer.ViewPort vp)
render
in interface com.jme3.scene.control.Control
public void onAction(java.lang.String name, boolean isPressed, float tpf)
onAction
in interface com.jme3.input.controls.ActionListener