|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.jme3.scene.Spatial
com.jme3.scene.Geometry
com.jme3.ui.Picture
public class Picture
A Picture
represents a 2D image drawn on the screen.
It can be used to represent sprites or other background elements.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class com.jme3.scene.Spatial |
---|
Spatial.BatchHint, Spatial.CullHint |
Field Summary |
---|
Fields inherited from class com.jme3.scene.Geometry |
---|
batchNode, cachedOffsetMat, cachedWorldMat, ignoreTransform, lodLevel, material, mesh, prevBatchTransforms, SAVABLE_VERSION, startIndex |
Fields inherited from class com.jme3.scene.Spatial |
---|
batchHint, controls, cullHint, frustrumIntersects, key, localLights, localTransform, name, parent, queueBucket, queueDistance, refreshFlags, RF_BOUND, RF_LIGHTLIST, RF_TRANSFORM, shadowMode, userData, worldBound, worldLights, worldTransform |
Constructor Summary | |
---|---|
Picture()
|
|
Picture(java.lang.String name)
Creates a named picture. |
|
Picture(java.lang.String name,
boolean flipY)
Create a named picture. |
Method Summary | |
---|---|
void |
setHeight(float height)
Set the height in pixels of the picture, if the height does not match the texture's height, then the texture will be scaled to fit the picture. |
void |
setImage(AssetManager assetManager,
java.lang.String imgName,
boolean useAlpha)
Set the image to put on the picture. |
void |
setPosition(float x,
float y)
Set the position of the picture in pixels. |
void |
setTexture(AssetManager assetManager,
Texture2D tex,
boolean useAlpha)
Set the texture to put on the picture. |
void |
setWidth(float width)
Set the width in pixels of the picture, if the width does not match the texture's width, then the texture will be scaled to fit the picture. |
Methods inherited from class com.jme3.scene.Geometry |
---|
batch, breadthFirstTraversal, clone, clone, collideWith, computeOffsetTransform, computeWorldMatrix, deepClone, depthFirstTraversal, getLodLevel, getMaterial, getMesh, getModelBound, getTriangleCount, getVertexCount, getWorldMatrix, isBatched, isIgnoreTransform, read, removeFromParent, setIgnoreTransform, setLodLevel, setMaterial, setMesh, setModelBound, setParent, unBatch, updateModelBound, updateWorldBound, updateWorldTransforms, write |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Picture(java.lang.String name, boolean flipY)
name
- the name of the picture in the scene graphflipY
- If true, the Y coordinates of the texture will be flipped.public Picture(java.lang.String name)
name
- the name of the picture in the scene graphpublic Picture()
Method Detail |
---|
public void setWidth(float width)
width
- the width to set.public void setHeight(float height)
height
- the height to set.public void setPosition(float x, float y)
x
- The x coordinatey
- The y coordinatepublic void setImage(AssetManager assetManager, java.lang.String imgName, boolean useAlpha)
assetManager
- The AssetManager
to use to load the image.imgName
- The image name.useAlpha
- If true, the picture will appear transparent and allow
objects behind it to appear through. If false, the transparent
portions will be the image's color at that pixel.public void setTexture(AssetManager assetManager, Texture2D tex, boolean useAlpha)
assetManager
- The AssetManager
to use to load the material.tex
- The textureuseAlpha
- If true, the picture will appear transparent and allow
objects behind it to appear through. If false, the transparent
portions will be the image's color at that pixel.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |