本文整理汇总了Java中com.jme3.renderer.RenderManager.createMainView方法的典型用法代码示例。如果您正苦于以下问题:Java RenderManager.createMainView方法的具体用法?Java RenderManager.createMainView怎么用?Java RenderManager.createMainView使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.jme3.renderer.RenderManager
的用法示例。
在下文中一共展示了RenderManager.createMainView方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: CombinedViewport
import com.jme3.renderer.RenderManager; //导入方法依赖的package包/类
public CombinedViewport(String name,
RenderManager renderManager,
Camera mainCam,
float fov,
float near,
float far,
Node node,
FilterPostProcessor fpp
) {
this.name = name;
this.cam = new Camera(mainCam.getWidth(),mainCam.getHeight());
this.viewPort = renderManager.createMainView(name, cam);
this.fov = fov;
this.near = near;
this.far = far;
this.aspect = (float) mainCam.getWidth() / (float) mainCam.getHeight();
this.node = node;
this.fpp = fpp;
setupView();
}
示例2: initCamera
import com.jme3.renderer.RenderManager; //导入方法依赖的package包/类
/**
* Creates the camera to use for rendering. Default values are perspective
* projection with 45° field of view, with near and far values 1 and 1000
* units respectively.
*/
private void initCamera(){
cam = new Camera(settings.getWidth(), settings.getHeight());
cam.setFrustumPerspective(45f, (float)cam.getWidth() / cam.getHeight(), 1f, 1000f);
cam.setLocation(new Vector3f(0f, 0f, 10f));
cam.lookAt(new Vector3f(0f, 0f, 0f), Vector3f.UNIT_Y);
renderManager = new RenderManager(renderer);
//Remy - 09/14/2010 setted the timer in the renderManager
renderManager.setTimer(timer);
viewPort = renderManager.createMainView("Default", cam);
viewPort.setClearFlags(true, true, true);
// Create a new cam for the gui
Camera guiCam = new Camera(settings.getWidth(), settings.getHeight());
guiViewPort = renderManager.createPostView("Gui Default", guiCam);
guiViewPort.setClearFlags(false, false, false);
}