com.jme3.texture
クラス Image

java.lang.Object
  上位を拡張 com.jme3.renderer.GLObject
      上位を拡張 com.jme3.texture.Image
すべての実装されたインタフェース:
Savable, java.lang.Cloneable

public class Image
extends GLObject
implements Savable

Image defines a data format for a graphical image. The image is defined by a format, a height and width, and the image data. The width and height must be greater than 0. The data is contained in a byte buffer, and should be packed before creation of the image object.


入れ子のクラスの概要
static class Image.Format
           
 
クラス com.jme3.renderer.GLObject から継承された入れ子のクラス/インタフェース
GLObject.Type
 
コンストラクタの概要
Image()
          Constructor instantiates a new Image object.
Image(Image.Format format, int width, int height, java.nio.ByteBuffer data)
          Constructor instantiates a new Image object.
Image(Image.Format format, int width, int height, java.nio.ByteBuffer data, int[] mipMapSizes)
          Constructor instantiates a new Image object.
Image(Image.Format format, int width, int height, int depth, java.util.ArrayList<java.nio.ByteBuffer> data)
          Constructor instantiates a new Image object.
Image(Image.Format format, int width, int height, int depth, java.util.ArrayList<java.nio.ByteBuffer> data, int[] mipMapSizes)
          Constructor instantiates a new Image object.
 
メソッドの概要
 void addData(java.nio.ByteBuffer data)
           
 Image clone()
          This should create a deep clone.
 GLObject createDestructableClone()
          Creates a shallow clone of this GL Object.
 void deleteObject(Renderer r)
          Deletes the GL object from the GPU when it is no longer used.
 boolean equals(java.lang.Object other)
           
 java.util.List<java.nio.ByteBuffer> getData()
          getData returns the data for this image.
 java.nio.ByteBuffer getData(int index)
          getData returns the data for this image.
 int getDepth()
          getDepth returns the depth of this image (for 3d images).
 java.lang.Object getEfficentData()
           
 Image.Format getFormat()
          getFormat returns the image format for this image.
 int getHeight()
          getHeight returns the height of this image.
 int[] getMipMapSizes()
          Returns the mipmap sizes for this image.
 int getMultiSamples()
           
 int getWidth()
          getWidth returns the width of this image.
 int hashCode()
           
 boolean hasMipmaps()
          Returns whether the image data contains mipmaps.
 void read(JmeImporter e)
           
 void resetObject()
          Called when the GL context is restarted to reset all IDs.
 void setData(java.util.ArrayList<java.nio.ByteBuffer> data)
          setData sets the data that makes up the image.
 void setData(java.nio.ByteBuffer data)
          setData sets the data that makes up the image.
 void setData(int index, java.nio.ByteBuffer data)
           
 void setDepth(int depth)
          setDepth sets the depth value of the image.
 void setEfficentData(java.lang.Object efficientData)
          Set the efficient data representation of this image.
 void setFormat(Image.Format format)
          setFormat sets the image format for this image.
 void setHeight(int height)
          setHeight sets the height value of the image.
 void setMipMapSizes(int[] mipMapSizes)
          Sets the mipmap sizes stored in this image's data buffer.
 void setMultiSamples(int multiSamples)
           
 void setWidth(int width)
          setWidth sets the width value of the image.
 java.lang.String toString()
           
 void write(JmeExporter e)
           
 
クラス com.jme3.renderer.GLObject から継承されたメソッド
clearUpdateNeeded, getId, isUpdateNeeded, setId, setUpdateNeeded
 
クラス java.lang.Object から継承されたメソッド
getClass, notify, notifyAll, wait, wait, wait
 

コンストラクタの詳細

Image

public Image()
Constructor instantiates a new Image object. All values are undefined.


Image

public Image(Image.Format format,
             int width,
             int height,
             int depth,
             java.util.ArrayList<java.nio.ByteBuffer> data,
             int[] mipMapSizes)
Constructor instantiates a new Image object. The attributes of the image are defined during construction.

パラメータ:
format - the data format of the image.
width - the width of the image.
height - the height of the image.
data - the image data.
mipMapSizes - the array of mipmap sizes, or null for no mipmaps.

Image

public Image(Image.Format format,
             int width,
             int height,
             java.nio.ByteBuffer data,
             int[] mipMapSizes)
Constructor instantiates a new Image object. The attributes of the image are defined during construction.

パラメータ:
format - the data format of the image.
width - the width of the image.
height - the height of the image.
data - the image data.
mipMapSizes - the array of mipmap sizes, or null for no mipmaps.

Image

public Image(Image.Format format,
             int width,
             int height,
             int depth,
             java.util.ArrayList<java.nio.ByteBuffer> data)
Constructor instantiates a new Image object. The attributes of the image are defined during construction.

パラメータ:
type - the data format of the image.
width - the width of the image.
height - the height of the image.
data - the image data.

Image

public Image(Image.Format format,
             int width,
             int height,
             java.nio.ByteBuffer data)
Constructor instantiates a new Image object. The attributes of the image are defined during construction.

