本文整理汇总了Java中com.jme3.ui.Picture类的典型用法代码示例。如果您正苦于以下问题:Java Picture类的具体用法?Java Picture怎么用?Java Picture使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Picture类属于com.jme3.ui包,在下文中一共展示了Picture类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: simpleInitApp
import com.jme3.ui.Picture; //导入依赖的package包/类
public void simpleInitApp() {
Picture p = new Picture("Picture1");
p.move(0,0,-1);
p.setPosition(100, 100);
p.setWidth(100);
p.setHeight(100);
p.setImage(assetManager, "Interface/Logo/Monkey.png", false);
guiNode.attachChild(p);
Picture p2 = new Picture("Picture2");
p2.move(0,0,1.001f);
p2.setPosition(150, 150);
p2.setWidth(100);
p2.setHeight(100);
p2.setImage(assetManager, "Interface/Logo/Monkey.png", false);
guiNode.attachChild(p2);
}
示例2: createDisplayQuad
import com.jme3.ui.Picture; //导入依赖的package包/类
public Picture createDisplayQuad(/*int mode, Texture tex*/){
if (scene64 == null)
return null;
Material mat = new Material(manager, "Common/MatDefs/Hdr/LogLum.j3md");
// if (mode == LUMMODE_ENCODE_LUM)
// mat.setBoolean("EncodeLum", true);
// else if (mode == LUMMODE_DECODE_LUM)
mat.setBoolean("DecodeLum", true);
mat.setTexture("Texture", scene64);
// mat.setTexture("Texture", tex);
Picture dispQuad = new Picture("Luminance Display");
dispQuad.setMaterial(mat);
return dispQuad;
}
示例3: initialize
import com.jme3.ui.Picture; //导入依赖的package包/类
public void initialize(RenderManager rm, ViewPort vp) {
renderManager = rm;
renderer = rm.getRenderer();
viewPort = vp;
fsQuad = new Picture("filter full screen quad");
Camera cam = vp.getCamera();
//save view port diensions
left = cam.getViewPortLeft();
right = cam.getViewPortRight();
top = cam.getViewPortTop();
bottom = cam.getViewPortBottom();
originalWidth = cam.getWidth();
originalHeight = cam.getHeight();
//first call to reshape
reshape(vp, cam.getWidth(), cam.getHeight());
}
示例4: initialize
import com.jme3.ui.Picture; //导入依赖的package包/类
public void initialize(RenderManager rm, ViewPort vp) {
this.rm = rm;
this.vp = vp;
loadTextures(manager);
createTextures();
applyTextures(material);
createPreViews();
material.setVector2("FrustumNearFar", new Vector2f(vp.getCamera().getFrustumNear(), vp.getCamera().getFrustumFar()));
if (debug) {
dispRefraction = new Picture("dispRefraction");
dispRefraction.setTexture(manager, refractionTexture, false);
dispReflection = new Picture("dispRefraction");
dispReflection.setTexture(manager, reflectionTexture, false);
dispDepth = new Picture("depthTexture");
dispDepth.setTexture(manager, depthTexture, false);
}
}
示例5: BusySpinner
import com.jme3.ui.Picture; //导入依赖的package包/类
public BusySpinner(BaseScreen screen, Size size) {
super(screen, size);
Element el = new Element(screen).addStyleClass("busy-spinner");
Picture p = new Picture("busy");
Material mat = el.getMaterial().clone();
if (size == null) {
size = new Size(el.calcPreferredSize());
}
setMinDimensions(size);
setPreferredDimensions(size);
setMaxDimensions(size);
p.setMaterial(mat);
p.setWidth(size.x);
p.setHeight(size.y);
this.p = p;
attachChild(p);
}
示例6: createSheet
import com.jme3.ui.Picture; //导入依赖的package包/类
@Override
protected Sheet createSheet() {
//TODO: multithreading..
Sheet sheet = super.createSheet();
Sheet.Set set = Sheet.createPropertiesSet();
set.setDisplayName("Picture");
set.setName(Picture.class.getName());
Picture obj = geom;//getLookup().lookup(Spatial.class);
if (obj == null) {
return sheet;
}
// set.put(makeProperty(obj, String.class, "getText", "setText", "text"));
sheet.put(set);
return sheet;
}
示例7: initialize
import com.jme3.ui.Picture; //导入依赖的package包/类
@Override
public void initialize(AppStateManager stateManager, Application app) {
super.initialize(stateManager, app);
this.app = app;
if (assetManager == null) {
assetManager = app.getAssetManager();
}
if (guiNode == null && app instanceof SimpleApplication) {
guiNode = ((SimpleApplication) app).getGuiNode();
}
if (guiNode == null || assetManager == null) {
throw new NullPointerException("guiNode or assetManager not specified!");
}
splash = new Picture("Splash Image");
splash.setImage(assetManager, pictureLocation, false);
guiNode.attachChild(splash);
}
示例8: simpleInitApp
import com.jme3.ui.Picture; //导入依赖的package包/类
@Override
public void simpleInitApp() {
FLACLoader.init(assetManager);
AudioNode test_flac =new AudioNode(assetManager,"publicdomain.tropicx.flac",DataType.Buffer);
test_flac.setPositional(false);
test_flac.setLooping(true);
test_flac.setVolume(1f);
rootNode.attachChild(test_flac);
test_flac.play();
Picture pc=new Picture("bg");
pc.setImage(assetManager,"publicdomain.sunsetintheswamp.png",false);
pc.setHeight(settings.getHeight());
pc.setWidth(settings.getWidth());
pc.setPosition(0,0);
guiNode.attachChild(pc);
}
示例9: initGuiElements
import com.jme3.ui.Picture; //导入依赖的package包/类
private void initGuiElements()
{
spiderInfo = new Picture("spiderInfo");
spiderInfo.setImage(simpleApp.getAssetManager(), "Interface/spiderInfo.png", true);
spiderInfo.setWidth(796);
spiderInfo.setHeight(94);
spiderInfo.move(270, 50, -1);
ghostInfo = new Picture("ghostInfo");
ghostInfo.setImage(simpleApp.getAssetManager(), "Interface/ghostInfo.png", true);
ghostInfo.setWidth(796);
ghostInfo.setHeight(94);
ghostInfo.move(270, 50, -1);
inventoryBackground = new Picture("inventoryBackground");
inventoryBackground.setImage(simpleApp.getAssetManager(), "Interface/inventoryBackground.png", true);
inventoryBackground.setWidth(798);
inventoryBackground.setHeight(500);
inventoryBackground.move(270, 50, -1);
exit = new Picture("exit");
exit.setImage(simpleApp.getAssetManager(), "Interface/exitMenu.png", true);
exit.setWidth(1000);
exit.setHeight(499);
exit.move(160, 500, -1);
}
示例10: addInventoryOptions
import com.jme3.ui.Picture; //导入依赖的package包/类
private void addInventoryOptions()
{
for (int i = 0; i < optionNames.length; i++)
{
Picture option = new Picture(optionNames[i]);
option.setImage(simpleApp.getAssetManager(),
"Interface/" + optionNames[i] + ".png",
true);
option.setWidth(78);
option.setHeight(247);
option.move(370 + 250*i, 175, 0);
simpleApp.getGuiNode().attachChild(option);
}
/* Highlight first option */
highlightInventoryOption("laserTower");
}
示例11: showBudget
import com.jme3.ui.Picture; //导入依赖的package包/类
private void showBudget()
{
Picture budgetIcon = new Picture("budgetIcon");
budgetIcon.setImage(simpleApp.getAssetManager(), "Interface/budget.png", true);
budgetIcon.setWidth(64);
budgetIcon.setHeight(64);
budgetIcon.move(15, 40, 0);
simpleApp.getGuiNode().attachChild(budgetIcon);
BitmapFont myFont = simpleApp.getAssetManager().loadFont("Interface/Fonts/PoorRichardBig.fnt");
BitmapText budgetText = new BitmapText(myFont);
budgetText.setName("budgetText");
budgetText.setSize(myFont.getCharSet().getRenderedSize());
budgetText.setText(Integer.toString(currentGameState.getBudget()));
budgetText.move(92, 86, 0);
simpleApp.getGuiNode().attachChild(budgetText);
}
示例12: initialize
import com.jme3.ui.Picture; //导入依赖的package包/类
public void initialize(RenderManager rm, ViewPort vp) {
renderManager = rm;
renderer = rm.getRenderer();
viewPort = vp;
fsQuad = new Picture("filter full screen quad");
Camera cam = vp.getCamera();
//save view port diensions
left = cam.getViewPortLeft();
right = cam.getViewPortRight();
top = cam.getViewPortTop();
bottom = cam.getViewPortBottom();
originalWidth = cam.getWidth();
originalHeight = cam.getHeight();
//first call to reshape
reshape(vp, cam.getWidth(), cam.getHeight());
}
示例13: simpleInitApp
import com.jme3.ui.Picture; //导入依赖的package包/类
@Override
public void simpleInitApp() {
int w = settings.getWidth();
int h = settings.getHeight();
//setup framebuffer
fb = new FrameBuffer(w, h, 1);
Texture2D fbTex = new Texture2D(w, h, Format.RGBA8);
fb.setDepthBuffer(Format.Depth);
fb.setColorTexture(fbTex);
// setup framebuffer's scene
Sphere sphMesh = new Sphere(20, 20, 1);
Material solidColor = assetManager.loadMaterial("Common/Materials/RedColor.j3m");
Geometry sphere = new Geometry("sphere", sphMesh);
sphere.setMaterial(solidColor);
fbNode.attachChild(sphere);
//setup main scene
Picture p = new Picture("Picture");
p.setPosition(0, 0);
p.setWidth(w);
p.setHeight(h);
p.setTexture(assetManager, fbTex, false);
rootNode.attachChild(p);
}
示例14: simpleInitApp
import com.jme3.ui.Picture; //导入依赖的package包/类
@Override
public void simpleInitApp() {
flyCam.setEnabled(false);
// inputManager.setCursorVisible(false);
Texture tex = assetManager.loadTexture("Interface/Logo/Cursor.png");
cursor = new Picture("cursor");
cursor.setTexture(assetManager, (Texture2D) tex, true);
cursor.setWidth(64);
cursor.setHeight(64);
guiNode.attachChild(cursor);
inputManager.addRawInputListener(inputListener);
// Image img = tex.getImage();
// ByteBuffer data = img.getData(0);
// IntBuffer image = BufferUtils.createIntBuffer(64 * 64);
// for (int y = 0; y < 64; y++){
// for (int x = 0; x < 64; x++){
// int rgba = data.getInt();
// image.put(rgba);
// }
// }
// image.clear();
//
// try {
// Cursor cur = new Cursor(64, 64, 2, 62, 1, image, null);
// Mouse.setNativeCursor(cur);
// } catch (LWJGLException ex) {
// Logger.getLogger(TestSoftwareMouse.class.getName()).log(Level.SEVERE, null, ex);
// }
}
示例15: simpleInitApp
import com.jme3.ui.Picture; //导入依赖的package包/类
public void simpleInitApp() {
Picture p = new Picture("Picture");
p.move(0, 0, -1); // make it appear behind stats view
p.setPosition(0, 0);
p.setWidth(settings.getWidth());
p.setHeight(settings.getHeight());
p.setImage(assetManager, "Interface/Logo/Monkey.png", false);
// attach geometry to orthoNode
guiNode.attachChild(p);
}