nl.tudelft.pogamut.ut2004.agent.module.shooting.util
Class FacingUtil

Package class diagram package FacingUtil
java.lang.Object
  extended by nl.tudelft.pogamut.ut2004.agent.module.shooting.util.FacingUtil

public class FacingUtil
extends Object

Utilities to determine if a player is facing some location.

Author:
mpkorstanje

Field Summary
static double IS_FACING_ANGLE
          What angle is considered to be maximum facing angle by default (in degrees).
 
Constructor Summary
FacingUtil()
           
 
Method Summary
static boolean isFacing(AgentInfo info, cz.cuni.amis.pogamut.base3d.worldview.object.ILocated location)
          Tells if the player is currently facing input location.
static boolean isFacing(AgentInfo info, cz.cuni.amis.pogamut.base3d.worldview.object.ILocated location, double angle)
          Tells if the agent is currently facing input location.
static boolean isFacing(cz.cuni.amis.pogamut.base3d.worldview.object.Location origin, cz.cuni.amis.pogamut.base3d.worldview.object.Rotation rotation, cz.cuni.amis.pogamut.base3d.worldview.object.Location target, double angle)
          Tells you if the rotation at the origin is facing the target location.
static boolean isFacing(Player player, cz.cuni.amis.pogamut.base3d.worldview.object.ILocated location)
          Tells if the player is currently facing input location.
static boolean isFacing(Player player, cz.cuni.amis.pogamut.base3d.worldview.object.ILocated location, double angle)
          Tells if the player is currently facing input location.
static boolean isFacing2D(AgentInfo info, cz.cuni.amis.pogamut.base3d.worldview.object.ILocated location)
          Tells if the player is currently facing input location.
static boolean isFacing2D(AgentInfo info, cz.cuni.amis.pogamut.base3d.worldview.object.ILocated location, double angle)
          Tells if the agent is currently facing input location.
static boolean isFacing2D(cz.cuni.amis.pogamut.base3d.worldview.object.Location origin, cz.cuni.amis.pogamut.base3d.worldview.object.Rotation rotation, cz.cuni.amis.pogamut.base3d.worldview.object.Location target, double angle)
          Tells you if the rotation at the origin is facing the target location in the XY (horizontal) plane.
static boolean isFacing2D(Player player, cz.cuni.amis.pogamut.base3d.worldview.object.ILocated location)
          Tells if the player is currently facing input location.
static boolean isFacing2D(Player player, cz.cuni.amis.pogamut.base3d.worldview.object.ILocated location, double angle)
          Tells if the player is currently facing input location.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

IS_FACING_ANGLE

public static final double IS_FACING_ANGLE
What angle is considered to be maximum facing angle by default (in degrees).

See Also:
Constant Field Values
Constructor Detail

FacingUtil

public FacingUtil()
Method Detail

isFacing

public static boolean isFacing(AgentInfo info,
                               cz.cuni.amis.pogamut.base3d.worldview.object.ILocated location)
Tells if the player is currently facing input location.

Parameters:
player - the player:
location - input location.
Returns:
True, if the bot is facing input location.

isFacing

public static boolean isFacing(AgentInfo info,
                               cz.cuni.amis.pogamut.base3d.worldview.object.ILocated location,
                               double angle)
Tells if the agent is currently facing input location.

Parameters:
player - the player:
location - input location.
angle - specifies maximum angle (in degrees) that will be still considered as facing angle.
Returns:
True, if the angle between agent facing vector and input location is smaller or equal to input angle.

isFacing

public static boolean isFacing(cz.cuni.amis.pogamut.base3d.worldview.object.Location origin,
                               cz.cuni.amis.pogamut.base3d.worldview.object.Rotation rotation,
                               cz.cuni.amis.pogamut.base3d.worldview.object.Location target,
                               double angle)
Tells you if the rotation at the origin is facing the target location.

Parameters:
origin - the location of the object that should be facing
rotation - rotation of the object that should be facing
target - what it should be facing
angle - specifies maximum angle (in degrees) that will be still considered as facing angle.
Returns:
True, if the angle between direction vector and input location is smaller or equal to input angle.

isFacing

public static boolean isFacing(Player player,
                               cz.cuni.amis.pogamut.base3d.worldview.object.ILocated location)
Tells if the player is currently facing input location.

Parameters:
player - the player:
location - input location.
Returns:
True, if the bot is facing input location.

isFacing

public static boolean isFacing(Player player,
                               cz.cuni.amis.pogamut.base3d.worldview.object.ILocated location,
                               double angle)
Tells if the player is currently facing input location.

Parameters:
player - the player:
location - input location.
angle - specifies maximum angle (in degrees) that will be still considered as facing angle.
Returns:
True, if the angle between agent facing vector and input location is smaller or equal to input angle.

isFacing2D

public static boolean isFacing2D(AgentInfo info,
                                 cz.cuni.amis.pogamut.base3d.worldview.object.ILocated location)
Tells if the player is currently facing input location.

Parameters:
player - the player:
location - input location.
Returns:
True, if the bot is facing input location.

isFacing2D

public static boolean isFacing2D(AgentInfo info,
                                 cz.cuni.amis.pogamut.base3d.worldview.object.ILocated location,
                                 double angle)
Tells if the agent is currently facing input location.

Parameters:
player - the player:
location - input location.
angle - specifies maximum angle (in degrees) that will be still considered as facing angle.
Returns:
True, if the angle between agent facing vector and input location is smaller or equal to input angle.

isFacing2D

public static boolean isFacing2D(cz.cuni.amis.pogamut.base3d.worldview.object.Location origin,
                                 cz.cuni.amis.pogamut.base3d.worldview.object.Rotation rotation,
                                 cz.cuni.amis.pogamut.base3d.worldview.object.Location target,
                                 double angle)
Tells you if the rotation at the origin is facing the target location in the XY (horizontal) plane.

Parameters:
origin - the location of the object that should be facing
rotation - rotation of the object that should be facing
target - what it should be facing
angle - specifies maximum angle (in degrees) that will be still considered as facing angle.
Returns:
True, if the angle between direction vector and input location is smaller or equal to input angle.

isFacing2D

public static boolean isFacing2D(Player player,
                                 cz.cuni.amis.pogamut.base3d.worldview.object.ILocated location)
Tells if the player is currently facing input location.

Parameters:
player - the player:
location - input location.
Returns:
True, if the bot is facing input location.

isFacing2D

public static boolean isFacing2D(Player player,
                                 cz.cuni.amis.pogamut.base3d.worldview.object.ILocated location,
                                 double angle)
Tells if the player is currently facing input location.

Parameters:
player - the player:
location - input location.
angle - specifies maximum angle (in degrees) that will be still considered as facing angle.
Returns:
True, if the angle between agent facing vector and input location is smaller or equal to input angle.


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