cz.cuni.amis.pogamut.udk.communication.messages.gbcommands
Class Rotate

Package class diagram package Rotate
java.lang.Object
  extended by cz.cuni.amis.pogamut.base.communication.messages.CommandMessage
      extended by cz.cuni.amis.pogamut.udk.communication.messages.gbcommands.Rotate

public class Rotate
extends CommandMessage

Turns the bot by a specified amount. Corresponding GameBots command is ROTATE.


Field Summary
protected  int Amount
          Amount in UT units to rotate.
protected  String Axis
          If provided as "Vertical", rotation will be done to Pitch (up/down).
 
Constructor Summary
Rotate()
          Creates new instance of command Rotate.
Rotate(int Amount, String Axis)
          Creates new instance of command Rotate.
Rotate(Rotate original)
          Cloning constructor.
 
Method Summary
 int getAmount()
          Amount in UT units to rotate.
 String getAxis()
          If provided as "Vertical", rotation will be done to Pitch (up/down).
 Rotate setAmount(int Amount)
          Amount in UT units to rotate.
 Rotate setAxis(String Axis)
          If provided as "Vertical", rotation will be done to Pitch (up/down).
 String toHtmlString()
           
 String toMessage()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

Amount

protected int Amount
Amount in UT units to rotate. May be negative to rotate counter clockwise. This rotation is relatively added to bot current rotation, then the shortest turn to achieve this new rotation will be performed (so the maximum turn you can achive is to turn back by supporting value 32778 or -32778).


Axis

protected String Axis
If provided as "Vertical", rotation will be done to Pitch (up/down). Any other value, or not provided, and rotation will be to Yaw (left/right).

Constructor Detail

Rotate

public Rotate(int Amount,
              String Axis)
Creates new instance of command Rotate. Turns the bot by a specified amount.Corresponding GameBots message for this command is ROTATE.

Parameters:
Amount - Amount in UT units to rotate. May be negative to rotate counter clockwise. This rotation is relatively added to bot current rotation, then the shortest turn to achieve this new rotation will be performed (so the maximum turn you can achive is to turn back by supporting value 32778 or -32778).
Axis - If provided as "Vertical", rotation will be done to Pitch (up/down). Any other value, or not provided, and rotation will be to Yaw (left/right).

Rotate

public Rotate()
Creates new instance of command Rotate. Turns the bot by a specified amount.Corresponding GameBots message for this command is ROTATE.

WARNING: this is empty-command constructor, you have to use setters to fill it up!


Rotate

public Rotate(Rotate original)
Cloning constructor.

Method Detail

getAmount

public int getAmount()
Amount in UT units to rotate. May be negative to rotate counter clockwise. This rotation is relatively added to bot current rotation, then the shortest turn to achieve this new rotation will be performed (so the maximum turn you can achive is to turn back by supporting value 32778 or -32778).


setAmount

public Rotate setAmount(int Amount)
Amount in UT units to rotate. May be negative to rotate counter clockwise. This rotation is relatively added to bot current rotation, then the shortest turn to achieve this new rotation will be performed (so the maximum turn you can achive is to turn back by supporting value 32778 or -32778).


getAxis

public String getAxis()
If provided as "Vertical", rotation will be done to Pitch (up/down). Any other value, or not provided, and rotation will be to Yaw (left/right).


setAxis

public Rotate setAxis(String Axis)
If provided as "Vertical", rotation will be done to Pitch (up/down). Any other value, or not provided, and rotation will be to Yaw (left/right).


toString

public String toString()
Overrides:
toString in class CommandMessage

toHtmlString

public String toHtmlString()

toMessage

public String toMessage()


Copyright © 2014 AMIS research group, Faculty of Mathematics and Physics, Charles University in Prague, Czech Republic. All Rights Reserved.