package electrosphere.client.terrain.manager;

import electrosphere.client.terrain.cells.VoxelTextureAtlas;
import electrosphere.entity.types.terrain.TerrainChunkData;

/**
 * Represents an item in a queue of terrain chunks to have models generated in the main thread
 */
public class TerrainChunkGenQueueItem {
    
    //the data of the chunk (verts, normals, etc)
    TerrainChunkData data;
    //the hash promised to store the model under in asset manager
    String promisedHash;
    //the texture atlas
    VoxelTextureAtlas atlas;

    /**
     * Creates a queue item
     * @param data
     * @param promisedHash
     * @param atlas
     */
    public TerrainChunkGenQueueItem(TerrainChunkData data, String promisedHash, VoxelTextureAtlas atlas){
        this.data = data;
        this.promisedHash = promisedHash;
        this.atlas = atlas;
    }

    /**
     * Gets the mesh data for the chunk
     * @return the mesh data
     */
    public TerrainChunkData getData(){
        return data;
    }

    /**
     * Gets the hash promised for the chunk
     * @return the hash
     */
    public String getPromisedHash(){
        return this.promisedHash;
    }

    /**
     * Gets the texture atlas assigned to the chunk
     * @return the atlas
     */
    public VoxelTextureAtlas getAtlas(){
        return atlas;
    }

}
