Class AStarNode
java.lang.Object
com.hypixel.hytale.server.npc.navigation.AStarNode
- All Implemented Interfaces:
IWaypoint
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidadjustOptimalPath(AStarNode parentNode, float deltaCost, int direction) advance(int skip) voidclose()floatintlongintgetSuccessor(int index) floatfloatinitAsInvalid(Vector3d position, long positionIndex) initAsStartNode(Vector3d position, long positionIndex, float cost, float estimateCost) initWithPredecessor(AStarNode predecessor, int directionIndex, Vector3d position, long positionIndex, int inverseDirectionIndex, float travelCost, float estimateCost) booleanbooleanisOpen()next()voidsetNextNode(AStarNode next, int length) voidsetSuccessor(int directionIndex, AStarNode node, int inverseDirectionIndex, float cost) toString()
-
Field Details
-
ENTRY_NODE_TAG
-
position
-
travelCost
protected float travelCost -
estimateToGoal
protected float estimateToGoal -
totalCost
protected float totalCost -
predecessor
-
predecessorDirection
protected int predecessorDirection -
successors
-
stepCost
@Nonnull protected final float[] stepCost -
nextPathNode
-
length
protected int length -
positionIndex
protected long positionIndex -
open
protected boolean open
-
-
Constructor Details
-
AStarNode
public AStarNode(int numDirections)
-
-
Method Details
-
getPositionIndex
public long getPositionIndex() -
getSuccessors
-
getSuccessor
-
getPredecessor
-
getNextPathNode
-
getTravelCost
public float getTravelCost() -
getEstimateToGoal
public float getEstimateToGoal() -
getTotalCost
public float getTotalCost() -
getPredecessorDirection
public int getPredecessorDirection() -
close
public void close() -
isOpen
public boolean isOpen() -
isInvalid
public boolean isInvalid() -
getLength
public int getLength() -
next
-
getPosition
- Specified by:
getPositionin interfaceIWaypoint
-
advance
-
initAsStartNode
-
initAsInvalid
-
toString
-