Code example for Matrix4f

0
                // rotation-vector, which is what we want. 
                SensorManager.getRotationMatrixFromVector(
                        mRotationMatrix , event.values);
 
                if (mRender != null) {
                    mRender.onPostureChanged(new Matrix4f(mRotationMatrix));
                } 
            } 
        } 
    } 
 
    public void onAccuracyChanged(Sensor sensor, int accuracy) {
    } 
 
    public void toggleSensor() { 
        mUseSensor = !mUseSensor;
        if (mUseSensor == false) {
            mRender.onPostureChanged(mIdentityMatrix);
        } 
    } 
}