|
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.Texture
org.j3d.aviatrix3d.Texture2D
public class Texture2D
Describes the 2D texture that can be applied to an object.
This texture supports using multipass rendering as a source. By default the read buffer is the back buffer. Copy offsets are set to zero.
For the purposes of state sorting, the multipass data is not considered.
| Field Summary | |
|---|---|
protected int |
boundaryModeT
The boundary mode S value |
protected int |
height
The height of the main texture. |
protected int |
mpNumSources
The current number of mp sources defined |
protected int[][] |
mpOffsets
The offset for the multipass copy update per-mipmap. |
protected int |
mpReadBuffer
The buffer that multipass source should read from |
| 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 |
| Constructor Summary | |
|---|---|
Texture2D()
Constructs a texture with default values. |
|
Texture2D(int format,
TextureComponent2D singleImage)
Constructs a texture using a single image. |
|
| Method Summary | |
|---|---|
int |
compareTo(Texture tex)
Compares this object with the specified object for order. |
boolean |
equals(Texture tex)
Compares this object with the specified object to check for equivalence. |
int |
getBoundaryModeT()
Get the current boundary handling for the T parameter. |
void |
getCopyOffset(int imgNum,
int level,
int[] offsets)
Get the current copy offset. |
int |
getHeight()
Get the height of the texture in pixels. |
void |
getMultipassSources(MultipassTextureSource[] sources,
int[] images)
Fetch all of the currently specified multipass texture sources in this instance of the class. |
int |
getReadBuffer(int imgNum)
Get the current read buffer that is being used. |
int |
numMultipassSources()
Check to see how many multipass texture sources are actually set for. |
void |
postRender(javax.media.opengl.GL gl)
Restore all openGL state to the given drawable |
void |
render(javax.media.opengl.GL gl)
Issue ogl commands needed for this component |
void |
setBoundaryModeT(int mode)
Set the boundary handling for the T parameter. |
void |
setCopyOffset(int imgNum,
int level,
int xoffset,
int yoffset)
Set the offsets in this texture to use for update the sub image update values. |
void |
setReadBuffer(int imgNum,
int buffer)
Set the buffer that this texture should read it's input from during the update callback. |
void |
setSources(int mipMapMode,
int format,
TextureSource[] texSources,
int num)
Set a new collection of sources for this texture to use. |
void |
updateMultipassSource(javax.media.opengl.GL gl,
int x,
int y,
int width,
int height,
int imgNum,
int level)
The multipass source has completed rendering and the implemented class should now copy the image data across now. |
| 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, setUserData |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected int boundaryModeT
protected int height
protected int mpReadBuffer
protected int[][] mpOffsets
protected int mpNumSources
| Constructor Detail |
|---|
public Texture2D()
public Texture2D(int format,
TextureComponent2D singleImage)
format - The format to render the single image assingleImage - The source image to use| Method Detail |
|---|
public int numMultipassSources()
numMultipassSources in interface MultipassTextureDestination
public void getMultipassSources(MultipassTextureSource[] sources,
int[] images)
numMultipassSources().
getMultipassSources in interface MultipassTextureDestinationsources - An array to copy the current sources intoimages - The indices of each of the source images
public void updateMultipassSource(javax.media.opengl.GL gl,
int x,
int y,
int width,
int height,
int imgNum,
int level)
updateMultipassSource in interface MultipassTextureDestinationgl - The gl context to draw withx - The x offset in pixels to start the copy fromy - The y offset in pixels to start the copy fromwidth - The width in pixels of the texture that was renderedheight - The height in pixels of the texture that was renderedimgNum - The index of the texture source to copy tolevel - The mipmap level that this corresponds to
public void setReadBuffer(int imgNum,
int buffer)
throws InvalidWriteTimingException
setReadBuffer in interface MultipassTextureDestinationimgNum - The index of the image that this offset applies tobuffer - The identifier of the buffer to read from
InvalidWriteTimingException - An attempt was made to write outside
of the NodeUpdateListener data changed callback methodpublic int getReadBuffer(int imgNum)
getReadBuffer in interface MultipassTextureDestinationimgNum - The index of the image that this offset applies to
public void setCopyOffset(int imgNum,
int level,
int xoffset,
int yoffset)
throws InvalidWriteTimingException
setCopyOffset in interface MultipassTextureDestinationimgNum - The index of the image that this offset applies toxoffset - The x offset in pixels to start the copy atyoffset - The y offset in pixels to start the copy atlevel - The mipmap level that this corresponds to
InvalidWriteTimingException - An attempt was made to write outside
of the NodeUpdateListener callback method
public void getCopyOffset(int imgNum,
int level,
int[] offsets)
getCopyOffset in interface MultipassTextureDestinationimgNum - The index of the image that this offset applies tolevel - The mipmap level that this corresponds tooffsets - An array to copy the values into
public void setSources(int mipMapMode,
int format,
TextureSource[] texSources,
int num)
throws InvalidWriteTimingException
setSources in class TexturemipMapMode - Flag stating the type of texture mode to useformat - Image format to use for grayscale sourcestexSources - The source data to use, single for base levelnum - The valid number of sources to use from the array
InvalidWriteTimingException - An attempt was made to write outside
of the NodeUpdateListener callback methodpublic void render(javax.media.opengl.GL gl)
render in interface ObjectRenderablegl - The gl context to draw withpublic void postRender(javax.media.opengl.GL gl)
postRender in interface ObjectRenderablegl - The gl context to draw withpublic int compareTo(Texture tex)
compareTo in class Texturetex - The texture instance to be compared
public boolean equals(Texture tex)
equals in class Texturetex - The texture instance to be compared
public void setBoundaryModeT(int mode)
throws InvalidWriteTimingException
mode - The new mode.
InvalidWriteTimingException - An attempt was made to write outside
of the NodeUpdateListener callback methodpublic int getBoundaryModeT()
public int getHeight()
|
Aviatrix3D 2.1.0 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||