本文整理汇总了Java中com.jme3.renderer.Camera.getViewPortTop方法的典型用法代码示例。如果您正苦于以下问题:Java Camera.getViewPortTop方法的具体用法?Java Camera.getViewPortTop怎么用?Java Camera.getViewPortTop使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.jme3.renderer.Camera
的用法示例。
在下文中一共展示了Camera.getViewPortTop方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: initialize
import com.jme3.renderer.Camera; //导入方法依赖的package包/类
public void initialize(RenderManager rm, ViewPort vp) {
renderManager = rm;
renderer = rm.getRenderer();
viewPort = vp;
fsQuad = new Picture("filter full screen quad");
Camera cam = vp.getCamera();
//save view port diensions
left = cam.getViewPortLeft();
right = cam.getViewPortRight();
top = cam.getViewPortTop();
bottom = cam.getViewPortBottom();
originalWidth = cam.getWidth();
originalHeight = cam.getHeight();
//first call to reshape
reshape(vp, cam.getWidth(), cam.getHeight());
}
示例2: getClipCoordinates
import com.jme3.renderer.Camera; //导入方法依赖的package包/类
private Vector3f getClipCoordinates(Vector3f worldPosition, Vector3f store, Camera cam) {
float w = cam.getViewProjectionMatrix().multProj(worldPosition, store);
store.divideLocal(w);
store.x = ((store.x + 1f) * (cam.getViewPortRight() - cam.getViewPortLeft()) / 2f + cam.getViewPortLeft());
store.y = ((store.y + 1f) * (cam.getViewPortTop() - cam.getViewPortBottom()) / 2f + cam.getViewPortBottom());
store.z = (store.z + 1f) / 2f;
return store;
}