Skip to content

Commit

Permalink
Updated test code to properly display orientation.
Browse files Browse the repository at this point in the history
  • Loading branch information
ColdenCullen committed Mar 6, 2014
1 parent 2e3ceab commit b45293c
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions source/test/testovr.d
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,12 @@ void main()
HMDDevice pHMD;
SensorDevice pSensor;
bool infoLoaded;
HMDInfo info;
HMDInfo info = new HMDInfo;

// Need DeviceEnumerator
// pHMD = pManager.EnumerateDevicesEx(
// new DeviceEnumerationArgs( HMDDevice.EnumDeviceType, true ) );
pHMD = pManager.EnumerateDevices!HMDDevice().CreateDevice();

writeln( "Device: ", pHMD );

if( pHMD )
{
Expand All @@ -26,7 +27,7 @@ void main()
else
{
// Need DeviceEnumerator
//pSensor = pManager.EnumerateDevicesEx( FUcking I don't know );
pSensor = pManager.EnumerateDevices!SensorDevice().CreateDevice;
}

if( pSensor )
Expand Down Expand Up @@ -70,10 +71,10 @@ void main()

while( pSensor )
{
SWIGTYPE_p_OVR__QuatT_float_t quaternion = pFusionResult.GetOrientation();
Quatf quaternion = pFusionResult.GetOrientation();

float yaw, pitch, roll;
quaternion.GetEulerAngles<Axis.Axis_Y, Axis.Axis_X, Axis.Axis_Z>( &yaw, &pitch, &roll );
quaternion.GetEulerAngles( &yaw, &pitch, &roll );

auto RadToDegree = ( float num ) => num * 180 / 3.14;

Expand Down

0 comments on commit b45293c

Please # to comment.