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


Java RenderManager.renderScene方法代碼示例

本文整理匯總了Java中com.jme3.renderer.RenderManager.renderScene方法的典型用法代碼示例。如果您正苦於以下問題:Java RenderManager.renderScene方法的具體用法?Java RenderManager.renderScene怎麽用?Java RenderManager.renderScene使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在com.jme3.renderer.RenderManager的用法示例。


在下文中一共展示了RenderManager.renderScene方法的7個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: simpleRender

import com.jme3.renderer.RenderManager; //導入方法依賴的package包/類
@Override
public void simpleRender(RenderManager rm){
    Renderer r = rm.getRenderer();

    //do FBO rendering
    r.setFrameBuffer(fb);

    rm.setCamera(cam, false); // FBO uses current camera
    r.clearBuffers(true, true, true);
    rm.renderScene(fbNode, viewPort);
    rm.flushQueue(viewPort);

    //go back to default rendering and let
    //SimpleApplication render the default scene
    r.setFrameBuffer(null);
}
 
開發者ID:mleoking,項目名稱:PhET,代碼行數:17,代碼來源:TestFBOPassthrough.java

示例2: render

import com.jme3.renderer.RenderManager; //導入方法依賴的package包/類
/**
 * For internal use only
 * specific render for the ragdoll(if debugging)      
 * @param rm
 * @param vp 
 */
public void render(RenderManager rm, ViewPort vp) {
    if (enabled && space != null && space.getDebugManager() != null) {
        if (!debug) {
            attachDebugShape(space.getDebugManager());
        }
        for (Iterator<PhysicsBoneLink> it = boneLinks.values().iterator(); it.hasNext();) {
            PhysicsBoneLink physicsBoneLink = it.next();
            Spatial debugShape = physicsBoneLink.rigidBody.debugShape();
            if (debugShape != null) {
                debugShape.setLocalTranslation(physicsBoneLink.rigidBody.getMotionState().getWorldLocation());
                debugShape.setLocalRotation(physicsBoneLink.rigidBody.getMotionState().getWorldRotationQuat());
                debugShape.updateGeometricState();
                rm.renderScene(debugShape, vp);
            }
        }
    }
}
 
開發者ID:mleoking,項目名稱:PhET,代碼行數:24,代碼來源:KinematicRagdollControl.java

示例3: render

import com.jme3.renderer.RenderManager; //導入方法依賴的package包/類
public void render(RenderManager rm, ViewPort vp) {
    if (enabled && space != null && space.getDebugManager() != null) {
        if (debugShape == null) {
            attachDebugShape(space.getDebugManager());
        }
        debugShape.setLocalTranslation(motionState.getWorldLocation());
        debugShape.setLocalRotation(motionState.getWorldRotation());
        debugShape.updateLogicalState(0);
        debugShape.updateGeometricState();
        rm.renderScene(debugShape, vp);
    }
}
 
開發者ID:mleoking,項目名稱:PhET,代碼行數:13,代碼來源:PhysicsHoverControl.java

示例4: render

import com.jme3.renderer.RenderManager; //導入方法依賴的package包/類
public void render(RenderManager rm, ViewPort vp) {
    if (enabled && space != null && space.getDebugManager() != null) {
        if (debugShape == null) {
            attachDebugShape(space.getDebugManager());
        }
        debugShape.setLocalTranslation(getPhysicsLocation());
        debugShape.updateLogicalState(0);
        debugShape.updateGeometricState();
        rm.renderScene(debugShape, vp);
    }
}
 
開發者ID:mleoking,項目名稱:PhET,代碼行數:12,代碼來源:CharacterControl.java

示例5: render

import com.jme3.renderer.RenderManager; //導入方法依賴的package包/類
public void render(RenderManager rm, ViewPort vp) {
    if (enabled && space != null && space.getDebugManager() != null) {
        if (debugShape == null) {
            attachDebugShape(space.getDebugManager());
        }
        //TODO: using spatial traslation/rotation..
        debugShape.setLocalTranslation(spatial.getWorldTranslation());
        debugShape.setLocalRotation(spatial.getWorldRotation());
        debugShape.updateLogicalState(0);
        debugShape.updateGeometricState();
        rm.renderScene(debugShape, vp);
    }
}
 
開發者ID:mleoking,項目名稱:PhET,代碼行數:14,代碼來源:RigidBodyControl.java

示例6: render

import com.jme3.renderer.RenderManager; //導入方法依賴的package包/類
public void render(RenderManager rm, ViewPort vp) {
    if (enabled && space != null && space.getDebugManager() != null) {
        if (debugShape == null) {
            attachDebugShape(space.getDebugManager());
        }
        debugShape.setLocalTranslation(spatial.getWorldTranslation());
        debugShape.setLocalRotation(spatial.getWorldRotation());
        debugShape.updateLogicalState(0);
        debugShape.updateGeometricState();
        rm.renderScene(debugShape, vp);
    }
}
 
開發者ID:mleoking,項目名稱:PhET,代碼行數:13,代碼來源:GhostControl.java

示例7: render

import com.jme3.renderer.RenderManager; //導入方法依賴的package包/類
public void render(RenderManager rm, ViewPort vp) {
    if (enabled && space != null && space.getDebugManager() != null) {
        if (debugShape == null) {
            attachDebugShape(space.getDebugManager());
        }
        Node debugNode = (Node) debugShape;
        debugShape.setLocalTranslation(spatial.getWorldTranslation());
        debugShape.setLocalRotation(spatial.getWorldRotation());
        int i = 0;
        for (Iterator<VehicleWheel> it = wheels.iterator(); it.hasNext();) {
            VehicleWheel physicsVehicleWheel = it.next();
            Vector3f location = physicsVehicleWheel.getLocation().clone();
            Vector3f direction = physicsVehicleWheel.getDirection().clone();
            Vector3f axle = physicsVehicleWheel.getAxle().clone();
            float restLength = physicsVehicleWheel.getRestLength();
            float radius = physicsVehicleWheel.getRadius();

            Geometry locGeom = (Geometry) debugNode.getChild("WheelLocationDebugShape" + i);
            Geometry dirGeom = (Geometry) debugNode.getChild("WheelDirectionDebugShape" + i);
            Geometry axleGeom = (Geometry) debugNode.getChild("WheelAxleDebugShape" + i);
            Geometry wheelGeom = (Geometry) debugNode.getChild("WheelRadiusDebugShape" + i);

            Arrow locArrow = (Arrow) locGeom.getMesh();
            locArrow.setArrowExtent(location);
            Arrow axleArrow = (Arrow) axleGeom.getMesh();
            axleArrow.setArrowExtent(axle.normalizeLocal().multLocal(0.3f));
            Arrow wheelArrow = (Arrow) wheelGeom.getMesh();
            wheelArrow.setArrowExtent(direction.normalizeLocal().multLocal(radius));
            Arrow dirArrow = (Arrow) dirGeom.getMesh();
            dirArrow.setArrowExtent(direction.normalizeLocal().multLocal(restLength));

            dirGeom.setLocalTranslation(location);
            axleGeom.setLocalTranslation(location.addLocal(direction));
            wheelGeom.setLocalTranslation(location);
            i++;
        }
        debugShape.updateLogicalState(0);
        debugShape.updateGeometricState();
        rm.renderScene(debugShape, vp);
    }
}
 
開發者ID:mleoking,項目名稱:PhET,代碼行數:42,代碼來源:VehicleControl.java


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