|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.jme.scene.SceneElement
com.jme.scene.Spatial
com.jme.scene.Geometry
com.jme.scene.TriMesh
com.jme.scene.shape.Quad
com.jmex.bui.BImage
public class BImage
Contains a texture, its dimensions and a texture state.
| Nested Class Summary | |
|---|---|
static interface |
BImage.TexturePool
An interface for pooling OpenGL textures. |
| Field Summary | |
|---|---|
protected int |
_height
|
protected int |
_referents
|
protected static boolean |
_supportsNonPowerOfTwo
|
protected static BImage.TexturePool |
_texturePool
|
protected int |
_theight
|
protected TextureState |
_tstate
|
protected int |
_twidth
|
protected int |
_width
|
static AlphaState |
blendState
An alpha state that blends the source plus one minus destination. |
| Fields inherited from class com.jme.scene.Geometry |
|---|
batchList |
| Fields inherited from class com.jme.scene.Spatial |
|---|
geometricalControllers, localRotation, localScale, localTranslation, parent, worldRotation, worldScale, worldTranslation |
| Constructor Summary | |
|---|---|
|
BImage(Image image)
Creates an image from the supplied source AWT image. |
|
BImage(Image image,
boolean flip)
Creates an image from the supplied source AWT image. |
protected |
BImage(int width,
int height)
Helper constructor. |
|
BImage(int width,
int height,
Image image)
Creates an image of the specified size, using the supplied JME image data. |
|
BImage(URL image)
Creates an image from the supplied source URL. |
| Method Summary | |
|---|---|
protected void |
acquireTexture()
|
int |
getHeight()
Returns the height of this image. |
static BImage.TexturePool |
getTexturePool()
Returns a reference to the configured texture pool. |
int |
getWidth()
Returns the width of this image. |
static void |
makeTransparent(Spatial target)
Configures the supplied spatial with transparency in the standard user interface sense which is that transparent pixels show through to the background but non-transparent pixels are not blended with what is behind them. |
protected static int |
nextPOT(int value)
Rounds the supplied value up to a power of two. |
void |
reference()
Notes that something is referencing this image and will subsequently call render(com.jme.renderer.Renderer, int, int, float) to
render the image. |
void |
release()
Unbinds our underlying texture from OpenGL, removing the data from graphics memory. |
protected void |
releaseTexture()
|
void |
render(Renderer renderer,
int tx,
int ty,
float alpha)
Renders this image at the specified coordinates. |
void |
render(Renderer renderer,
int tx,
int ty,
int twidth,
int theight,
float alpha)
Renders this image at the specified coordinates, scaled to the specified size. |
void |
render(Renderer renderer,
int sx,
int sy,
int swidth,
int sheight,
int tx,
int ty,
float alpha)
Renders a region of this image at the specified coordinates. |
void |
render(Renderer renderer,
int sx,
int sy,
int swidth,
int sheight,
int tx,
int ty,
int twidth,
int theight,
float alpha)
Renders a region of this image at the specified coordinates, scaled to the specified size. |
void |
setImage(Image image)
Configures the image data to be used by this image. |
void |
setTextureCoords(int sx,
int sy,
int swidth,
int sheight)
Configures our texture coordinates to the specified subimage. |
static void |
setTexturePool(BImage.TexturePool pool)
Sets the texture pool from which to acquire and release OpenGL texture objects. |
void |
setTransparent(boolean transparent)
Configures this image to use transparency or not (true by default). |
| Methods inherited from class com.jme.scene.shape.Quad |
|---|
getCenter, initialize, resize |
| Methods inherited from class com.jme.scene.TriMesh |
|---|
clearBuffers, draw, findCollisions, findTriangleCollision, findTrianglePick, getBatch, getIndexBuffer, getMeshAsTriangles, getMeshAsTrianglesVertices, getTotalTriangles, getTriangle, getTriangle, getTriangle, getTriangle, getType, hasCollision, hasTriangleCollision, hasTriangleCollision, reconstruct, reconstruct, setIndexBuffer, setupBatchList, updateCollisionTree, updateCollisionTree |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface com.jme.util.export.Savable |
|---|
getClassTag |
| Field Detail |
|---|
public static AlphaState blendState
protected TextureState _tstate
protected int _width
protected int _height
protected int _twidth
protected int _theight
protected int _referents
protected static boolean _supportsNonPowerOfTwo
protected static BImage.TexturePool _texturePool
| Constructor Detail |
|---|
public BImage(URL image)
throws IOException
IOExceptionpublic BImage(Image image)
public BImage(Image image,
boolean flip)
public BImage(int width,
int height,
Image image)
width - the width of the renderable image.height - the height of the renderable image.image - the image data.
protected BImage(int width,
int height)
| Method Detail |
|---|
public static void makeTransparent(Spatial target)
public static void setTexturePool(BImage.TexturePool pool)
public static BImage.TexturePool getTexturePool()
public int getWidth()
public int getHeight()
public void setTransparent(boolean transparent)
public void setImage(Image image)
public void setTextureCoords(int sx,
int sy,
int swidth,
int sheight)
public void render(Renderer renderer,
int tx,
int ty,
float alpha)
public void render(Renderer renderer,
int tx,
int ty,
int twidth,
int theight,
float alpha)
public void render(Renderer renderer,
int sx,
int sy,
int swidth,
int sheight,
int tx,
int ty,
float alpha)
public void render(Renderer renderer,
int sx,
int sy,
int swidth,
int sheight,
int tx,
int ty,
int twidth,
int theight,
float alpha)
public void reference()
render(com.jme.renderer.Renderer, int, int, float) to
render the image. This must be paired with a call to release().
public void release()
protected void acquireTexture()
protected void releaseTexture()
protected static int nextPOT(int value)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||