Class RGBTextureProjected2D
- java.lang.Object
-
- com.metsci.glimpse.core.support.texture.TextureProjected2D
-
- com.metsci.glimpse.core.support.texture.RGBTextureProjected2D
-
- All Implemented Interfaces:
DrawableTexture
,Texture
public class RGBTextureProjected2D extends TextureProjected2D
A texture class which stores 3 channel RGB colors. Each color channel contains 8 bit values (capped from 0 to 255).- Author:
- oren
-
-
Field Summary
Fields Modifier and Type Field Description static int
BYTES_PER_PIXEL
-
Fields inherited from class com.metsci.glimpse.core.support.texture.TextureProjected2D
BYTES_PER_FLOAT, NUM_DIMENSIONS, VERTICES_PER_QUAD
-
-
Constructor Summary
Constructors Constructor Description RGBTextureProjected2D(int dataSizeX, int dataSizeY)
RGBTextureProjected2D(int dataSizeX, int dataSizeY, boolean useVertexZCoord)
RGBTextureProjected2D(BufferedImage img)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
mutate(ByteTextureProjected2D.MutatorByte2D mutator)
For modifying the byte buffer directly, pixels should be packed as RGB.void
setData(BufferedImage image)
void
setData(InputStream in)
-
Methods inherited from class com.metsci.glimpse.core.support.texture.TextureProjected2D
dispose, draw, draw, getDataValue, getDataValue, getDimensionSize, getHandles, getMaxGLTextureSize, getNumDimension, getProjection, isDirty, isResident, makeDirty, makeProjectionDirty, prepare, resize, setProjection
-
-
-
-
Field Detail
-
BYTES_PER_PIXEL
public static final int BYTES_PER_PIXEL
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
RGBTextureProjected2D
public RGBTextureProjected2D(BufferedImage img)
-
RGBTextureProjected2D
public RGBTextureProjected2D(int dataSizeX, int dataSizeY)
-
RGBTextureProjected2D
public RGBTextureProjected2D(int dataSizeX, int dataSizeY, boolean useVertexZCoord)
-
-
Method Detail
-
setData
public void setData(InputStream in) throws IOException
- Throws:
IOException
-
setData
public void setData(BufferedImage image)
-
mutate
public void mutate(ByteTextureProjected2D.MutatorByte2D mutator)
For modifying the byte buffer directly, pixels should be packed as RGB.- Parameters:
mutator
-
-
-