|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.xith3d.scenegraph.SceneGraphObject
org.xith3d.scenegraph.NodeComponent
org.xith3d.scenegraph.Texture
public abstract class Texture
A Texture represents an image to be applied to a Shape3D's Appearance.
The renderer positiones the Texture on the Shape's Geometry according
to its texture coordinates.
One Texture instance can be reused for for an arbitrary number of Shapes.
| Nested Class Summary | |
|---|---|
static class |
Texture.MipmapMode
|
| Field Summary |
|---|
| Fields inherited from class org.xith3d.scenegraph.SceneGraphObject |
|---|
XITH3D_USERDATAKEY_OLDUSERDATA |
| Constructor Summary | |
|---|---|
Texture(org.jagatoo.opengl.enums.TextureType type,
org.jagatoo.opengl.enums.TextureFormat format)
Constructs a new Texture object. |
|
Texture(org.jagatoo.opengl.enums.TextureType type,
org.jagatoo.opengl.enums.TextureFormat format,
int boundaryWidth)
Constructs a new Texture object. |
|
| Method Summary | |
|---|---|
void |
addImage(org.jagatoo.loaders.textures.AbstractTextureImage image)
|
protected abstract void |
checkImageType(TextureImage image)
This method is called by setImage(int, TextureImage). |
protected void |
duplicateNodeComponent(NodeComponent original,
boolean forceDuplicate)
|
void |
enableAutoFreeLocalData()
This marks this Texture to free its local (RAM) texture-data after it has been sent to OpenGL. |
protected void |
finalize()
|
void |
freeOpenGLResources(CanvasPeer canvasPeer)
This method frees OpenGL resources (names) for all this NodeComponent and all child-components. |
org.openmali.vecmath2.Colorf |
getBoundaryColor()
Gets the boundary color. |
org.openmali.vecmath2.Colorf |
getBoundaryColor(org.openmali.vecmath2.Colorf c)
|
org.jagatoo.opengl.enums.TextureBoundaryMode |
getBoundaryModeS()
Gets the boundary mode S. |
org.jagatoo.opengl.enums.TextureBoundaryMode |
getBoundaryModeT()
Gets the boundary mode T. |
int |
getBoundaryWidth()
|
java.lang.String |
getCacheKey()
|
static org.jagatoo.opengl.enums.TextureFilter |
getDefaultFilter()
|
org.jagatoo.opengl.enums.TextureFilter |
getFilter()
|
org.jagatoo.opengl.enums.TextureFormat |
getFormat()
|
int |
getHeight()
|
TextureImage |
getImage(int level)
Gets the image for the specified mipmap level. |
int |
getImagesCount()
Get the number of elements in the images array. |
Texture.MipmapMode |
getMipMapMode()
Gets the mipmap mode for textuer mapping for this texture. |
SceneGraphOpenGLReferences |
getOpenGLReferences()
|
int |
getOriginalHeight()
|
org.openmali.types.twodee.Sized2iRO |
getOriginalSize()
|
int |
getOriginalWidth()
|
java.lang.String |
getResourceName()
|
org.openmali.types.twodee.Sized2iRO |
getSize()
|
long |
getStateId()
|
org.jagatoo.opengl.enums.TextureType |
getType()
|
int |
getWidth()
|
boolean |
hasSizeChanged()
|
boolean |
isDirty()
|
boolean |
isEnabled()
Is texture mapping enabled for this texture. |
boolean |
isMarkedAsLocalDataToBeFreed()
|
void |
removeFromCache()
Removes the Texture from the Cache, so that it can be deleted in OpenGL, if it is not used anymore anywhere else. |
void |
setBoundaryColor(org.openmali.vecmath2.Colorf color)
Sets the boundary color. |
void |
setBoundaryColor(float r,
float g,
float b,
float a)
|
void |
setBoundaryModeS(org.jagatoo.opengl.enums.TextureBoundaryMode mode)
Sets the boundary mode S. |
void |
setBoundaryModes(org.jagatoo.opengl.enums.TextureBoundaryMode modeS,
org.jagatoo.opengl.enums.TextureBoundaryMode modeT)
Sets the boundary modes S and T. |
void |
setBoundaryModeT(org.jagatoo.opengl.enums.TextureBoundaryMode mode)
Sets the boundary mode T. |
void |
setBoundaryWidth(int boundaryWidth)
|
void |
setCacheKey(java.lang.String cacheKey)
|
static void |
setDefaultFilter(org.jagatoo.opengl.enums.TextureFilter defaultFilter)
Sets the default filter for textures. |
void |
setEnabled(boolean enabled)
Enables disable texture mapping for this texture. |
void |
setFilter(org.jagatoo.opengl.enums.TextureFilter filter)
Sets the texture filter. |
void |
setImage(int level,
org.jagatoo.loaders.textures.AbstractTextureImage image)
|
void |
setImage(int level,
TextureImage image)
Sets the image data for a specified mipmap level. |
void |
setResourceName(java.lang.String resName)
|
void |
setSizeChanged()
|
java.lang.String |
toString()
|
| Methods inherited from class org.xith3d.scenegraph.NodeComponent |
|---|
cloneNodeComponent, freeOpenGLResources, getDuplicateOnCloneTree, getModListener, isChanged, isChanged2, setChanged, setDuplicateOnCloneTree, setModListener |
| Methods inherited from class org.xith3d.scenegraph.SceneGraphObject |
|---|
getName, getUserData, getUserData, getUserDataMap, isLive, setLive, setName, setUserData, setUserData, setUserDataRecursive, setUserDataRecursive |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.jagatoo.loaders.textures.AbstractTexture |
|---|
getName, setName |
| Constructor Detail |
|---|
public Texture(org.jagatoo.opengl.enums.TextureType type,
org.jagatoo.opengl.enums.TextureFormat format,
int boundaryWidth)
type - format - boundaryWidth -
public Texture(org.jagatoo.opengl.enums.TextureType type,
org.jagatoo.opengl.enums.TextureFormat format)
type - format - | Method Detail |
|---|
public final org.jagatoo.opengl.enums.TextureType getType()
getType in interface org.jagatoo.loaders.textures.AbstractTexturepublic final org.jagatoo.opengl.enums.TextureFormat getFormat()
getFormat in interface org.jagatoo.loaders.textures.AbstractTexturepublic void setEnabled(boolean enabled)
setEnabled in interface org.jagatoo.datatypes.Enableablepublic final boolean isEnabled()
isEnabled in interface org.jagatoo.datatypes.Enableablepublic final boolean isDirty()
protected abstract void checkImageType(TextureImage image)
setImage(int, TextureImage).
It checks the added image's type and throws an exception,
if the type is not accepted.
image -
public void setImage(int level,
TextureImage image)
public final void setImage(int level,
org.jagatoo.loaders.textures.AbstractTextureImage image)
setImage in interface org.jagatoo.loaders.textures.AbstractTexturepublic final void addImage(org.jagatoo.loaders.textures.AbstractTextureImage image)
public final TextureImage getImage(int level)
getImage in interface org.jagatoo.loaders.textures.AbstractTexturepublic final int getImagesCount()
getImagesCount in interface org.jagatoo.loaders.textures.AbstractTexturepublic final Texture.MipmapMode getMipMapMode()
public void setSizeChanged()
public final boolean hasSizeChanged()
public final org.openmali.types.twodee.Sized2iRO getSize()
public final int getWidth()
getWidth in interface org.jagatoo.loaders.textures.AbstractTexturepublic final int getHeight()
getHeight in interface org.jagatoo.loaders.textures.AbstractTexturepublic final org.openmali.types.twodee.Sized2iRO getOriginalSize()
public final int getOriginalWidth()
public final int getOriginalHeight()
public final void setBoundaryModeS(org.jagatoo.opengl.enums.TextureBoundaryMode mode)
mode - public final org.jagatoo.opengl.enums.TextureBoundaryMode getBoundaryModeS()
public final void setBoundaryModeT(org.jagatoo.opengl.enums.TextureBoundaryMode mode)
mode - public final org.jagatoo.opengl.enums.TextureBoundaryMode getBoundaryModeT()
public final void setBoundaryModes(org.jagatoo.opengl.enums.TextureBoundaryMode modeS,
org.jagatoo.opengl.enums.TextureBoundaryMode modeT)
modeS - modeT - public void setBoundaryColor(org.openmali.vecmath2.Colorf color)
public final void setBoundaryColor(float r,
float g,
float b,
float a)
public final org.openmali.vecmath2.Colorf getBoundaryColor()
public final org.openmali.vecmath2.Colorf getBoundaryColor(org.openmali.vecmath2.Colorf c)
public void setBoundaryWidth(int boundaryWidth)
public final int getBoundaryWidth()
public static void setDefaultFilter(org.jagatoo.opengl.enums.TextureFilter defaultFilter)
defaultFilter - public static org.jagatoo.opengl.enums.TextureFilter getDefaultFilter()
public final void setFilter(org.jagatoo.opengl.enums.TextureFilter filter)
public final org.jagatoo.opengl.enums.TextureFilter getFilter()
public final long getStateId()
protected void duplicateNodeComponent(NodeComponent original,
boolean forceDuplicate)
duplicateNodeComponent in class NodeComponentpublic void enableAutoFreeLocalData()
public final boolean isMarkedAsLocalDataToBeFreed()
public final SceneGraphOpenGLReferences getOpenGLReferences()
protected void finalize()
finalize in class java.lang.Objectpublic void freeOpenGLResources(CanvasPeer canvasPeer)
freeOpenGLResources in class NodeComponentpublic void setCacheKey(java.lang.String cacheKey)
setCacheKey in interface org.jagatoo.loaders.textures.AbstractTexturepublic final java.lang.String getCacheKey()
getCacheKey in interface org.jagatoo.loaders.textures.AbstractTexturepublic final void removeFromCache()
public void setResourceName(java.lang.String resName)
public final java.lang.String getResourceName()
public java.lang.String toString()
toString in class SceneGraphObject
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||