com.jme3.texture
Class TextureCubeMap

java.lang.Object
  extended by com.jme3.texture.Texture
      extended by com.jme3.texture.TextureCubeMap
All Implemented Interfaces:
CloneableSmartAsset, Savable, java.lang.Cloneable

public class TextureCubeMap
extends Texture

Describes a cubemap texture. The image specified by setImage must contain 6 data units, each data contains a 2D image representing a cube's face. The slices are specified in this order:

0 => Positive X (+x)
1 => Negative X (-x)
2 => Positive Y (+y)
3 => Negative Y (-y)
4 => Positive Z (+z)
5 => Negative Z (-z)


Nested Class Summary
static class TextureCubeMap.Face
          Face of the Cubemap as described by its directional offset from the origin.
 
Nested classes/interfaces inherited from class com.jme3.texture.Texture
Texture.MagFilter, Texture.MinFilter, Texture.ShadowCompareMode, Texture.Type, Texture.WrapAxis, Texture.WrapMode
 
Constructor Summary
TextureCubeMap()
           
TextureCubeMap(Image img)
           
TextureCubeMap(int width, int height, Image.Format format)
           
 
Method Summary
 Texture createSimpleClone()
           
 Texture createSimpleClone(Texture rVal)
          Retrieve a basic clone of this Texture (ie, clone everything but the image data, which is shared)
 boolean equals(java.lang.Object other)
           
 Texture.Type getType()
           
 Texture.WrapMode getWrap(Texture.WrapAxis axis)
          getWrap returns the wrap mode for a given coordinate axis on this texture.
 int hashCode()
           
 void read(JmeImporter e)
           
 void setWrap(Texture.WrapAxis axis, Texture.WrapMode mode)
          setWrap sets the wrap mode of this texture for a particular axis.
 void setWrap(Texture.WrapMode mode)
          setWrap sets the wrap mode of this texture for all axis.
 void write(JmeExporter e)
           
 
Methods inherited from class com.jme3.texture.Texture
clone, getAnisotropicFilter, getImage, getKey, getMagFilter, getMinFilter, getName, getShadowCompareMode, setAnisotropicFilter, setImage, setKey, setMagFilter, setMinFilter, setName, setShadowCompareMode, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TextureCubeMap

public TextureCubeMap()

TextureCubeMap

public TextureCubeMap(Image img)

TextureCubeMap

public TextureCubeMap(int width,
                      int height,
                      Image.Format format)
Method Detail

createSimpleClone

public Texture createSimpleClone()
Specified by:
createSimpleClone in class Texture

createSimpleClone

public Texture createSimpleClone(Texture rVal)
Description copied from class: Texture
Retrieve a basic clone of this Texture (ie, clone everything but the image data, which is shared)

Overrides:
createSimpleClone in class Texture
Returns:
Texture

setWrap

public void setWrap(Texture.WrapAxis axis,
                    Texture.WrapMode mode)
setWrap sets the wrap mode of this texture for a particular axis.

Specified by:
setWrap in class Texture
Parameters:
axis - the texture axis to define a wrapmode on.
mode - the wrap mode for the given axis of the texture.
Throws:
java.lang.IllegalArgumentException - if axis or mode are null

setWrap

public void setWrap(Texture.WrapMode mode)
setWrap sets the wrap mode of this texture for all axis.

Specified by:
setWrap in class Texture
Parameters:
mode - the wrap mode for the given axis of the texture.
Throws:
java.lang.IllegalArgumentException - if mode is null

getWrap

public Texture.WrapMode getWrap(Texture.WrapAxis axis)
getWrap returns the wrap mode for a given coordinate axis on this texture.

Specified by:
getWrap in class Texture
Parameters:
axis - the axis to return for
Returns:
the wrap mode of the texture.
Throws:
java.lang.IllegalArgumentException - if axis is null

getType

public Texture.Type getType()
Specified by:
getType in class Texture

equals

public boolean equals(java.lang.Object other)
Overrides:
equals in class Texture

hashCode

public int hashCode()
Overrides:
hashCode in class Texture

write

public void write(JmeExporter e)
           throws java.io.IOException
Specified by:
write in interface Savable
Overrides:
write in class Texture
Throws:
java.io.IOException

read

public void read(JmeImporter e)
          throws java.io.IOException
Specified by:
read in interface Savable
Overrides:
read in class Texture
Throws:
java.io.IOException