当前位置: 首页>>代码示例>>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;未经允许,请勿转载。