// // AvatarTouch.cpp // interface // // Created by Jeffrey Ventrella // Copyright (c) 2013 High Fidelity, Inc. All rights reserved. // #include #include #include #include "AvatarTouch.h" #include "InterfaceConfig.h" #include "Util.h" const float THREAD_RADIUS = 0.012; const float HANDS_CLOSE_ENOUGH_TO_GRASP = 0.1; AvatarTouch::AvatarTouch() { _myHandPosition = glm::vec3(0.0f, 0.0f, 0.0f); _yourHandPosition = glm::vec3(0.0f, 0.0f, 0.0f); _myBodyPosition = glm::vec3(0.0f, 0.0f, 0.0f); _yourBodyPosition = glm::vec3(0.0f, 0.0f, 0.0f); _vectorBetweenHands = glm::vec3(0.0f, 0.0f, 0.0f); _myHandState = HAND_STATE_NULL; _yourHandState = HAND_STATE_NULL; _reachableRadius = 0.0f; _weAreHoldingHands = false; _canReachToOtherAvatar = false; _handsCloseEnoughToGrasp = false; for (int p=0; p