Class GeometryHandler

java.lang.Object
com.ardorcraft.world.GeometryHandler

public final class GeometryHandler extends Object
This is the class that GeometryProducers use to set geometry into the world.
  • Method Details

    • setIndexCount

      public void setIndexCount(int count)
      Sets the index count.
      Parameters:
      count - the new index count
    • setVertexCount

      public void setVertexCount(int count)
      Sets the vertex count.
      Parameters:
      count - the new vertex count
    • getIndexCount

      public int getIndexCount()
      Gets the index count.
      Returns:
      the index count
    • getVertexCount

      public int getVertexCount()
      Gets the vertex count.
      Returns:
      the vertex count
    • hasVertices

      public boolean hasVertices()
      Checks for vertices.
      Returns:
      true, if successful
    • setVertex

      public void setVertex(int index, float x, float y, float z)
      Sets the vertex.
      Parameters:
      index - the index
      x - the x
      y - the y
      z - the z
    • hasTextureCoords

      public boolean hasTextureCoords()
      Checks for texture coords.
      Returns:
      true, if successful
    • setTextureCoord

      public void setTextureCoord(int index, float u, float v)
      Sets the texture coord.
      Parameters:
      index - the index
      u - the u
      v - the v
    • hasColors

      public boolean hasColors()
      Checks for colors.
      Returns:
      true, if successful
    • setColor

      public void setColor(int index, float globalLight, float localLight)
      Sets the color.
      Parameters:
      index - the index
      globalLight - the global light
      localLight - the local light
    • hasIndices

      public boolean hasIndices()
      Checks for indices.
      Returns:
      true, if successful
    • setIndex

      public void setIndex(int index, int value)
      Sets the index.
      Parameters:
      index - the index
      value - the value
    • getGlobalLighting

      public float getGlobalLighting(int x, int y, int z)
      Gets the global lighting.
      Parameters:
      x - the x
      y - the y
      z - the z
      Returns:
      the global lighting
    • getLocalLighting

      public float getLocalLighting(int x, int y, int z)
      Gets the local lighting.
      Parameters:
      x - the x
      y - the y
      z - the z
      Returns:
      the local lighting