diff --git a/interface/src/Camera.h b/interface/src/Camera.h index bee20829eb..02c063c42e 100755 --- a/interface/src/Camera.h +++ b/interface/src/Camera.h @@ -30,33 +30,33 @@ public: void update(); void setMode ( CameraMode m ) { mode = m; } - void setYaw ( double y ) { yaw = y; } - void setPitch ( double p ) { pitch = p; } - void setRoll ( double r ) { roll = r; } - void setUp ( double u ) { up = u; } - void setDistance ( double d ) { distance = d; } - void setTargetPosition ( glm::dvec3 t ) { targetPosition = t; }; - void setPosition ( glm::dvec3 p ) { position = p; }; + void setYaw ( float y ) { yaw = y; } + void setPitch ( float p ) { pitch = p; } + void setRoll ( float r ) { roll = r; } + void setUp ( float u ) { up = u; } + void setDistance ( float d ) { distance = d; } + void setTargetPosition ( glm::vec3 t ) { targetPosition = t; }; + void setPosition ( glm::vec3 p ) { position = p; }; void setOrientation ( Orientation o ) { orientation.set(o); } - double getYaw () { return yaw; } - double getPitch () { return pitch; } - double getRoll () { return roll; } - glm::dvec3 getPosition () { return position; } + float getYaw () { return yaw; } + float getPitch () { return pitch; } + float getRoll () { return roll; } + glm::vec3 getPosition () { return position; } Orientation getOrientation () { return orientation; } CameraMode getMode () { return mode; } private: CameraMode mode; - glm::dvec3 position; - glm::dvec3 targetPosition; - double fieldOfView; - double yaw; - double pitch; - double roll; - double up; - double distance; + glm::vec3 position; + glm::vec3 targetPosition; + float fieldOfView; + float yaw; + float pitch; + float roll; + float up; + float distance; Orientation orientation; }; diff --git a/interface/src/Head.cpp b/interface/src/Head.cpp index 8167e80e89..3e7512a8b7 100755 --- a/interface/src/Head.cpp +++ b/interface/src/Head.cpp @@ -239,9 +239,9 @@ void Head::UpdatePos(float frametime, SerialInterface * serialInterface, int hea //--------------------------------------------------- -void Head::setAvatarPosition( double x, double y, double z ) +void Head::setAvatarPosition( float x, float y, float z ) { - avatar.position = glm::dvec3( x, y, z ); + avatar.position = glm::vec3( x, y, z ); } @@ -297,7 +297,7 @@ void Head::simulate(float deltaTime) const float THRUST_LATERAL_MAG = 10.0; const float THRUST_VERTICAL_MAG = 10.0; - avatar.thrust = glm::dvec3( 0.0, 0.0, 0.0 ); + avatar.thrust = glm::vec3( 0.0, 0.0, 0.0 ); if (driveKeys[FWD]) { @@ -362,9 +362,9 @@ void Head::simulate(float deltaTime) //avatar.yawDelta *= 0.99; - avatar.velocity += avatar.thrust * (double)deltaTime; + avatar.velocity += glm::dvec3( avatar.thrust * deltaTime ); - position += avatar.velocity * (double)deltaTime; + position += (glm::vec3)avatar.velocity * deltaTime; //avatar.velocity *= 0.9; @@ -673,9 +673,9 @@ void Head::renderHead( int faceToFace, int isMine ) //--------------------------------------------------------- -void Head::setHandMovement( glm::dvec3 movement ) +void Head::setHandMovement( glm::vec3 movement ) { - handOffset = glm::dvec3( movement.x, -movement.y, movement.z ); + handOffset = glm::vec3( movement.x, -movement.y, movement.z ); } @@ -683,9 +683,9 @@ void Head::setHandMovement( glm::dvec3 movement ) //----------------------------------------- void Head::initializeAvatar() { - avatar.position = glm::dvec3( 0.0, 0.0, 0.0 ); - avatar.velocity = glm::dvec3( 0.0, 0.0, 0.0 ); - avatar.thrust = glm::dvec3( 0.0, 0.0, 0.0 ); + avatar.position = glm::vec3( 0.0, 0.0, 0.0 ); + avatar.velocity = glm::vec3( 0.0, 0.0, 0.0 ); + avatar.thrust = glm::vec3( 0.0, 0.0, 0.0 ); avatar.orientation.setToIdentity(); avatar.yaw = 90.0; @@ -696,9 +696,8 @@ void Head::initializeAvatar() for (int b=0; b