本文整理匯總了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);
}