jme3tools.optimize
Class TextureAtlas.TextureAtlasTile

java.lang.Object
  extended by jme3tools.optimize.TextureAtlas.TextureAtlasTile
Enclosing class:
TextureAtlas

public class TextureAtlas.TextureAtlasTile
extends java.lang.Object


Constructor Summary
TextureAtlas.TextureAtlasTile(int x, int y, int width, int height)
           
 
Method Summary
 int getHeight()
           
 Vector2f getLocation(Vector2f previousLocation)
          Get the transformed texture coordinate for a given input location.
 int getWidth()
           
 int getX()
           
 int getY()
           
 void transformTextureCoords(java.nio.FloatBuffer inBuf, int offset, java.nio.FloatBuffer outBuf)
          Transforms a whole texture coordinates buffer.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TextureAtlas.TextureAtlasTile

public TextureAtlas.TextureAtlasTile(int x,
                                     int y,
                                     int width,
                                     int height)
Method Detail

getLocation

public Vector2f getLocation(Vector2f previousLocation)
Get the transformed texture coordinate for a given input location.

Parameters:
previousLocation - The old texture coordinate.
Returns:
The new texture coordinate inside the atlas.

transformTextureCoords

public void transformTextureCoords(java.nio.FloatBuffer inBuf,
                                   int offset,
                                   java.nio.FloatBuffer outBuf)
Transforms a whole texture coordinates buffer.

Parameters:
inBuf - The input texture buffer.
offset - The offset in the output buffer
outBuf - The output buffer.

getX

public int getX()

getY

public int getY()

getWidth

public int getWidth()

getHeight

public int getHeight()