Packagebe.dauntless.astar.basic2d.analyzers
Classpublic class HeightAnalyzer
InheritanceHeightAnalyzer Inheritance Analyzer Inheritance Object

The HeightAnalyzer allows the path to stay above or below certain heights or to have a minimum or maximum height difference between two tiles.



Protected Properties
 PropertyDefined By
 Inherited_subAnalyzer : Analyzer
Analyzer
Public Methods
 MethodDefined By
  
HeightAnalyzer(minHeight:Number, maxHeight:Number, minDiff:Number, maxDiff:Number)
Creates a new HeightAnalyzer
HeightAnalyzer
 Inherited
analyzeTile(mainTile:IAstarTile, req:PathRequest):Boolean
Used to validate a single tile.
Analyzer
  
Returns the maximum difference
HeightAnalyzer
  
getMaxHeight():Number
Returns the maximum height
HeightAnalyzer
  
Returns the minimum difference
HeightAnalyzer
  
getMinHeight():Number
Returns the minimum height
HeightAnalyzer
 Inherited
Removes an analyzer from the chain.
Analyzer
  
setMaxDifference(maxDifference:Number):void
Sets the maximum difference
HeightAnalyzer
  
setMaxHeight(maxHeight:Number):void
Sets the maximum height
HeightAnalyzer
  
setMinDifference(minDifference:Number):void
Sets the minimum difference
HeightAnalyzer
  
setMinHeight(minHeight:Number):void
Sets the minimum height
HeightAnalyzer
 Inherited
setSubAnalyzer(subAnalyzer:Analyzer):void
Chains the given subAnalyzer to this analyzer
Analyzer
 Inherited
subAnalyze(mainTile:DataTile, allNeighbours:Vector.<IAstarTile>, neighboursLeft:Vector.<IAstarTile>, req:PathRequest):Vector.<IAstarTile>
Manages the propper chaining of the subanalyzers.
Analyzer
 Inherited
subAnalyzeTile(mainTile:IAstarTile, req:PathRequest):Boolean
Analyzes if a single tile is valid.
Analyzer
Protected Methods
 MethodDefined By
  
analyze(mainTile:IAstarTile, allNeighbours:Vector.<IAstarTile>, neighboursLeft:Vector.<IAstarTile>, req:PathRequest):Vector.<IAstarTile>
[override]
HeightAnalyzer
 Inherited
Analyzer
Constructor Detail
HeightAnalyzer()Constructor
public function HeightAnalyzer(minHeight:Number, maxHeight:Number, minDiff:Number, maxDiff:Number)

Creates a new HeightAnalyzer

Parameters
minHeight:Number — The maximum height difference
 
maxHeight:Number — The minimum height difference
 
minDiff:Number — The minimum height
 
maxDiff:Number — The maximum height
Method Detail
analyze()method
override protected function analyze(mainTile:IAstarTile, allNeighbours:Vector.<IAstarTile>, neighboursLeft:Vector.<IAstarTile>, req:PathRequest):Vector.<IAstarTile>

Parameters

mainTile:IAstarTile
 
allNeighbours:Vector.<IAstarTile>
 
neighboursLeft:Vector.<IAstarTile>
 
req:PathRequest

Returns
Vector.<IAstarTile>
getMaxDifference()method 
public function getMaxDifference():Number

Returns the maximum difference

Returns
Number — The maximum difference
getMaxHeight()method 
public function getMaxHeight():Number

Returns the maximum height

Returns
Number — The maximum height
getMinDifference()method 
public function getMinDifference():Number

Returns the minimum difference

Returns
Number — The minimum difference
getMinHeight()method 
public function getMinHeight():Number

Returns the minimum height

Returns
Number — The minimum height
setMaxDifference()method 
public function setMaxDifference(maxDifference:Number):void

Sets the maximum difference

Parameters

maxDifference:Number — The maximum difference

setMaxHeight()method 
public function setMaxHeight(maxHeight:Number):void

Sets the maximum height

Parameters

maxHeight:Number — The maximum height

setMinDifference()method 
public function setMinDifference(minDifference:Number):void

Sets the minimum difference

Parameters

minDifference:Number — The minimum difference

setMinHeight()method 
public function setMinHeight(minHeight:Number):void

Sets the minimum height

Parameters

minHeight:Number — The minimum height