com.metsci.glimpse.support.texture
Class ByteTextureProjected2D

java.lang.Object
  extended by com.metsci.glimpse.support.texture.TextureProjected2D
      extended by com.metsci.glimpse.support.texture.ByteTextureProjected2D
All Implemented Interfaces:
DrawableTexture, Texture

public class ByteTextureProjected2D
extends TextureProjected2D

A texture class which stores 8 bit integer values (uncapped). Must be used with an OpenGL shader to translate values to colors.

Author:
ulman

Nested Class Summary
static interface ByteTextureProjected2D.MutatorByte2D
           
static class ByteTextureProjected2D.SetDataMutator
           
 
Field Summary
 
Fields inherited from class com.metsci.glimpse.support.texture.TextureProjected2D
BYTES_PER_FLOAT, NUM_DIMENSIONS, VERTICES_PER_QUAD
 
Constructor Summary
ByteTextureProjected2D(int dataSizeX, int dataSizeY)
           
ByteTextureProjected2D(int dataSizeX, int dataSizeY, boolean useVertexZCoord)
           
 
Method Summary
 void mutate(ByteTextureProjected2D.MutatorByte2D mutator)
          Provides a general, thread-safe mechanism for arbitrarily updating the data values for this Texture.
 void setData(byte[][] data)
          Updates this texture with new data values.
 void setData(byte[][] data, boolean flip)
           
 
Methods inherited from class com.metsci.glimpse.support.texture.TextureProjected2D
dispose, draw, getDataValue, getDataValue, getDimensionSize, getMaxGLTextureSize, getNumDimension, getProjection, isDirty, isResident, makeDirty, makeProjectionDirty, prepare, resize, setProjection
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ByteTextureProjected2D

public ByteTextureProjected2D(int dataSizeX,
                              int dataSizeY)

ByteTextureProjected2D

public ByteTextureProjected2D(int dataSizeX,
                              int dataSizeY,
                              boolean useVertexZCoord)
Method Detail

setData

public void setData(byte[][] data)
Updates this texture with new data values. The dimensions of the data array should be float[n0][n1] where n0 and n1 are the first and second arguments provided to resize( ) or to the Texture constructor.

Parameters:
data - the new data values to load into this texture.

setData

public void setData(byte[][] data,
                    boolean flip)

mutate

public void mutate(ByteTextureProjected2D.MutatorByte2D mutator)
Provides a general, thread-safe mechanism for arbitrarily updating the data values for this Texture. Modifications made to the FloatBuffer passed as an argument to the mutate( ) function will be reflected in the Texture data.

Parameters:
mutator - a class defining the operation which should be applied to the texture data.


Copyright © 2012 Metron, Inc.. All Rights Reserved.