Aviatrix3D
2.1.0

org.j3d.aviatrix3d
Class Texture3D

java.lang.Object
  extended by org.j3d.aviatrix3d.SceneGraphObject
      extended by org.j3d.aviatrix3d.NodeComponent
          extended by org.j3d.aviatrix3d.Texture
              extended by org.j3d.aviatrix3d.Texture3D
All Implemented Interfaces:
java.lang.Comparable, DeletableRenderable, ObjectRenderable, Renderable, TransparentObjectRenderable, TransparentRenderable

public class Texture3D
extends Texture

Describes the 3D (volume) texture properties of an object.

Version:
$Revision: 1.36 $
Author:
Justin Couch

Field Summary
 
Fields inherited from class org.j3d.aviatrix3d.Texture
ANISOTROPIC_MODE_NONE, ANISOTROPIC_MODE_SINGLE, anisotropicDegree, anisotropicMode, BM_CLAMP, BM_CLAMP_TO_BOUNDARY, BM_CLAMP_TO_EDGE, BM_MIRRORED_REPEAT, BM_WRAP, borderColor, boundaryModeS, COMPARE_FUNCTION_GEQUAL, COMPARE_FUNCTION_LEQUAL, COMPARE_MODE_NONE, COMPARE_MODE_R2TEX, compareFunction, compareMode, depthComponentMode, format, FORMAT_ALPHA, FORMAT_DEPTH_COMPONENT, FORMAT_INTENSITY, FORMAT_INTENSITY_ALPHA, FORMAT_LUMINANCE, FORMAT_LUMINANCE_ALPHA, FORMAT_RGB, FORMAT_RGBA, GENERATE_MIPMAP, GENERATE_MIPMAP_DONT_CARE, GENERATE_MIPMAP_FASTEST, GENERATE_MIPMAP_HINT, GENERATE_MIPMAP_NICEST, generateMipMap, generateMipMapHint, imageChanged, magFilter, MAGFILTER_BASE_LEVEL_LINEAR, MAGFILTER_BASE_LEVEL_POINT, MAGFILTER_FASTEST, MAGFILTER_LINEAR_DETAIL, MAGFILTER_LINEAR_DETAIL_ALPHA, MAGFILTER_LINEAR_DETAIL_RGB, MAGFILTER_NICEST, minFilter, MINFILTER_BASE_LEVEL_LINEAR, MINFILTER_BASE_LEVEL_POINT, MINFILTER_FASTEST, MINFILTER_MULTI_LEVEL_LINEAR, MINFILTER_MULTI_LEVEL_POINT, MINFILTER_NICEST, mipMapMode, MODE_BASE_LEVEL, MODE_MIPMAP, numSources, priority, sources, stateChanged, textureIdMap, textureType, UPDATE_BUFFER_ALL, UPDATE_BUFFER_LAST, UPDATE_DISCARD_OVERWRITES, updateManagers, updateStrategy, 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
 
Constructor Summary
Texture3D()
          Constructs a texture with default values.
Texture3D(int format, TextureComponent3D singleImage)
          Constructs a texture using just a single image, thus setting it initially as MODE_BASE_LEVEL.
 
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 getBoundaryModeR()
          Get the current boundary handling for the R parameter.
 int getBoundaryModeT()
          Get the current boundary handling for the T parameter.
 int getDepth()
          Get the depth of the texture in pixels.
 int getHeight()
          Get the height of the texture in pixels.
 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 setBoundaryModeR(int mode)
          Set the boundary handling for the T parameter.
 void setBoundaryModeT(int mode)
          Set the boundary handling for the T parameter.
 void setSources(int mipMapMode, int format, TextureSource[] texSources, int num)
          Set a new collection of sources for this texture to use.
 
Methods inherited from class org.j3d.aviatrix3d.Texture
cleanup, compareTo, equals, getAnisotropicFilterDegree, getAnisotropicFilterMode, getBorderColor, getBoundaryModeS, getCompareFunction, getCompareMode, getDepthFormat, getFormat, getGenerateMipMap, getGenerateMipMapHint, getMagFilter, getMinFilter, getPriority, getTextureType, getUpdateStrategy, getWidth, hasTransparency, setAnisotropicFilterDegree, setAnisotropicFilterMode, setBorderColor, setBoundaryModeS, setCompareFunction, setCompareMode, setDepthFormat, setGenerateMipMap, setGenerateMipMapHint, setLive, setMagFilter, setMinFilter, setPriority, setUpdateHandler, setUpdateStrategy
 
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
 

Constructor Detail

Texture3D

public Texture3D()
Constructs a texture with default values.


Texture3D

public Texture3D(int format,
                 TextureComponent3D singleImage)
Constructs a texture using just a single image, thus setting it initially as MODE_BASE_LEVEL.

Method Detail

setSources

public void setSources(int mipMapMode,
                       int format,
                       TextureSource[] texSources,
                       int num)
                throws InvalidWriteTimingException
Set a new collection of sources for this texture to use.

Overrides:
setSources in class Texture
Parameters:
mipMapMode - Flag stating the type of texture mode to use
format - Image format to use for grayscale sources
texSources - The source data to use, single for base level
num - The valid number of sources to use from the array
Throws:
java.lang.IllegalArgumentException - Source must be 3D texture data
InvalidWriteTimingException - An attempt was made to write outside of the NodeUpdateListener callback method

compareTo

public int compareTo(Texture tex)
Compares this object with the specified object for order. Returns a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object. Derived instances should override this to add texture-specific extensions.

Overrides:
compareTo in class Texture
Parameters:
tex - The texture instance to be compared
Returns:
-1, 0 or 1 depending on order

equals

public boolean equals(Texture tex)
Compares this object with the specified object to check for equivalence.

Overrides:
equals in class Texture
Parameters:
tex - The texture instance to be compared
Returns:
true if the objects represent identical values

render

public void render(javax.media.opengl.GL gl)
Issue ogl commands needed for this component

Parameters:
gl - The gl context to draw with

postRender

public void postRender(javax.media.opengl.GL gl)
Restore all openGL state to the given drawable

Parameters:
gl - The gl context to draw with

setBoundaryModeR

public void setBoundaryModeR(int mode)
                      throws InvalidWriteTimingException
Set the boundary handling for the T parameter.

Parameters:
mode - The new mode.
Throws:
InvalidWriteTimingException - An attempt was made to write outside of the NodeUpdateListener data changed callback method

getBoundaryModeR

public int getBoundaryModeR()
Get the current boundary handling for the R parameter.

Returns:
The current mode.

setBoundaryModeT

public void setBoundaryModeT(int mode)
                      throws InvalidWriteTimingException
Set the boundary handling for the T parameter.

Parameters:
mode - The new mode.
Throws:
InvalidWriteTimingException - An attempt was made to write outside of the NodeUpdateListener data changed callback method

getBoundaryModeT

public int getBoundaryModeT()
Get the current boundary handling for the T parameter.

Returns:
The current mode.

getDepth

public int getDepth()
Get the depth of the texture in pixels. If no image is set, this returns -1.

Returns:
a number >= -1

getHeight

public int getHeight()
Get the height of the texture in pixels. If no image is set, this returns -1.

Returns:
a number >= -1

Aviatrix3D
2.1.0

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