|
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.TextureCubicEnvironmentMap
public class TextureCubicEnvironmentMap
A specialist object that renders a cubic environment map from pre-built sources.
All textures must be square in size. If they are not square, then an error is generated.
This implementation does not handle dynamic cubic environment mapping, nor mipmaps.
| 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 |
protected int[] |
mpSourceIndices
The indices of the known MP sources |
static int |
NEGATIVE_X
The texture belongs to the negative X axis |
static int |
NEGATIVE_Y
The texture belongs to the negative Y axis |
static int |
NEGATIVE_Z
The texture belongs to the negative Z axis |
static int |
POSITIVE_X
The texture belongs to the positive X axis |
static int |
POSITIVE_Y
The texture belongs to the positive Y axis |
static int |
POSITIVE_Z
The texture belongs to the positive Z axis |
| 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 | |
|---|---|
TextureCubicEnvironmentMap()
Constructs a texture with default values. |
|
TextureCubicEnvironmentMap(TextureComponent2D[] srcImages)
Constructs a texture with the given list of sources. |
|
| 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 S 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 S 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 |
|---|
public static final int POSITIVE_X
public static final int NEGATIVE_X
public static final int POSITIVE_Y
public static final int NEGATIVE_Y
public static final int POSITIVE_Z
public static final int NEGATIVE_Z
protected int height
protected int boundaryModeT
protected int[] mpReadBuffer
protected int[][][] mpOffsets
protected int mpNumSources
protected int[] mpSourceIndices
| Constructor Detail |
|---|
public TextureCubicEnvironmentMap()
public TextureCubicEnvironmentMap(TextureComponent2D[] srcImages)
| 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 with
* @param x 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 data changed 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 with
public void setBoundaryModeT(int mode)
throws InvalidWriteTimingException
mode - The new mode.
InvalidWriteTimingException - An attempt was made to write outside
of the NodeUpdateListener data changed callback methodpublic int getBoundaryModeT()
public int getHeight()
public 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
|
Aviatrix3D 2.1.0 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||