diff --git a/interface/src/Head.h b/interface/src/Head.h index 2cda9a1af6..eeaa4ebee0 100644 --- a/interface/src/Head.h +++ b/interface/src/Head.h @@ -109,6 +109,7 @@ struct AvatarBone glm::vec3 defaultPosePosition; // the parent relative position when the avatar is in the "T-pose" glm::vec3 springyPosition; // used for special effects (a 'flexible' variant of position) glm::dvec3 springyVelocity; // used for special effects ( the velocity of the springy position) + float springBodyTightness; // how tightly (0 to 1) the springy position tries to stay on the position float yaw; // the yaw Euler angle of the bone rotation off the parent float pitch; // the pitch Euler angle of the bone rotation off the parent float roll; // the roll Euler angle of the bone rotation off the parent @@ -159,6 +160,7 @@ class Head : public AgentData { glm::vec3 getHeadLookatDirectionUp(); glm::vec3 getHeadLookatDirectionRight(); glm::vec3 getHeadPosition(); + glm::vec3 getBonePosition( AvatarBones b ); glm::vec3 getBodyPosition(); void render(int faceToFace, int isMine); @@ -254,7 +256,7 @@ class Head : public AgentData { float springVelocityDecay; float springForce; - float springToBodyTightness; + //float springToBodyTightness; int eyeContact; eyeContactTargets eyeContactTarget; diff --git a/interface/src/Orientation.cpp b/interface/src/Orientation.cpp index f82ced6630..b42cba997c 100755 --- a/interface/src/Orientation.cpp +++ b/interface/src/Orientation.cpp @@ -1,3 +1,10 @@ +//----------------------------------------------------------- +// +// Created by Jeffrey Ventrella +// Copyright (c) 2013 High Fidelity, Inc. All rights reserved. +// +//----------------------------------------------------------- + #include "Orientation.h" #include "Util.h" @@ -17,9 +24,9 @@ void Orientation::setToIdentity() { void Orientation::set( Orientation o ) { - right = o.getRight(); - up = o.getUp(); - front = o.getFront(); + right = o.right; + up = o.up; + front = o.front; } diff --git a/interface/src/Orientation.h b/interface/src/Orientation.h index 77771b785c..ae209a5f47 100755 --- a/interface/src/Orientation.h +++ b/interface/src/Orientation.h @@ -1,7 +1,7 @@ //----------------------------------------------------------- // -// Created by Jeffrey Ventrella and added as a utility -// class for High Fidelity Code base, April 2013 +// Created by Jeffrey Ventrella +// Copyright (c) 2013 High Fidelity, Inc. All rights reserved. // //----------------------------------------------------------- @@ -20,14 +20,6 @@ enum Axis class Orientation { -private: - - glm::vec3 right; - glm::vec3 up; - glm::vec3 front; - - //void verifyValidOrientation(); - public: Orientation(); @@ -38,6 +30,10 @@ public: void set( Orientation ); void setToIdentity(); + glm::vec3 right; + glm::vec3 up; + glm::vec3 front; + glm::vec3 getRight() { return right; } glm::vec3 getUp() { return up; } glm::vec3 getFront() { return front; } diff --git a/interface/src/Util.h b/interface/src/Util.h index 5a9c53e74f..56bc16f5d1 100644 --- a/interface/src/Util.h +++ b/interface/src/Util.h @@ -24,7 +24,7 @@ static const double ONE_THIRD = 0.3333333; static const double PIE = 3.14159265359; static const double PI_TIMES_TWO = 3.14159265359 * 2.0; static const double PI_OVER_180 = 3.14159265359 / 180.0; -static const double EPSILON = 0.00001; //smallish number - used as margin of error for some values +static const double EPSILON = 0.00001; //smallish number - used as margin of error for some computations static const double SQUARE_ROOT_OF_2 = sqrt(2); static const double SQUARE_ROOT_OF_3 = sqrt(3); static const double METER = 1.0;