com.triangularpixels.rebirth.geometry2d
Class AtlasArray<T>

java.lang.Object
  extended by com.triangularpixels.rebirth.geometry2d.AtlasArray<T>
Type Parameters:
T -

public class AtlasArray<T>
extends Object

An array of Atlases. Attempts to pack multiple rectangles into a series of atlases as efficiently as possible. Additional atlases are allocated as needed when a new rectangle cannot fit into any of the existing atlases.

Author:
John Campbell

Nested Class Summary
static class AtlasArray.Region
           
 
Constructor Summary
AtlasArray(int width, int height)
           
 
Method Summary
 int getHeight()
           
 int getWidth()
           
 AtlasArray.Region insert(int insertW, int insertH, T t)
           
 int numAtlases()
           
 void remove(T t)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AtlasArray

public AtlasArray(int width,
                  int height)
Method Detail

getWidth

public int getWidth()

getHeight

public int getHeight()

numAtlases

public int numAtlases()

insert

public AtlasArray.Region insert(int insertW,
                                int insertH,
                                T t)

remove

public void remove(T t)


Copyright © 2009 TriangularPixels.com. All Rights Reserved.