Java Code Examples for com.jme3.renderer.Camera#setFrame()

The following examples show how to use com.jme3.renderer.Camera#setFrame() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: LWJGLOpenVRViewManager.java    From jmonkeyengine with BSD 3-Clause "New" or "Revised" License 5 votes vote down vote up
/**
 * Place the camera within the scene.
 *
 * @param eyePos the eye position.
 * @param obsPosition the observer position.
 * @param cam the camera to place.
 */
private void finalizeCamera(Vector3f eyePos, Vector3f obsPosition, Camera cam) {
    finalRotation.mult(eyePos, finalPosition);
    finalPosition.addLocal(hmdPos);
    if (obsPosition != null) {
        finalPosition.addLocal(obsPosition);
    }
    finalPosition.y += getHeightAdjustment();
    cam.setFrame(finalPosition, finalRotation);
}
 
Example 2
Source File: OpenVRViewManager.java    From jmonkeyengine with BSD 3-Clause "New" or "Revised" License 5 votes vote down vote up
/**
 * Place the camera within the scene.
 * @param eyePos the eye position.
 * @param obsPosition the observer position.
 * @param cam the camera to place.
 */
private void finalizeCamera(Vector3f eyePos, Vector3f obsPosition, Camera cam) {
    finalRotation.mult(eyePos, finalPosition);
    finalPosition.addLocal(hmdPos);
    if( obsPosition != null ) finalPosition.addLocal(obsPosition);
    finalPosition.y += getHeightAdjustment();
    cam.setFrame(finalPosition, finalRotation);
}
 
Example 3
Source File: OculusViewManager.java    From jmonkeyengine with BSD 3-Clause "New" or "Revised" License 5 votes vote down vote up
/**
 * Place the camera within the scene.
 *
 * @param eyePos      the eye position.
 * @param obsPosition the observer position.
 * @param cam         the camera to place.
 */
private void finalizeCamera(Vector3f eyePos, Vector3f obsPosition, Camera cam) {
    finalRotation.mult(eyePos, finalPosition);
    finalPosition.addLocal(hmdPos);
    if (obsPosition != null) {
        finalPosition.addLocal(obsPosition);
    }
    finalPosition.y += getHeightAdjustment();
    cam.setFrame(finalPosition, finalRotation);
}
 
Example 4
Source File: OSVRViewManager.java    From jmonkeyengine with BSD 3-Clause "New" or "Revised" License 5 votes vote down vote up
/**
 * Place the camera within the scene.
 * @param eyePos the eye position.
 * @param obsPosition the observer position.
 * @param cam the camera to place.
 */
private void finalizeCamera(Vector3f eyePos, Vector3f obsPosition, Camera cam) {
    finalRotation.mult(eyePos, finalPosition);
    finalPosition.addLocal(hmdPos);
    if( obsPosition != null ){
    	finalPosition.addLocal(obsPosition);
    }
    finalPosition.y += getHeightAdjustment();
    cam.setFrame(finalPosition, finalRotation);
}