本文整理汇总了Java中com.jme3.ui.Picture类的典型用法代码示例。如果您正苦于以下问题:Java Picture类的具体用法?Java Picture怎么用?Java Picture使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Picture类属于com.jme3.ui包,在下文中一共展示了Picture类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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);
}
开发者ID:mleoking,项目名称:PhET,代码行数:18,代码来源:TestZOrder.java
示例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;
}
开发者ID:mleoking,项目名称:PhET,代码行数:17,代码来源:HDRRenderer.java
示例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());
}
开发者ID:mleoking,项目名称:PhET,代码行数:21,代码来源:FilterPostProcessor.java
示例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);
}
}
开发者ID:mleoking,项目名称:PhET,代码行数:22,代码来源:SimpleWaterProcessor.java
示例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);
}
开发者ID:rockfireredmoon,项目名称:icetone,代码行数:18,代码来源:BusySpinner.java
示例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;
}
开发者ID:jMonkeyEngine,项目名称:sdk,代码行数:19,代码来源:JmePicture.java
示例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);
}
开发者ID:matthewseal,项目名称:MoleculeViewer,代码行数:19,代码来源:SplashAppState.java
示例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);
}
开发者ID:riccardobl,项目名称:jme3-plugin-flac-loader,代码行数:17,代码来源:FLACLoaderTest.java
示例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);
}
开发者ID:abnercoimbre,项目名称:tower-defense-cave,代码行数:27,代码来源:InterfaceAppState.java
示例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");
}
开发者ID:abnercoimbre,项目名称:tower-defense-cave,代码行数:18,代码来源:InterfaceAppState.java
示例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);
}
开发者ID:abnercoimbre,项目名称:tower-defense-cave,代码行数:18,代码来源:InterfaceAppState.java
示例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());
}
开发者ID:chototsu,项目名称:MikuMikuStudio,代码行数:19,代码来源:FilterPostProcessor.java
示例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);
}
开发者ID:mleoking,项目名称:PhET,代码行数:30,代码来源:TestFBOPassthrough.java
示例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);
// }
}
开发者ID:mleoking,项目名称:PhET,代码行数:34,代码来源:TestSoftwareMouse.java
示例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);
}
开发者ID:mleoking,项目名称:PhET,代码行数:12,代码来源:TestOrtho.java
示例16: displayMap
import com.jme3.ui.Picture; //导入依赖的package包/类
protected void displayMap(Renderer r, Picture pic, int left) {
Camera cam = vp.getCamera();
rm.setCamera(cam, true);
int h = cam.getHeight();
pic.setPosition(left, h / 20f);
pic.setWidth(128);
pic.setHeight(128);
pic.updateGeometricState();
rm.renderGeometry(pic);
rm.setCamera(cam, false);
}
开发者ID:mleoking,项目名称:PhET,代码行数:14,代码来源:SimpleWaterProcessor.java
示例17: simpleInitApp
import com.jme3.ui.Picture; //导入依赖的package包/类
public void simpleInitApp() {
picture = new Picture("VideoPicture", true);
picture.setPosition(0, 0);
picture.setWidth(settings.getWidth());
picture.setHeight(settings.getHeight());
picture.setImage(assetManager, "Interface/Logo/Monkey.jpg", false);
// attach geometry to orthoNode
rootNode.attachChild(picture);
// start video playback
createVideo();
}
开发者ID:mleoking,项目名称:PhET,代码行数:14,代码来源:TestVideoPlayer.java
示例18: createNodes
import com.jme3.ui.Picture; //导入依赖的package包/类
@Override
public org.openide.nodes.Node[] createNodes(Object key, DataObject key2, boolean cookie) {
JmeSpatialChildren children=new JmeSpatialChildren((com.jme3.scene.Spatial)key);
children.setReadOnly(cookie);
children.setDataObject(key2);
return new org.openide.nodes.Node[]{new JmePicture((Picture) key, children).setReadOnly(cookie)};
}
开发者ID:jMonkeyEngine,项目名称:sdk,代码行数:8,代码来源:JmePicture.java
示例19: initialize
import com.jme3.ui.Picture; //导入依赖的package包/类
@Override
public void initialize(AppStateManager stateManager, Application app) {
super.initialize(stateManager, app);
this.app = (MVApplication) app;
assetManager = app.getAssetManager();
guiNode = this.app.getRootNode();
java.util.logging.Logger.getLogger("de.lessvoid.nifty")
.setLevel(java.util.logging.Level.OFF);
display = new NiftyJmeDisplay(
app.getAssetManager(), app.getInputManager(),
app.getAudioRenderer(), ((SimpleApplication) app).getGuiViewPort());
nifty = display.getNifty();
nifty.fromXml(Constants.android ? "Interface/nifty-android.xml"
: "Interface/nifty-desktop.xml", "start", this);
((SimpleApplication) app).getGuiViewPort().addProcessor(display);
background = new Picture("Background Image!");
background.setImage(assetManager,
Constants.android ? "Textures/nifty-background-lq.jpg"
: "Textures/nifty-background-hq.jpg", false);
guiNode.attachChild(background);
}
开发者ID:matthewseal,项目名称:MoleculeViewer,代码行数:28,代码来源:NiftyAppState.java
示例20: setInnerWheelImage
import com.jme3.ui.Picture; //导入依赖的package包/类
public void setInnerWheelImage(String path) {
Picture pic = getPicture(path);
pic.setLocalTranslation(0, 0, 0);
innerWheelPivot = new Node();
innerWheelPivot.setLocalTranslation(camera.getWidth() / 2, camera.getHeight() / 2, -1);
innerWheelPivot.attachChild(pic);
pic.center();
}
开发者ID:mathiasj33,项目名称:JMEPieMenu,代码行数:9,代码来源:PieMenuState.java
注:本文中的com.jme3.ui.Picture类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论