Aviatrix3D
2.1.0

org.j3d.aviatrix3d
Class ByteBufferTextureComponent2D

java.lang.Object
  extended by org.j3d.aviatrix3d.SceneGraphObject
      extended by org.j3d.aviatrix3d.NodeComponent
          extended by org.j3d.aviatrix3d.TextureComponent
              extended by org.j3d.aviatrix3d.TextureComponent2D
                  extended by org.j3d.aviatrix3d.ByteBufferTextureComponent2D
All Implemented Interfaces:
TextureSource

public class ByteBufferTextureComponent2D
extends TextureComponent2D

A Texture component that uses raw byte buffer data to be interpreted by the format IDs passed in.

Version:
$Revision: 2.2 $
Author:
Rex Melton

Field Summary
 
Fields inherited from class org.j3d.aviatrix3d.TextureComponent2D
height
 
Fields inherited from class org.j3d.aviatrix3d.TextureComponent
copyBuffer, data, format, invertY, numLevels, size, type, TYPE_BYTE, TYPE_INT, width
 
Fields inherited from class org.j3d.aviatrix3d.NodeComponent
lastParent, liveCount, parentList
 
Fields inherited from class org.j3d.aviatrix3d.SceneGraphObject
alive, LISTENER_SET_TIMING_ERR_PROP, updateHandler
 
Fields inherited from interface org.j3d.aviatrix3d.TextureSource
FORMAT_BGR, FORMAT_BGRA, FORMAT_INTENSITY_ALPHA, FORMAT_LUMINANCE_ALPHA, FORMAT_RGB, FORMAT_RGBA, FORMAT_SINGLE_COMPONENT
 
Constructor Summary
ByteBufferTextureComponent2D()
          Constructs an image with default values.
ByteBufferTextureComponent2D(int format, int width, int height, java.nio.ByteBuffer src)
          Constructs a TextureComponent2D using the specified format, width, height and ByteBuffer image.
ByteBufferTextureComponent2D(int format, int width, int height, java.nio.ByteBuffer[] src)
          Constructs a TextureComponent2D using the specified format, width, height and ByteBuffer images.
 
Method Summary
 void clearLocalData()
          Ignored.
protected  java.nio.ByteBuffer convertImage(int level)
          Return the ByteBuffer representation of the image.
 
Methods inherited from class org.j3d.aviatrix3d.TextureComponent2D
getHeight
 
Methods inherited from class org.j3d.aviatrix3d.TextureComponent
addUpdateListener, bytesPerPixel, checkCopyBufferSize, clearData, getData, getFormat, getNumLevels, getWidth, isYUp, removeUpdateListener, sendTextureUpdate
 
Methods inherited from class org.j3d.aviatrix3d.NodeComponent
addParent, getParents, numParents, removeParent
 
Methods inherited from class org.j3d.aviatrix3d.SceneGraphObject
checkForCyclicChild, checkForCyclicParent, dataChanged, getAppUpdateWriteTimingMessage, getBoundsWriteTimingMessage, getDataWriteTimingMessage, getUserData, isLive, setLive, setUpdateHandler, setUserData
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ByteBufferTextureComponent2D

public ByteBufferTextureComponent2D()
Constructs an image with default values.


ByteBufferTextureComponent2D

public ByteBufferTextureComponent2D(int format,
                                    int width,
                                    int height,
                                    java.nio.ByteBuffer src)
Constructs a TextureComponent2D using the specified format, width, height and ByteBuffer image.

Parameters:
format - The image format.
width - The width of the image
height - The height of the image
src - The image data

ByteBufferTextureComponent2D

public ByteBufferTextureComponent2D(int format,
                                    int width,
                                    int height,
                                    java.nio.ByteBuffer[] src)
Constructs a TextureComponent2D using the specified format, width, height and ByteBuffer images. Any images past the first are assumed to be mipmap levels.

Parameters:
format - The image format. RGB, RGBA currently
width - The width of the image
height - The height of the image
src - The image data
Method Detail

clearLocalData

public void clearLocalData()
Ignored. Clear local data stored in this node. Only data needed for OpenGL calls will be retained;

Specified by:
clearLocalData in class TextureComponent

convertImage

protected java.nio.ByteBuffer convertImage(int level)
Return the ByteBuffer representation of the image.

Specified by:
convertImage in class TextureComponent
Parameters:
level - The image level required
Returns:
a ByteBuffer

Aviatrix3D
2.1.0

Latest Info from http://aviatrix3d.j3d.org/
Copyright © 2003 - 2009 j3d.org