本文整理了Java中org.lwjglb.engine.items.Terrain.getGameItems()
方法的一些代码示例,展示了Terrain.getGameItems()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Terrain.getGameItems()
方法的具体详情如下:
包路径:org.lwjglb.engine.items.Terrain
类名称:Terrain
方法名:getGameItems
暂无
代码示例来源:origin: lwjglgamedev/lwjglbook
@Override
public void init(Window window) throws Exception {
renderer.init(window);
scene = new Scene();
float skyBoxScale = 50.0f;
float terrainScale = 10;
int terrainSize = 3;
float minY = -0.1f;
float maxY = 0.1f;
int textInc = 40;
Terrain terrain = new Terrain(terrainSize, terrainScale, minY, maxY, "/textures/heightmap.png", "/textures/terrain.png", textInc);
scene.setGameItems(terrain.getGameItems());
// Setup SkyBox
SkyBox skyBox = new SkyBox("/models/skybox.obj", "/textures/skybox.png");
skyBox.setScale(skyBoxScale);
scene.setSkyBox(skyBox);
// Setup Lights
setupLights();
// Create HUD
hud = new Hud("DEMO");
camera.getPosition().x = 0.0f;
camera.getPosition().z = 0.0f;
camera.getPosition().y = -0.2f;
camera.getRotation().x = 10.f;
}
代码示例来源:origin: lwjglgamedev/lwjglbook
@Override
public void init(Window window) throws Exception {
renderer.init(window);
scene = new Scene();
float skyBoxScale = 50.0f;
float terrainScale = 10;
//int terrainSize = 3;
int terrainSize = 3;
float minY = -0.1f;
float maxY = 0.1f;
int textInc = 40;
terrain = new Terrain(terrainSize, terrainScale, minY, maxY, "/textures/heightmap.png", "/textures/terrain.png", textInc);
//terrain = new Terrain(terrainSize, terrainScale, minY, maxY, "/textures/heightmap_test.png", "/textures/terrain.png", textInc);
scene.setGameItems(terrain.getGameItems());
// Setup SkyBox
SkyBox skyBox = new SkyBox("/models/skybox.obj", "/textures/skybox.png");
skyBox.setScale(skyBoxScale);
scene.setSkyBox(skyBox);
// Setup Lights
setupLights();
// Create HUD
hud = new Hud("DEMO");
camera.getPosition().x = 0.0f;
camera.getPosition().y = 5.0f;
camera.getPosition().z = 0.0f;
camera.getRotation().x = 90;
}
代码示例来源:origin: lwjglgamedev/lwjglbook
@Override
public void init(Window window) throws Exception {
renderer.init(window);
scene = new Scene();
float skyBoxScale = 50.0f;
float terrainScale = 10;
//int terrainSize = 3;
int terrainSize = 3;
float minY = -0.1f;
float maxY = 0.1f;
int textInc = 40;
terrain = new Terrain(terrainSize, terrainScale, minY, maxY, "/textures/heightmap.png", "/textures/terrain.png", textInc);
scene.setGameItems(terrain.getGameItems());
scene.setFog(new Fog(true, new Vector3f(0.5f, 0.5f, 0.5f), 0.15f));
// Setup SkyBox
SkyBox skyBox = new SkyBox("/models/skybox.obj", "/textures/skybox.png");
skyBox.setScale(skyBoxScale);
scene.setSkyBox(skyBox);
// Setup Lights
setupLights();
// Create HUD
hud = new Hud("DEMO");
camera.getPosition().x = 0.0f;
camera.getPosition().y = 5.0f;
camera.getPosition().z = 0.0f;
camera.getRotation().x = 90;
}
内容来源于网络,如有侵权,请联系作者删除!