Class RtsCam

  • All Implemented Interfaces:
    com.jme3.export.Savable, com.jme3.input.controls.ActionListener, com.jme3.input.controls.InputListener, com.jme3.scene.control.Control

    public class RtsCam
    extends java.lang.Object
    implements com.jme3.scene.control.Control, com.jme3.input.controls.ActionListener
    • Constructor Detail

      • RtsCam

        public RtsCam​(com.jme3.renderer.Camera cam,
                      com.jme3.scene.Spatial target)
    • Method Detail

      • setMaxSpeed

        public void setMaxSpeed​(RtsCam.Degree deg,
                                float maxSpd,
                                float accelTime)
      • registerWithInput

        public void registerWithInput​(com.jme3.input.InputManager inputManager)
      • write

        public void write​(com.jme3.export.JmeExporter ex)
                   throws java.io.IOException
        Specified by:
        write in interface com.jme3.export.Savable
        Throws:
        java.io.IOException
      • read

        public void read​(com.jme3.export.JmeImporter im)
                  throws java.io.IOException
        Specified by:
        read in interface com.jme3.export.Savable
        Throws:
        java.io.IOException
      • cloneForSpatial

        public com.jme3.scene.control.Control cloneForSpatial​(com.jme3.scene.Spatial spatial)
        Specified by:
        cloneForSpatial in interface com.jme3.scene.control.Control
      • setSpatial

        public void setSpatial​(com.jme3.scene.Spatial spatial)
        Specified by:
        setSpatial in interface com.jme3.scene.control.Control
      • setEnabled

        public void setEnabled​(boolean enabled)
      • isEnabled

        public boolean isEnabled()
      • update

        public void update​(float tpf)
        Specified by:
        update in interface com.jme3.scene.control.Control
      • setMinMaxValues

        public void setMinMaxValues​(RtsCam.Degree dg,
                                    float min,
                                    float max)
      • getPosition

        public com.jme3.math.Vector3f getPosition()
      • setCenter

        public void setCenter​(com.jme3.math.Vector3f center)
      • render

        public void render​(com.jme3.renderer.RenderManager rm,
                           com.jme3.renderer.ViewPort vp)
        Specified by:
        render in interface com.jme3.scene.control.Control
      • onAction

        public void onAction​(java.lang.String name,
                             boolean isPressed,
                             float tpf)
        Specified by:
        onAction in interface com.jme3.input.controls.ActionListener