|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.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. |
| Nested classes/interfaces inherited from class com.jme.scene.TriMesh |
|---|
com.jme.scene.TriMesh.Mode |
| Nested classes/interfaces inherited from class com.jme.scene.Spatial |
|---|
com.jme.scene.Spatial.CullHint, com.jme.scene.Spatial.LightCombineMode, com.jme.scene.Spatial.NormalsMode, com.jme.scene.Spatial.TextureCombineMode |
| Field Summary | |
|---|---|
protected int |
_height
|
protected int |
_referents
|
protected static boolean |
_supportsNonPowerOfTwo
|
protected static BImage.TexturePool |
_texturePool
|
protected int |
_theight
|
protected com.jme.scene.state.TextureState |
_tstate
|
protected int |
_twidth
|
protected int |
_width
|
static com.jme.scene.state.BlendState |
blendState
An blend state that blends the source plus one minus destination. |
| Fields inherited from class com.jme.scene.shape.Quad |
|---|
height, width |
| Fields inherited from class com.jme.scene.TriMesh |
|---|
indexBuffer, mode, triangleQuantity |
| Fields inherited from class com.jme.scene.Geometry |
|---|
binormalBuf, bound, castsShadows, colorBuf, compVect, defaultColor, displayListID, enabled, fogBuf, hasDirtyVertices, normBuf, states, tangentBuf, texBuf, vboInfo, vertBuf, vertQuantity |
| Fields inherited from class com.jme.scene.Spatial |
|---|
cullHint, frustrumIntersects, geometricalControllers, isCollidable, lightCombineMode, localRotation, localScale, localTranslation, LOCKED_BOUNDS, LOCKED_BRANCH, LOCKED_MESH_DATA, LOCKED_NONE, LOCKED_SHADOWS, LOCKED_TRANSFORMS, lockedMode, name, normalsMode, parent, queueDistance, renderQueueMode, renderStateList, textureCombineMode, worldBound, worldRotation, worldScale, worldTranslation, zOrder |
| Constructor Summary | |
|---|---|
|
BImage(java.awt.Image image)
Creates an image from the supplied source AWT image. |
|
BImage(java.awt.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,
com.jme.image.Image image)
Creates an image of the specified size, using the supplied JME image data. |
|
BImage(java.net.URL image)
Creates an image from the supplied source URL. |
| Method Summary | |
|---|---|
protected void |
acquireTexture()
|
java.lang.Class |
getClassTag()
|
int |
getImageHeight()
Returns the height of this image. |
int |
getImageWidth()
Returns the width of this image. |
static BImage.TexturePool |
getTexturePool()
Returns a reference to the configured texture pool. |
static void |
makeTransparent(com.jme.scene.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(com.jme.renderer.Renderer renderer,
int tx,
int ty,
float alpha)
Renders this image at the specified coordinates. |
void |
render(com.jme.renderer.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(com.jme.renderer.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(com.jme.renderer.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(com.jme.image.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, getHeight, getWidth, initialize, resize, updateGeometry |
| Methods inherited from class com.jme.scene.TriMesh |
|---|
clearBuffers, draw, findCollisions, findTriangleCollision, findTrianglePick, getIndexBuffer, getMaxIndex, getMeshAsTriangles, getMeshAsTrianglesVertices, getMode, getTriangle, getTriangle, getTriangleCount, getTriangleIndices, getVertIndex, hasCollision, hasTriangleCollision, randomPointOnTriangles, read, recalcTriangleQuantity, reconstruct, setIndexBuffer, setMode, setTriangleQuantity, write |
| Methods inherited from class com.jme.scene.Geometry |
|---|
addTextureCoordinates, addTextureCoordinates, applyRenderState, checkTextureCoordinates, clearTextureBuffers, copyTextureCoordinates, findPick, getBinormalBuffer, getColorBuffer, getDefaultColor, getDisplayListID, getFogBuffer, getLightState, getModelBound, getNormalBuffer, getNumberOfUnits, getTangentBuffer, getTextureCoords, getTextureCoords, getVBOInfo, getVertexBuffer, getVertexCount, getWorldCoords, getWorldNormals, hasDirtyVertices, isCastsShadows, lockMeshes, postdraw, predraw, randomVertex, reconstruct, resizeTextureIds, rotateNormals, rotatePoints, scaleTextureCoordinates, scaleTextureCoordinates, setBinormalBuffer, setCastsShadows, setColorBuffer, setDefaultColor, setDisplayListID, setFogCoordBuffer, setHasDirtyVertices, setLightState, setModelBound, setNormalBuffer, setRandomColors, setSolidColor, setTangentBuffer, setTextureCoords, setTextureCoords, setTextureCoords, setVBOInfo, setVertexBuffer, setVertexCount, sortLights, translatePoints, translatePoints, unlockMeshes, updateModelBound, updateWorldBound |
| Methods inherited from class com.jme.scene.Spatial |
|---|
addController, calculateCollisions, calculatePick, clearControllers, clearRenderState, clearRenderState, getController, getControllerCount, getControllers, getCullHint, getLastFrustumIntersection, getLightCombineMode, getLocalCullHint, getLocalLightCombineMode, getLocalNormalsMode, getLocalRenderQueueMode, getLocalRotation, getLocalScale, getLocalTextureCombineMode, getLocalToWorldMatrix, getLocalTranslation, getLocks, getName, getNormalsMode, getParent, getRenderQueueMode, getRenderState, getRenderState, getTextureCombineMode, getUserData, getWorldBound, getWorldRotation, getWorldScale, getWorldTranslation, getZOrder, hasAncestor, isCollidable, localToWorld, lock, lock, lockBounds, lockBranch, lockMeshes, lockShadows, lockTransforms, lookAt, onDraw, propagateBoundToRoot, propagateStatesFromRoot, removeController, removeController, removeFromParent, removeUserData, rotateUpTo, setCullHint, setIsCollidable, setLastFrustumIntersection, setLightCombineMode, setLocalRotation, setLocalRotation, setLocalScale, setLocalScale, setLocalTranslation, setLocalTranslation, setLocks, setLocks, setName, setNormalsMode, setParent, setRenderQueueMode, setRenderState, setTextureCombineMode, setUserData, setZOrder, setZOrder, toString, unlock, unlock, unlockBounds, unlockBranch, unlockMeshes, unlockShadows, unlockTransforms, updateGeometricState, updateRenderState, updateRenderState, updateWorldData, updateWorldRotation, updateWorldScale, updateWorldTranslation, updateWorldVectors, updateWorldVectors, worldToLocal |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static com.jme.scene.state.BlendState blendState
protected com.jme.scene.state.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(java.net.URL image)
throws java.io.IOException
image - URL
java.io.IOException - exceptionpublic BImage(java.awt.Image image)
image - Image
public BImage(java.awt.Image image,
boolean flip)
image - Imageflip - boolean
public BImage(int width,
int height,
com.jme.image.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)
width - intheight - int| Method Detail |
|---|
public java.lang.Class getClassTag()
getClassTag in interface com.jme.util.export.SavablegetClassTag in class com.jme.scene.Spatialpublic static void makeTransparent(com.jme.scene.Spatial target)
target - Spatialpublic static void setTexturePool(BImage.TexturePool pool)
pool - TexturePoolpublic static BImage.TexturePool getTexturePool()
public int getImageWidth()
public int getImageHeight()
public void setTransparent(boolean transparent)
transparent - booleanpublic void setImage(com.jme.image.Image image)
image - Image
public void setTextureCoords(int sx,
int sy,
int swidth,
int sheight)
sx - intsy - intswidth - intsheight - int
public void render(com.jme.renderer.Renderer renderer,
int tx,
int ty,
float alpha)
renderer - Renderertx - intty - intalpha - float
public void render(com.jme.renderer.Renderer renderer,
int tx,
int ty,
int twidth,
int theight,
float alpha)
renderer - Renderertx - intty - inttwidth - inttheight - intalpha - float
public void render(com.jme.renderer.Renderer renderer,
int sx,
int sy,
int swidth,
int sheight,
int tx,
int ty,
float alpha)
renderer - Renderersx - intsy - intswidth - intsheight - inttx - intty - intalpha - float
public void render(com.jme.renderer.Renderer renderer,
int sx,
int sy,
int swidth,
int sheight,
int tx,
int ty,
int twidth,
int theight,
float alpha)
renderer - Renderersx - intsy - intswidth - intsheight - inttx - intty - inttwidth - inttheight - intalpha - floatpublic 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)
value - int
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||