From 496894ecced1b0a4ae5ab176902bbd0f43a31ed1 Mon Sep 17 00:00:00 2001 From: Brad Davis Date: Fri, 24 Oct 2014 12:56:30 -0700 Subject: Updating to 0.4.3 SDK --- Samples/OculusWorldDemo/Player.h | 51 ++++++++++++++++++++++------------------ 1 file changed, 28 insertions(+), 23 deletions(-) (limited to 'Samples/OculusWorldDemo/Player.h') diff --git a/Samples/OculusWorldDemo/Player.h b/Samples/OculusWorldDemo/Player.h index 621af02..feae150 100644 --- a/Samples/OculusWorldDemo/Player.h +++ b/Samples/OculusWorldDemo/Player.h @@ -52,40 +52,45 @@ const float RailHeight = 0.8f; class Player { public: - - float UserEyeHeight; - - // Where the avatar coordinate system (and body) is positioned and oriented in the virtual world - // Modified by gamepad/mouse input - Vector3f BodyPos; - Anglef BodyYaw; - - // Where the player head is positioned and oriented in the real world - Posef HeadPose; - // Where the avatar head is positioned and oriented in the virtual world Vector3f GetPosition(); Quatf GetOrientation(bool baseOnly = false); // Returns virtual world position based on a real world head pose. // Allows predicting eyes separately based on scanout time. - Posef VirtualWorldTransformfromRealPose(const Posef &sensorHeadPose); + Posef VirtualWorldTransformfromRealPose(const Posef &sensorHeadPose); // Handle directional movement. Returns 'true' if movement was processed. bool HandleMoveKey(OVR::KeyCode key, bool down); + void HandleMovement(double dt, Array >* collisionModels, + Array >* groundCollisionModels, bool shiftDown); + + float GetScaledEyeHeight() { return UserEyeHeight * HeightScale; } + + Player(); + ~Player(); + +public: + // User parameters + float UserEyeHeight; + float HeightScale; + + // Where the avatar coordinate system (and body) is positioned and oriented in the virtual world + // Modified by gamepad/mouse input + Vector3f BodyPos; + Anglef BodyYaw; + + // Where the player head is positioned and oriented in the real world + Posef HeadPose; + // Movement state; different bits may be set based on the state of keys. - uint8_t MoveForward; - uint8_t MoveBack; - uint8_t MoveLeft; - uint8_t MoveRight; - Vector3f GamepadMove, GamepadRotate; - bool bMotionRelativeToBody; - - Player(); - ~Player(); - void HandleMovement(double dt, Array >* collisionModels, - Array >* groundCollisionModels, bool shiftDown); + uint8_t MoveForward; + uint8_t MoveBack; + uint8_t MoveLeft; + uint8_t MoveRight; + Vector3f GamepadMove, GamepadRotate; + bool bMotionRelativeToBody; }; #endif -- cgit v1.2.3