Class Node


  • public class Node
    extends java.lang.Object
    • Constructor Summary

      Constructors 
      Constructor Description
      Node​(float nodeX, float nodeY)
      The class constructor.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int getIndex()
      Gets the index of this node.
      float getX()
      Gets the x coordinate of this node.
      float getY()
      Gets the y coordinate of this node.
      void render​(com.badlogic.gdx.graphics.glutils.ShapeRenderer shapeRenderer, com.badlogic.gdx.graphics.g2d.SpriteBatch batch, com.badlogic.gdx.graphics.g2d.BitmapFont font, boolean inPath)
      Renderer for the nodes, used for debugging purposes.
      void setIndex​(int newIndex)
      Setter for the index of the node, used for A* Indexed search.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Node

        public Node​(float nodeX,
                    float nodeY)
        The class constructor.
        Parameters:
        nodeX - The x coordinate for this Node.
        nodeY - The y coordinate for this Node.
    • Method Detail

      • setIndex

        public void setIndex​(int newIndex)
        Setter for the index of the node, used for A* Indexed search.
        Parameters:
        newIndex - The index to assign the node.
      • render

        public void render​(com.badlogic.gdx.graphics.glutils.ShapeRenderer shapeRenderer,
                           com.badlogic.gdx.graphics.g2d.SpriteBatch batch,
                           com.badlogic.gdx.graphics.g2d.BitmapFont font,
                           boolean inPath)
        Renderer for the nodes, used for debugging purposes.
        Parameters:
        shapeRenderer - The shape renderer being used.
        batch - The sprite batch being used.
        font - The font to use.
        inPath - Whether this node is in the path.
      • getIndex

        public int getIndex()
        Gets the index of this node.
        Returns:
        An int containing this node's index.
      • getX

        public float getX()
        Gets the x coordinate of this node.
        Returns:
        An int containing this node's x coordinate.
      • getY

        public float getY()
        Gets the y coordinate of this node.
        Returns:
        An int containing this node's y coordinate.