History

LookatIndicator now scales with the avatar's scale.

Mark Peng committed 13 years ago

Commit 4e641ee1 parent 0f1ac2b2 files · +5 −2Browse files

Showing the changes to interface/src/Application.cpp (1 of 2 files). Show all

Unified · Split

interface/src/Application.cpp+4−2
@@ -200,6 +200,7 @@ Application::Application(int& argc, char** argv, timeval &startup_time) : · 199 unmodified lines
200 _mouseVoxelScale(1.0f / 1024.0f),200 _mouseVoxelScale(1.0f / 1024.0f),
201 _justEditedVoxel(false),201 _justEditedVoxel(false),
202 _isLookingAtOtherAvatar(false),202 _isLookingAtOtherAvatar(false),
203 _lookatIndicatorScale(1.0f),
203 _paintOn(false),204 _paintOn(false),
204 _dominantColor(0),205 _dominantColor(0),
205 _perfStatsOn(false),206 _perfStatsOn(false),
@@ -1942,6 +1943,7 @@ bool Application::isLookingAtOtherAvatar(glm::vec3& mouseRayOrigin, glm::vec3& m · 1736 unmodified lines
1942 glm::vec3 headPosition = avatar->getHead().getPosition();1943 glm::vec3 headPosition = avatar->getHead().getPosition();
1943 if (rayIntersectsSphere(mouseRayOrigin, mouseRayDirection, headPosition, HEAD_SPHERE_RADIUS)) {1944 if (rayIntersectsSphere(mouseRayOrigin, mouseRayDirection, headPosition, HEAD_SPHERE_RADIUS)) {
1944 eyePosition = avatar->getHead().getEyeLevelPosition();1945 eyePosition = avatar->getHead().getEyeLevelPosition();
1946 _lookatIndicatorScale = avatar->getScale();
1945 _lookatOtherPosition = headPosition;1947 _lookatOtherPosition = headPosition;
1946 return true;1948 return true;
1947 }1949 }
@@ -1952,8 +1954,8 @@ bool Application::isLookingAtOtherAvatar(glm::vec3& mouseRayOrigin, glm::vec3& m · 4 unmodified lines
1952 1954
1953void Application::renderLookatIndicator(glm::vec3 pointOfInterest, Camera& whichCamera) {1955void Application::renderLookatIndicator(glm::vec3 pointOfInterest, Camera& whichCamera) {
1954 1956
1955 const float DISTANCE_FROM_HEAD_SPHERE = 0.1f;1957 const float DISTANCE_FROM_HEAD_SPHERE = 0.1f * _lookatIndicatorScale;
1956 const float INDICATOR_RADIUS = 0.1f;1958 const float INDICATOR_RADIUS = 0.1f * _lookatIndicatorScale;
1957 const float YELLOW[] = { 1.0f, 1.0f, 0.0f };1959 const float YELLOW[] = { 1.0f, 1.0f, 0.0f };
1958 const int NUM_SEGMENTS = 30;1960 const int NUM_SEGMENTS = 30;
1959 glm::vec3 haloOrigin(pointOfInterest.x, pointOfInterest.y + DISTANCE_FROM_HEAD_SPHERE, pointOfInterest.z);1961 glm::vec3 haloOrigin(pointOfInterest.x, pointOfInterest.y + DISTANCE_FROM_HEAD_SPHERE, pointOfInterest.z);

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t