|
j3d.org Aviatrix3D | ||||||||||
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
Describes the basic textured appearance of an object.
This is the base class for all texture objects used in Aviatrix3D. It does not provide any functional capabilities, just a collection of the common constants and state. It provides abilities based on the minimal setup for a 1-dimensional texture. For settings for addtional dimensions (T and R) please visit the appropriate derived class.
All textures default to the following setup during the constructor call:
Field Summary | |
static int |
ANISOTROPIC_MODE_NONE
Disable anisotropic filtering |
static int |
ANISOTROPIC_MODE_SINGLE
Enable anisotropic filtering |
protected float |
anisotropicDegree
The Anisotropic Filtering Degree |
protected int |
anisotropicMode
The Anisotropic Filtering Mode |
static int |
BM_CLAMP
Boundary mode to clamp textures |
static int |
BM_CLAMP_TO_BOUNDARY
Boundary mode to clamp the texture border colour |
static int |
BM_CLAMP_TO_EDGE
Boundary mode to clamp the texture edge value without border |
static int |
BM_WRAP
Boundary mode to repeat textures |
protected int |
boundaryModeS
The boundary mode S value |
protected java.util.HashMap |
displayListMap
A mapping between glContext and displayListID(Integer) |
protected int |
format
The pixel format of the main texture image. |
static int |
FORMAT_ALPHA
Interpret the texture format as alpha only |
static int |
FORMAT_INTENSITY
Interpret the texture format as intensity only |
static int |
FORMAT_INTENSITY_ALPHA
Interpret the texture format as intensity-alpha |
static int |
FORMAT_RGB
Interpret the texture format as RGB |
static int |
FORMAT_RGBA
Interpret the texture format as RGBA |
protected TextureComponent[] |
images
The images defining this texture |
protected int |
magFilter
The magnification filter |
static int |
MAGFILTER_BASE_LEVEL_LINEAR
Set the maginification filter to linear filtering |
static int |
MAGFILTER_BASE_LEVEL_POINT
Set the maginification filter to base point-base filtering |
static int |
MAGFILTER_FASTEST
Set the maginification filter to the fastest option |
static int |
MAGFILTER_LINEAR_DETAIL
Set the maginfication filter to use the detail texture option |
static int |
MAGFILTER_LINEAR_DETAIL_ALPHA
Set the maginfication filter to use the detail texture's alpha values |
static int |
MAGFILTER_LINEAR_DETAIL_RGB
Set the maginfication filter to use the detail texture's RGB values |
static int |
MAGFILTER_NICEST
Set the maginification filter to the highest quality option |
protected int |
minFilter
The minification filter |
static int |
MINFILTER_BASE_LEVEL_LINEAR
Set the mininification filter to linear filtering |
static int |
MINFILTER_BASE_LEVEL_POINT
Set the mininification filter to base point-base filtering |
static int |
MINFILTER_FASTEST
Set the minification filter to the fastest option |
static int |
MINFILTER_MULTI_LEVEL_LINEAR
Set the mininification filter to linear filtering |
static int |
MINFILTER_MULTI_LEVEL_POINT
Set the mininification filter to base point-base filtering |
static int |
MINFILTER_NICEST
Set the mininification filter to the highest quality option |
protected int |
mipMapMode
The mipMapMode |
static int |
MODE_BASE_LEVEL
MipMapMode constants - No Mip Map |
static int |
MODE_MIPMAP
MipMapMode constants - Use Mip Maps |
protected int |
numImages
The number of valid items in the image array |
protected boolean |
stateChanged
Flag to say that the display lists must be cleared and regenerated because some state changed |
protected java.util.HashMap |
textureIdMap
The mapping of GL context to OpenGL texture ID |
protected int |
textureType
The GL type of the texture. |
protected int |
width
The width of the main texture. |
Fields inherited from class org.j3d.aviatrix3d.NodeComponent |
liveCount |
Fields inherited from class org.j3d.aviatrix3d.SceneGraphObject |
alive, updateHandler, WRITE_TIMING_MSG |
Constructor Summary | |
protected |
Texture(int type)
Constructs a texture with default values. |
Method Summary | |
void |
cleanup(net.java.games.jogl.GL gl,
net.java.games.jogl.GLU glu)
Cleanup the object now for the given GL context. |
int |
compareTo(java.lang.Object o)
Compares this object with the specified object for order. |
int |
compareTo(Texture tex)
Compares this object with the specified object for order. |
boolean |
equals(java.lang.Object o)
Compare this object for equality to the given object. |
boolean |
equals(Texture tex)
Compares this object with the specified object to check for equivalence. |
float |
getAnisotropicFilterDegree()
Get the current anisotropic filtering degree. |
int |
getAnisotropicFilterMode()
Get the current aniostropic filtering mode. |
int |
getBoundaryModeS()
Get the current boundary handling for the S parameter. |
int |
getFormat()
Get the format for this texture. |
int |
getMagFilter()
Get the magnification filtering mode. |
int |
getMinFilter()
Get the minification filtering mode. |
int |
getTextureType()
Get the texture type. |
int |
getWidth()
Get the width of the texture in pixels. |
void |
setAnisotropicFilterDegree(float degree)
Set the anisotropic filtering degree. |
void |
setAnisotropicFilterMode(int mode)
Set the aniostropic filtering mode. |
void |
setBoundaryModeS(int mode)
Set the boundary handling for the S parameter. |
void |
setImages(int mipMapMode,
int format,
TextureComponent[] srcImages,
int num)
Set the images for this texture |
protected void |
setLive(boolean state)
Notification that this object is live now. |
void |
setMagFilter(int mode)
Set the magnification filtering mode. |
void |
setMinFilter(int mode)
Set the magnification filtering mode. |
Methods inherited from class org.j3d.aviatrix3d.NodeComponent |
addParent, getParents, hasChanged, numParents, removeParent, renderState, restoreState |
Methods inherited from class org.j3d.aviatrix3d.SceneGraphObject |
checkForCyclicChild, checkForCyclicParent, dataChanged, getUserData, isLive, setUpdateHandler, setUserData |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int MODE_BASE_LEVEL
public static final int MODE_MIPMAP
public static final int BM_WRAP
public static final int BM_CLAMP
public static final int BM_CLAMP_TO_EDGE
public static final int BM_CLAMP_TO_BOUNDARY
public static final int MAGFILTER_FASTEST
public static final int MAGFILTER_NICEST
public static final int MAGFILTER_BASE_LEVEL_POINT
public static final int MAGFILTER_BASE_LEVEL_LINEAR
public static final int MAGFILTER_LINEAR_DETAIL
public static final int MAGFILTER_LINEAR_DETAIL_RGB
public static final int MAGFILTER_LINEAR_DETAIL_ALPHA
public static final int MINFILTER_FASTEST
public static final int MINFILTER_NICEST
public static final int MINFILTER_BASE_LEVEL_POINT
public static final int MINFILTER_BASE_LEVEL_LINEAR
public static final int MINFILTER_MULTI_LEVEL_POINT
public static final int MINFILTER_MULTI_LEVEL_LINEAR
public static final int ANISOTROPIC_MODE_NONE
public static final int ANISOTROPIC_MODE_SINGLE
public static final int FORMAT_ALPHA
public static final int FORMAT_INTENSITY
public static final int FORMAT_INTENSITY_ALPHA
public static final int FORMAT_RGB
public static final int FORMAT_RGBA
protected TextureComponent[] images
protected int numImages
protected int anisotropicMode
protected float anisotropicDegree
protected int magFilter
protected int minFilter
protected int boundaryModeS
protected int mipMapMode
protected int width
protected int format
protected boolean stateChanged
protected java.util.HashMap displayListMap
protected final int textureType
protected java.util.HashMap textureIdMap
Constructor Detail |
protected Texture(int type)
type
- One of the texture type constantsMethod Detail |
protected void setLive(boolean state)
setLive
in class SceneGraphObject
state
- true if this should be marked as live nowpublic void cleanup(net.java.games.jogl.GL gl, net.java.games.jogl.GLU glu)
cleanup
in interface DeletableSceneGraphObject
gl
- The gl context to draw withglu
- The utility context to draw withpublic int compareTo(java.lang.Object o) throws java.lang.ClassCastException
compareTo
in interface java.lang.Comparable
o
- The object to be compared
java.lang.ClassCastException
- The specified object's type prevents it from
being compared to this Objectpublic boolean equals(java.lang.Object o)
o
- The object to be compared
public void setImages(int mipMapMode, int format, TextureComponent[] srcImages, int num) throws InvalidWriteTimingException
mipMapMode
- Flag stating the type of texture mode to useformat
- Image format to use for grayscale imagessrcImages
- The image data to use, single for base levelnum
- The valid number of images to use from the array
InvalidWriteTimingException
- An attempt was made to write outside
of the NodeUpdateListener callback methodpublic int getTextureType()
public int getFormat()
public int getWidth()
public void setAnisotropicFilterMode(int mode) throws InvalidWriteTimingException
mode
- The new mode.
InvalidWriteTimingException
- An attempt was made to write outside
of the NodeUpdateListener callback methodpublic int getAnisotropicFilterMode()
public void setAnisotropicFilterDegree(float degree) throws InvalidWriteTimingException
degree
- The filtering degree. 1.0 is the default.
InvalidWriteTimingException
- An attempt was made to write outside
of the NodeUpdateListener callback methodpublic float getAnisotropicFilterDegree()
public void setMagFilter(int mode) throws InvalidWriteTimingException
mode
- The new mode.
InvalidWriteTimingException
public int getMagFilter()
public void setMinFilter(int mode) throws InvalidWriteTimingException
mode
- The new mode.
InvalidWriteTimingException
- An attempt was made to write outside
of the NodeUpdateListener callback methodpublic int getMinFilter()
public void setBoundaryModeS(int mode) throws InvalidWriteTimingException
mode
- The new mode.
InvalidWriteTimingException
- An attempt was made to write outside
of the NodeUpdateListener callback methodpublic int getBoundaryModeS()
public int compareTo(Texture tex)
tex
- The texture instance to be compared
public boolean equals(Texture tex)
tex
- The texture instance to be compared
|
j3d.org Aviatrix3D | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |