|
Aviatrix3D 2.1.0 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.j3d.aviatrix3d.SceneGraphObject
org.j3d.aviatrix3d.NodeComponent
org.j3d.aviatrix3d.TextureComponent
org.j3d.aviatrix3d.TextureComponent3D
org.j3d.aviatrix3d.ByteTextureComponent3D
public class ByteTextureComponent3D
A texture component that wraps a 3D image described as a collection of bytes.
Byte array format
Images are presented in terms of bytes. Per pixel format is described by the
format
parameter that can be found on the various method calls.
Bytes are laid down in a single contiguous array for 3D images in the format
of width, height, depth. That is, all the bytes for the first row of the
first image, then the second row of the first image, etc until the first
depth layer is complete (depth 0), then the second image starts etc.
Unless the video hardware supports non-power-of-2 textures, the width and
height must be powers of 2 and the depth must be an even number.
Field Summary |
---|
Fields inherited from class org.j3d.aviatrix3d.TextureComponent3D |
---|
depth, 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 | |
---|---|
ByteTextureComponent3D()
Constructs an image with default values. |
|
ByteTextureComponent3D(boolean yUp)
Constructs an image with default values. |
|
ByteTextureComponent3D(int format,
int width,
int height,
int depth,
byte[] srcPixels)
Constructs an 3D texture component using the specified format, width, height and a single (BASE_LEVEL) mip-map image. |
|
ByteTextureComponent3D(int format,
int width,
int height,
int depth,
byte[][] srcPixels,
int numLevels)
Constructs an 3D texture component using the specified format, width, height and one or more mip-map levels. |
|
ByteTextureComponent3D(int format,
int width,
int height,
int depth,
byte[][] srcPixels,
int numLevels,
boolean yUp)
Constructs an Image3D using the specified format, width, height and rendered image. |
Method Summary | |
---|---|
void |
clearLocalData()
Clear local data stored in this node. |
protected java.nio.ByteBuffer |
convertImage(int level)
Convenience method to convert a buffered image into a NIO array of the corresponding type. |
int |
getDepth()
Get the current depth of the image component. |
void |
updateSubImage(int destX,
int destY,
int destZ,
int width,
int height,
int depth,
int level,
byte[] img)
Update a sub-section of the image data with the new pixel values. |
Methods inherited from class org.j3d.aviatrix3d.TextureComponent3D |
---|
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 |
---|
public ByteTextureComponent3D()
public ByteTextureComponent3D(boolean yUp)
yUp
- Change the image aroud the Y axis if neededpublic ByteTextureComponent3D(int format, int width, int height, int depth, byte[] srcPixels)
format
- The image format. RGB, RGBA currentlywidth
- The width of the imageheight
- The height of the imagesrcPixels
- The image data. See class header for format info.
java.lang.IllegalArgumentException
- Formats don't matchpublic ByteTextureComponent3D(int format, int width, int height, int depth, byte[][] srcPixels, int numLevels)
format
- The image format. RGB, RGBA currentlywidth
- The width of the imageheight
- The height of the imagesrcPixels
- The image data
java.lang.IllegalArgumentException
- Formats don't matchpublic ByteTextureComponent3D(int format, int width, int height, int depth, byte[][] srcPixels, int numLevels, boolean yUp)
format
- The image format. RGB, RGBA currentlywidth
- The width of the imageheight
- The height of the imagesrcPixels
- The image datayUp
- Change the image aroud the Y axis if needed
java.lang.IllegalArgumentException
- Formats don't matchMethod Detail |
---|
public void updateSubImage(int destX, int destY, int destZ, int width, int height, int depth, int level, byte[] img) throws InvalidWriteTimingException
destX
- The starting X offset in the existing image spacedestY
- The starting Y offset in the existing image spacedestZ
- The starting Z offset in the existing image spacewidth
- The width of the section to replaceheight
- The height of the section to replacedepth
- The height of the section to replacelevel
- The mipmap level to updateimg
- The image to take data from
InvalidWriteTimingException
- An attempt was made to write outside
of the NodeUpdateListener data changed callback methodpublic int getDepth()
getDepth
in class TextureComponent3D
public void clearLocalData()
clearLocalData
in class TextureComponent
protected java.nio.ByteBuffer convertImage(int level)
convertImage
in class TextureComponent
level
- Which image level needs to be converted
|
Aviatrix3D 2.1.0 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |