當前位置: 首頁>>代碼示例>>Java>>正文


Java RenderManager.createMainView方法代碼示例

本文整理匯總了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();
}
 
開發者ID:ZoltanTheHun,項目名稱:SkyHussars,代碼行數:21,代碼來源:CombinedViewport.java

示例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);
}
 
開發者ID:mleoking,項目名稱:PhET,代碼行數:24,代碼來源:Application.java


注:本文中的com.jme3.renderer.RenderManager.createMainView方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。