aboutsummaryrefslogtreecommitdiffstats
path: root/Samples/OculusWorldDemo/Player.cpp
diff options
context:
space:
mode:
authorBrad Davis <[email protected]>2014-05-23 01:49:32 -0700
committerBrad Davis <[email protected]>2014-05-23 01:49:32 -0700
commit46acc0e194ff3c1f120199eeca8324b4502118e9 (patch)
treeb1030198d3ee4698445d1fc5161cebe4158e45d1 /Samples/OculusWorldDemo/Player.cpp
parent07d0f4d0bbf3477ac6a9584f726e8ec6ab285707 (diff)
Updating to 0.3.2 (windows version)
Diffstat (limited to 'Samples/OculusWorldDemo/Player.cpp')
-rw-r--r--Samples/OculusWorldDemo/Player.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/Samples/OculusWorldDemo/Player.cpp b/Samples/OculusWorldDemo/Player.cpp
index b2bf00e..c9f0997 100644
--- a/Samples/OculusWorldDemo/Player.cpp
+++ b/Samples/OculusWorldDemo/Player.cpp
@@ -39,21 +39,21 @@ Player::~Player()
Vector3f Player::GetPosition()
{
- return BodyPos + Quatf(Vector3f(0,1,0), BodyYaw.Get()).Rotate(HeadPose.Position);
+ return BodyPos + Quatf(Vector3f(0,1,0), BodyYaw.Get()).Rotate(HeadPose.Translation);
}
Quatf Player::GetOrientation(bool baseOnly)
{
Quatf baseQ = Quatf(Vector3f(0,1,0), BodyYaw.Get());
- return baseOnly ? baseQ : baseQ * HeadPose.Orientation;
+ return baseOnly ? baseQ : baseQ * HeadPose.Rotation;
}
-Posef Player::VirtualWorldPoseFromRealPose(const Posef &sensorHeadPose)
+Transformf Player::VirtualWorldTransformfromRealPose(const Transformf &sensorHeadPose)
{
Quatf baseQ = Quatf(Vector3f(0,1,0), BodyYaw.Get());
- return Posef(baseQ * sensorHeadPose.Orientation,
- BodyPos + baseQ.Rotate(sensorHeadPose.Position));
+ return Transformf(baseQ * sensorHeadPose.Rotation,
+ BodyPos + baseQ.Rotate(sensorHeadPose.Translation));
}
@@ -187,8 +187,8 @@ bool Player::HandleMoveKey(OVR::KeyCode key, bool down)
case OVR::Key_Down: MoveBack = down ? (MoveBack | 2) : (MoveBack & ~2); return true;
case OVR::Key_Left: MoveLeft = down ? (MoveLeft | 2) : (MoveLeft & ~2); return true;
case OVR::Key_Right: MoveRight = down ? (MoveRight | 2) : (MoveRight & ~2); return true;
+ default: return false;
}
- return false;
}