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

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

public class TurnTo
extends CommandMessage

Specify a point, rotation value or object to turn towards. Corresponding GameBots command is TURNTO.


Field Summary
protected  Location Location
          Location you want to face.
protected  Rotation Rotation
          Absolute rotation you want to spin to.
protected  UnrealId Target
          The unique id of a player/object/nav point/whatever that you want to face.
 
Constructor Summary
TurnTo()
          Creates new instance of command TurnTo.
TurnTo(TurnTo original)
          Cloning constructor.
TurnTo(UnrealId Target, Rotation Rotation, Location Location)
          Creates new instance of command TurnTo.
 
Method Summary
 Location getLocation()
          Location you want to face.
 Rotation getRotation()
          Absolute rotation you want to spin to.
 UnrealId getTarget()
          The unique id of a player/object/nav point/whatever that you want to face.
 TurnTo setLocation(Location Location)
          Location you want to face.
 TurnTo setRotation(Rotation Rotation)
          Absolute rotation you want to spin to.
 TurnTo setTarget(UnrealId Target)
          The unique id of a player/object/nav point/whatever that you want to face.
 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

Target

protected UnrealId Target
The unique id of a player/object/nav point/whatever that you want to face. Must be visible.


Rotation

protected Rotation Rotation
Absolute rotation you want to spin to. Must be provided as comma delimited ("0,50000,0") and should be in absolute terms and in UT units (2pi = 65535 units). Used only if no target provided. Rotation is parsed: First pitch (up, down), then yaw (left, right), the roll (no effect here, however it is an equivalent of doing a cartwheel).


Location

protected Location Location
Location you want to face. Normal rules for location. Only used if no Target or Rotation.

Constructor Detail

TurnTo

public TurnTo(UnrealId Target,
              Rotation Rotation,
              Location Location)
Creates new instance of command TurnTo. Specify a point, rotation value or object to turn towards. Corresponding GameBots message for this command is TURNTO.

Parameters:
Target - The unique id of a player/object/nav point/whatever that you want to face. Must be visible.
Rotation - Absolute rotation you want to spin to. Must be provided as comma delimited ("0,50000,0") and should be in absolute terms and in UT units (2pi = 65535 units). Used only if no target provided. Rotation is parsed: First pitch (up, down), then yaw (left, right), the roll (no effect here, however it is an equivalent of doing a cartwheel).
Location - Location you want to face. Normal rules for location. Only used if no Target or Rotation.

TurnTo

public TurnTo()
Creates new instance of command TurnTo. Specify a point, rotation value or object to turn towards. Corresponding GameBots message for this command is TURNTO.

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


TurnTo

public TurnTo(TurnTo original)
Cloning constructor.

Method Detail

getTarget

public UnrealId getTarget()
The unique id of a player/object/nav point/whatever that you want to face. Must be visible.


setTarget

public TurnTo setTarget(UnrealId Target)
The unique id of a player/object/nav point/whatever that you want to face. Must be visible.


getRotation

public Rotation getRotation()
Absolute rotation you want to spin to. Must be provided as comma delimited ("0,50000,0") and should be in absolute terms and in UT units (2pi = 65535 units). Used only if no target provided. Rotation is parsed: First pitch (up, down), then yaw (left, right), the roll (no effect here, however it is an equivalent of doing a cartwheel).


setRotation

public TurnTo setRotation(Rotation Rotation)
Absolute rotation you want to spin to. Must be provided as comma delimited ("0,50000,0") and should be in absolute terms and in UT units (2pi = 65535 units). Used only if no target provided. Rotation is parsed: First pitch (up, down), then yaw (left, right), the roll (no effect here, however it is an equivalent of doing a cartwheel).


getLocation

public Location getLocation()
Location you want to face. Normal rules for location. Only used if no Target or Rotation.


setLocation

public TurnTo setLocation(Location Location)
Location you want to face. Normal rules for location. Only used if no Target or Rotation.


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.