j3d.org Aviatrix3D

org.j3d.aviatrix3d
Class TexCoordGeneration

java.lang.Object
  extended byorg.j3d.aviatrix3d.SceneGraphObject
      extended byorg.j3d.aviatrix3d.NodeComponent
          extended byorg.j3d.aviatrix3d.TexCoordGeneration

public class TexCoordGeneration
extends NodeComponent

Describes a texture's automatic texture coordinate generation.

Texture modes here directly correspond to the OpenGL constants of the same type. Either are acceptable as parameters.

Version:
$Revision: 1.6 $
Author:
Justin Couch

Field Summary
static int MAP_EYE_LINEAR
          Generate coordinates in a simple linear fashion on the eye position
static int MAP_NORMALS
          Generate coordinates using the normals at the vertex.
static int MAP_OBJECT_LINEAR
          Generate coordinates in a simple linear fashion on the object
static int MAP_REFLECTIONS
          Generate coordinates using the normals at the vertex.
static int MAP_SPHERICAL
          Generate coordinates in a spherical shape for env mapping
static int MODE_EYE_PLANE
          Generate reference plane is relative to the eye position
static int MODE_GENERIC
          Coordinate reference plane is user defined
static int MODE_OBJECT_PLANE
          Generate reference plane is relative to the object
static int TEXTURE_Q
          Generate coordinates for a texture's Q coordinate
static int TEXTURE_R
          Generate coordinates for a texture's R coordinate
static int TEXTURE_S
          Generate coordinates for a texture's S coordinate
static int TEXTURE_T
          Generate coordinates for a texture's T coordinate
 
Fields inherited from class org.j3d.aviatrix3d.NodeComponent
liveCount
 
Fields inherited from class org.j3d.aviatrix3d.SceneGraphObject
alive, updateHandler, WRITE_TIMING_MSG
 
Constructor Summary
TexCoordGeneration()
          Constructs a TexCoordGeneration with default values, which is to say, do nothing.
TexCoordGeneration(int axis, int mode, int parameter, float[] value)
          Create automatic coordinate generation for one axis with the given set of abilities.
 
Method Summary
 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 setParameter(int axis, int mode, int parameter, float[] value)
          Setup one of the axis parameters.
 
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

TEXTURE_S

public static final int TEXTURE_S
Generate coordinates for a texture's S coordinate

See Also:
Constant Field Values

TEXTURE_T

public static final int TEXTURE_T
Generate coordinates for a texture's T coordinate

See Also:
Constant Field Values

TEXTURE_R

public static final int TEXTURE_R
Generate coordinates for a texture's R coordinate

See Also:
Constant Field Values

TEXTURE_Q

public static final int TEXTURE_Q
Generate coordinates for a texture's Q coordinate

See Also:
Constant Field Values

MODE_GENERIC

public static final int MODE_GENERIC
Coordinate reference plane is user defined

See Also:
Constant Field Values

MODE_OBJECT_PLANE

public static final int MODE_OBJECT_PLANE
Generate reference plane is relative to the object

See Also:
Constant Field Values

MODE_EYE_PLANE

public static final int MODE_EYE_PLANE
Generate reference plane is relative to the eye position

See Also:
Constant Field Values

MAP_OBJECT_LINEAR

public static final int MAP_OBJECT_LINEAR
Generate coordinates in a simple linear fashion on the object

See Also:
Constant Field Values

MAP_EYE_LINEAR

public static final int MAP_EYE_LINEAR
Generate coordinates in a simple linear fashion on the eye position

See Also:
Constant Field Values

MAP_SPHERICAL

public static final int MAP_SPHERICAL
Generate coordinates in a spherical shape for env mapping

See Also:
Constant Field Values

MAP_NORMALS

public static final int MAP_NORMALS
Generate coordinates using the normals at the vertex. Used principly by cubic environment mapping.

See Also:
Constant Field Values

MAP_REFLECTIONS

public static final int MAP_REFLECTIONS
Generate coordinates using the normals at the vertex. Used principly by cubic environment mapping.

See Also:
Constant Field Values
Constructor Detail

TexCoordGeneration

public TexCoordGeneration()
Constructs a TexCoordGeneration with default values, which is to say, do nothing.


TexCoordGeneration

public TexCoordGeneration(int axis,
                          int mode,
                          int parameter,
                          float[] value)
Create automatic coordinate generation for one axis with the given set of abilities.

Throws:
java.lang.IllegalArgumentException - Invalid axis, mode or parameter
Method Detail

setParameter

public void setParameter(int axis,
                         int mode,
                         int parameter,
                         float[] value)
                  throws InvalidWriteTimingException
Setup one of the axis parameters.

Throws:
InvalidWriteTimingException

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

j3d.org Aviatrix3D

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