Search in sources :

Example 1 with HmdMatrix34_t

use of com.jme3.system.jopenvr.HmdMatrix34_t in project jmonkeyengine by jMonkeyEngine.

the class OpenVR method getSeatedToAbsolutePosition.

@Override
public Vector3f getSeatedToAbsolutePosition() {
    if (environment.isSeatedExperience() == false)
        return Vector3f.ZERO;
    if (hmdSeatToStand == null) {
        hmdSeatToStand = new Vector3f();
        HmdMatrix34_t mat = vrsystemFunctions.GetSeatedZeroPoseToStandingAbsoluteTrackingPose.apply();
        Matrix4f tempmat = new Matrix4f();
        VRUtil.convertSteamVRMatrix3ToMatrix4f(mat, tempmat);
        tempmat.toTranslationVector(hmdSeatToStand);
    }
    return hmdSeatToStand;
}
Also used : HmdMatrix34_t(com.jme3.system.jopenvr.HmdMatrix34_t) Matrix4f(com.jme3.math.Matrix4f) Vector3f(com.jme3.math.Vector3f)

Aggregations

Matrix4f (com.jme3.math.Matrix4f)1 Vector3f (com.jme3.math.Vector3f)1 HmdMatrix34_t (com.jme3.system.jopenvr.HmdMatrix34_t)1