Direction  version
 All Classes Functions Variables
Static Public Member Functions | Static Public Attributes | List of all members
Direction Class Reference

Library class. More...

Static Public Member Functions

static function GetDirString (dir)
 Translates a direction value into a human readable string that can be used for logging.
static function IsMainDir (dir)
 Check if dir is main direction (NW, SW, SE or NE)
static function IsDiagonalDir (dir)
 Check if dir is a diagonal direction (N, W, S or E)
static function GetAllDirsInRandomOrder ()
 Get all 8 direction as AIList.
static function GetMainDirsInRandomOrder ()
 Get 4 main direction as AIList.
static function GetDiagonalDirsInRandomOrder ()
 Get 4 main direction as AIList.

Static Public Attributes

static DIR_N = _dir_int.DIR_N
 North.
static DIR_NE = _dir_int.DIR_NE
 North East.
static DIR_E = _dir_int.DIR_E
 East.
static DIR_SE = _dir_int.DIR_SE
 South East.
static DIR_S = _dir_int.DIR_S
 South.
static DIR_SW = _dir_int.DIR_SW
 South West.
static DIR_W = _dir_int.DIR_W
 West.
static DIR_NW = _dir_int.DIR_NW
 North West.
static DIR_FIRST = _dir_int.DIR_FIRST
 First Direction.
static DIR_LAST = _dir_int.DIR_LAST
 Last Direction.
static DIR_INVALID = _dir_int.DIR_INVALID
 Invalid Direction.
static TURN_45 = 1
 Used to turn dir 45 deg.
static TURN_90 = 2
 Used to turn dir 90 deg.
static OPPOSITE = 4
 Used to turn dir 180 deg.
static CLOCKWISE = 1
 Used to turn dir clock wise.
static ANTI_CLOCKWISE = -1
 Used to turn dir anti clockwise.

Detailed Description

Library class.

Member Function Documentation

static function Direction::GetAllDirsInRandomOrder ( )
inlinestatic

Get all 8 direction as AIList.

Parameters
dirdirection
Returns
AIList with all directions in random order
static function Direction::GetDiagonalDirsInRandomOrder ( )
inlinestatic

Get 4 main direction as AIList.

Parameters
dirdirection
Returns
AIList with all diagonal directions in random order
static function Direction::GetDirString ( dir  )
inlinestatic

Translates a direction value into a human readable string that can be used for logging.

Parameters
dirDirection
Returns
String of direction
static function Direction::GetMainDirsInRandomOrder ( )
inlinestatic

Get 4 main direction as AIList.

Parameters
dirdirection
Returns
AIList with all main directions in random order
static function Direction::IsDiagonalDir ( dir  )
inlinestatic

Check if dir is a diagonal direction (N, W, S or E)

Parameters
dirdirection
Returns
true if the direction is a diagonal direction
static function Direction::IsMainDir ( dir  )
inlinestatic

Check if dir is main direction (NW, SW, SE or NE)

Parameters
dirdirection
Returns
true if the direction is a main direction

The documentation for this class was generated from the following file: