View Javadoc
1   package org.newdawn.slick.geom;
2   
3   import javax.annotation.Nonnull;
4   
5   /**
6    * A class capable of generating texture coordiantes based on
7    * rendering positions of vertices. This allows custom texturing
8    * of geometric shapes
9    * 
10   * @author kevin
11   */
12  public interface TexCoordGenerator {
13      /**
14       * Get the texture coordinate for a given render position
15       *
16       * @param x The x coordinate of the vertex being rendered
17       * @param y The y coordinate of the vertex being rendered
18       * @return The texture coordinate to apply
19       */
20      @Nonnull
21      public Vector2f getCoordFor(float x, float y);
22  }