パラメータ:
type - the data format of the image.
width - the width of the image.
height - the height of the image.
data - the image data.
メソッドの詳細

resetObject

public void resetObject()
クラス GLObject の記述:
Called when the GL context is restarted to reset all IDs. Prevents "white textures" on display restart.

定義:
クラス GLObject 内の resetObject

deleteObject

public void deleteObject(Renderer r)
クラス GLObject の記述:
Deletes the GL object from the GPU when it is no longer used. Called automatically by the GL object manager.

定義:
クラス GLObject 内の deleteObject
パラメータ:
r - The renderer to be used to delete the object

createDestructableClone

public GLObject createDestructableClone()
クラス GLObject の記述:
Creates a shallow clone of this GL Object. The deleteObject method should be functional for this object.

定義:
クラス GLObject 内の createDestructableClone

clone

public Image clone()
クラス GLObject の記述:
This should create a deep clone. For a shallow clone, use createDestructableClone().

戻り値:
A shallow clone of this image. The data is not cloned.

getMultiSamples

public int getMultiSamples()
戻り値:
The number of samples (for multisampled textures).
関連項目:
setMultiSamples(int)

setMultiSamples

public void setMultiSamples(int multiSamples)
パラメータ:
multiSamples - Set the number of samples to use for this image, setting this to a value higher than 1 turns this image/texture into a multisample texture (on OpenGL3.1 and higher).

setData

public void setData(java.util.ArrayList<java.nio.ByteBuffer> data)
setData sets the data that makes up the image. This data is packed into an array of ByteBuffer objects.

パラメータ:
data - the data that contains the image information.

setData

public void setData(java.nio.ByteBuffer data)
setData sets the data that makes up the image. This data is packed into a single ByteBuffer.

パラメータ:
data - the data that contains the image information.

addData

public void addData(java.nio.ByteBuffer data)

setData

public void setData(int index,
                    java.nio.ByteBuffer data)

setEfficentData

public void setEfficentData(java.lang.Object efficientData)
Set the efficient data representation of this image.

Some system implementations are more efficient at operating on data other than ByteBuffers, in that case, this method can be used.

パラメータ:
efficentData -

getEfficentData

public java.lang.Object getEfficentData()
戻り値:
The efficient data representation of this image.
関連項目:
setEfficentData(java.lang.Object)

setMipMapSizes

public void setMipMapSizes(int[] mipMapSizes)
Sets the mipmap sizes stored in this image's data buffer. Mipmaps are stored sequentially, and the first mipmap is the main image data. To specify no mipmaps, pass null and this will automatically be expanded into a single mipmap of the full

パラメータ:
mipMapSizes - the mipmap sizes array, or null for a single image map.

setHeight

public void setHeight(int height)
setHeight sets the height value of the image. It is typically a good idea to try to keep this as a multiple of 2.

パラメータ:
height - the height of the image.

setDepth

public void setDepth(int depth)
setDepth sets the depth value of the image. It is typically a good idea to try to keep this as a multiple of 2. This is used for 3d images.

パラメータ:
depth - the depth of the image.

setWidth

public void setWidth(int width)
setWidth sets the width value of the image. It is typically a good idea to try to keep this as a multiple of 2.

パラメータ:
width - the width of the image.

setFormat

public void setFormat(Image.Format format)
setFormat sets the image format for this image.

パラメータ:
format - the image format.
例外:
java.lang.NullPointerException - if format is null
関連項目:
Image.Format

getFormat

public Image.Format getFormat()
getFormat returns the image format for this image.

戻り値:
the image format.
関連項目:
Image.Format

getWidth

public int getWidth()
getWidth returns the width of this image.

戻り値:
the width of this image.

getHeight

public int getHeight()
getHeight returns the height of this image.

戻り値:
the height of this image.

getDepth

public int getDepth()
getDepth returns the depth of this image (for 3d images).

戻り値:
the depth of this image.

getData

public java.util.List<java.nio.ByteBuffer> getData()
getData returns the data for this image. If the data is undefined, null will be returned.

戻り値:
the data for this image.

getData

public java.nio.ByteBuffer getData(int index)
getData returns the data for this image. If the data is undefined, null will be returned.

戻り値:
the data for this image.

hasMipmaps

public boolean hasMipmaps()
Returns whether the image data contains mipmaps.

戻り値:
true if the image data contains mipmaps, false if not.

getMipMapSizes

public int[] getMipMapSizes()
Returns the mipmap sizes for this image.

戻り値:
the mipmap sizes for this image.

toString

public java.lang.String toString()
オーバーライド:
クラス GLObject 内の toString

equals

public boolean equals(java.lang.Object other)
オーバーライド:
クラス java.lang.Object 内の equals

hashCode

public int hashCode()
オーバーライド:
クラス java.lang.Object 内の hashCode

write

public void write(JmeExporter e)
           throws java.io.IOException
定義:
インタフェース Savable 内の write
例外:
java.io.IOException

read

public void read(JmeImporter e)
          throws java.io.IOException
定義:
インタフェース Savable 内の read
例外:
java.io.IOException