psmove_get_orientation() private method

private psmove_get_orientation ( IntPtr move, float &oriw, float &orix, float &oriy, float &oriz ) : void
move IntPtr
oriw float
orix float
oriy float
oriz float
return void
Ejemplo n.º 1
0
        private static void ControllerUpdateOrientations(
            IntPtr psmove, // PSMove*
            PSMoveRawControllerData_Base controllerData)
        {
            float oriw = 1.0f, orix = 0.0f, oriy = 0.0f, oriz = 0.0f;

            // Get the controller orientation (uses IMU).
            PSMoveAPI.psmove_get_orientation(psmove, ref oriw, ref orix, ref oriy, ref oriz);

            //NOTE: This orientation is in the PSMoveApi coordinate system
            controllerData.PSMoveOrientation = new Quaternion(orix, oriy, oriz, oriw);
        }