j3d.org Aviatrix3D

org.j3d.aviatrix3d
Class TextureCubicEnvironmentMap

java.lang.Object
  extended byorg.j3d.aviatrix3d.SceneGraphObject
      extended byorg.j3d.aviatrix3d.NodeComponent
          extended byorg.j3d.aviatrix3d.Texture
              extended byorg.j3d.aviatrix3d.TextureCubicEnvironmentMap
All Implemented Interfaces:
DeletableSceneGraphObject

public class TextureCubicEnvironmentMap
extends Texture

A specialist object that renders a cubic environment map from pre-built images.

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.

Version:
$Revision: 1.10 $
Author:
Justin Couch

Field Summary
protected  int boundaryModeT
          The boundary mode S value
protected  int height
          The height of the main texture.
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.Texture
ANISOTROPIC_MODE_NONE, ANISOTROPIC_MODE_SINGLE, anisotropicDegree, anisotropicMode, BM_CLAMP, BM_CLAMP_TO_BOUNDARY, BM_CLAMP_TO_EDGE, BM_WRAP, boundaryModeS, displayListMap, format, FORMAT_ALPHA, FORMAT_INTENSITY, FORMAT_INTENSITY_ALPHA, FORMAT_RGB, FORMAT_RGBA, images, 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, numImages, stateChanged, textureId, textureType, width
 
Fields inherited from class org.j3d.aviatrix3d.NodeComponent
liveCount
 
Fields inherited from class org.j3d.aviatrix3d.SceneGraphObject
alive, updateHandler, WRITE_TIMING_MSG
 
Constructor Summary
TextureCubicEnvironmentMap()
          Constructs a texture with default values.
TextureCubicEnvironmentMap(TextureComponent2D[] srcImages)
          Constructs a texture with the given list of images.
 
Method Summary
 int getBoundaryModeS()
          Get the current boundary handling for the S parameter.
 int getHeight()
          Get the height of the texture in pixels.
 void renderState(net.java.games.jogl.GL gl, net.java.games.jogl.GLU glu)
          Issue ogl commands needed for this component
 void restoreState(net.java.games.jogl.GL gl, net.java.games.jogl.GLU glu)
          Restore all openGL state to the given drawable
 void setBoundaryModeS(int mode)
          Set the boundary handling for the S parameter.
 
Methods inherited from class org.j3d.aviatrix3d.Texture
cleanup, getAnisotropicFilterDegree, getAnisotropicFilterMode, getFormat, getMagFilter, getMinFilter, getTextureType, getWidth, setAnisotropicFilterDegree, setAnisotropicFilterMode, setImages, setMagFilter, setMinFilter
 
Methods inherited from class org.j3d.aviatrix3d.NodeComponent
addParent, getParents, hasChanged, numParents, removeParent
 
Methods inherited from class org.j3d.aviatrix3d.SceneGraphObject
checkForCyclicChild, checkForCyclicParent, dataChanged, getUserData, isLive, setLive, setUpdateHandler, setUserData
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

POSITIVE_X

public static final int POSITIVE_X
The texture belongs to the positive X axis

See Also:
Constant Field Values

NEGATIVE_X

public static final int NEGATIVE_X
The texture belongs to the negative X axis

See Also:
Constant Field Values

POSITIVE_Y

public static final int POSITIVE_Y
The texture belongs to the positive Y axis

See Also:
Constant Field Values

NEGATIVE_Y

public static final int NEGATIVE_Y
The texture belongs to the negative Y axis

See Also:
Constant Field Values

POSITIVE_Z

public static final int POSITIVE_Z
The texture belongs to the positive Z axis

See Also:
Constant Field Values

NEGATIVE_Z

public static final int NEGATIVE_Z
The texture belongs to the negative Z axis

See Also:
Constant Field Values

height

protected int height
The height of the main texture.


boundaryModeT

protected int boundaryModeT
The boundary mode S value

Constructor Detail

TextureCubicEnvironmentMap

public TextureCubicEnvironmentMap()
Constructs a texture with default values.


TextureCubicEnvironmentMap

public TextureCubicEnvironmentMap(TextureComponent2D[] srcImages)
Constructs a texture with the given list of images. The provided array must be at least 6 items long, even if some are null. The order taken for the images must follow the constants defined for the image IDs. MipMaps are not handled in this case.

Method Detail

renderState

public void renderState(net.java.games.jogl.GL gl,
                        net.java.games.jogl.GLU glu)
Issue ogl commands needed for this component

Overrides:
renderState in class NodeComponent
Parameters:
gl - The gl context to draw with
glu - The utility context to draw with

restoreState

public void restoreState(net.java.games.jogl.GL gl,
                         net.java.games.jogl.GLU glu)
Restore all openGL state to the given drawable

Overrides:
restoreState in class NodeComponent
Parameters:
gl - The gl context to draw with
glu - The utility context to draw with

setBoundaryModeS

public void setBoundaryModeS(int mode)
                      throws InvalidWriteTimingException
Set the boundary handling for the S parameter.

Overrides:
setBoundaryModeS in class Texture
Parameters:
mode - The new mode.
Throws:
InvalidWriteTimingException - An attempt was made to write outside of the NodeUpdateListener callback method

getBoundaryModeS

public int getBoundaryModeS()
Get the current boundary handling for the S parameter.

Overrides:
getBoundaryModeS in class Texture
Returns:
The current mode.

getHeight

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

Returns:
a number >= -1

j3d.org Aviatrix3D

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