mirror of
https://github.com/overte-org/overte.git
synced 2025-08-08 19:16:56 +02:00
Fix style mistakes according to code review for eyecontact code.
This commit is contained in:
parent
29d1e08f48
commit
24d32bcdc8
5 changed files with 10 additions and 9 deletions
|
@ -1734,6 +1734,7 @@ void Application::init() {
|
|||
|
||||
const float MAX_AVATAR_EDIT_VELOCITY = 1.0f;
|
||||
const float MAX_VOXEL_EDIT_DISTANCE = 20.0f;
|
||||
const float HEAD_SPHERE_RADIUS = 0.07;
|
||||
|
||||
bool Application::isLookingAtOtherAvatar(glm::vec3& mouseRayOrigin, glm::vec3& mouseRayDirection, glm::vec3& eyePosition) {
|
||||
NodeList* nodeList = NodeList::getInstance();
|
||||
|
@ -1741,7 +1742,7 @@ bool Application::isLookingAtOtherAvatar(glm::vec3 &mouseRayOrigin, glm::vec3 &m
|
|||
if (node->getLinkedData() != NULL && node->getType() == NODE_TYPE_AGENT) {
|
||||
Avatar* avatar = (Avatar *) node->getLinkedData();
|
||||
glm::vec3 headPosition = avatar->getHead().getPosition();
|
||||
if (rayIntersectsSphere(mouseRayOrigin, mouseRayDirection, headPosition, 0.07)) {
|
||||
if (rayIntersectsSphere(mouseRayOrigin, mouseRayDirection, headPosition, HEAD_SPHERE_RADIUS)) {
|
||||
eyePosition = avatar->getHead().getEyeLevelPosition();
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -54,7 +54,7 @@ public:
|
|||
glm::quat getCameraOrientation () const;
|
||||
|
||||
glm::vec3 getPosition() const { return _position; }
|
||||
glm::vec3 getEyeLevelPosition() const { return _eyeLevelPosition; }
|
||||
const glm::vec3& getEyeLevelPosition() const { return _eyeLevelPosition; }
|
||||
glm::vec3 getRightDirection() const { return getOrientation() * IDENTITY_RIGHT; }
|
||||
glm::vec3 getUpDirection () const { return getOrientation() * IDENTITY_UP; }
|
||||
glm::vec3 getFrontDirection() const { return getOrientation() * IDENTITY_FRONT; }
|
||||
|
|
Loading…
Reference in a new issue