Showing the changes to interface/src/Application.cpp (1 of 2 files). Show all
Unified · Split
| @@ -1953,10 +1953,13 @@ bool Application::isLookingAtOtherAvatar(glm::vec3& mouseRayOrigin, glm::vec3& m · 1952 unmodified lines | |||
| 1953 | void Application::renderLookatIndicator(glm::vec3 pointOfInterest, Camera& whichCamera) { | 1953 | void Application::renderLookatIndicator(glm::vec3 pointOfInterest, Camera& whichCamera) { |
| 1954 | 1954 | ||
| 1955 | const float DISTANCE_FROM_HEAD_SPHERE = 0.1f; | 1955 | const float DISTANCE_FROM_HEAD_SPHERE = 0.1f; |
| 1956 | const float INDICATOR_RADIUS = 0.1f; | ||
| 1956 | const float YELLOW[] = { 1.0f, 1.0f, 0.0f }; | 1957 | const float YELLOW[] = { 1.0f, 1.0f, 0.0f }; |
| 1958 | const int NUM_SEGMENTS = 30; | ||
| 1957 | glm::vec3 haloOrigin(pointOfInterest.x, pointOfInterest.y + DISTANCE_FROM_HEAD_SPHERE, pointOfInterest.z); | 1959 | glm::vec3 haloOrigin(pointOfInterest.x, pointOfInterest.y + DISTANCE_FROM_HEAD_SPHERE, pointOfInterest.z); |
| 1958 | glColor3f(YELLOW[0], YELLOW[1], YELLOW[2]); | 1960 | glColor3f(YELLOW[0], YELLOW[1], YELLOW[2]); |
| 1959 | renderCircle(haloOrigin, 0.1f, glm::vec3(0.0f, 1.0f, 0.0f), 30); | 1961 | glm::vec3 normalToFloor(0.0f, 1.0f, 0.0f); |
| 1962 | renderCircle(haloOrigin, INDICATOR_RADIUS, normalToFloor, NUM_SEGMENTS); | ||
| 1960 | } | 1963 | } |
| 1961 | 1964 | ||
| 1962 | void Application::update(float deltaTime) { | 1965 | void Application::update(float deltaTime) { |
| @@ -2003,7 +2006,7 @@ void Application::update(float deltaTime) { · 40 unmodified lines | |||
| 2003 | glm::vec3 front = orientation * IDENTITY_FRONT; | 2006 | glm::vec3 front = orientation * IDENTITY_FRONT; |
| 2004 | glm::vec3 up = orientation * IDENTITY_UP; | 2007 | glm::vec3 up = orientation * IDENTITY_UP; |
| 2005 | glm::vec3 towardVoxel = getMouseVoxelWorldCoordinates(_mouseVoxelDragging) | 2008 | glm::vec3 towardVoxel = getMouseVoxelWorldCoordinates(_mouseVoxelDragging) |
| 2006 | - _myAvatar.getCameraPosition(); // is this an error? getCameraPosition dne | 2009 | - _myAvatar.getCameraPosition(); |
| 2007 | towardVoxel = front * glm::length(towardVoxel); | 2010 | towardVoxel = front * glm::length(towardVoxel); |
| 2008 | glm::vec3 lateralToVoxel = glm::cross(up, glm::normalize(towardVoxel)) * glm::length(towardVoxel); | 2011 | glm::vec3 lateralToVoxel = glm::cross(up, glm::normalize(towardVoxel)) * glm::length(towardVoxel); |
| 2009 | _voxelThrust = glm::vec3(0, 0, 0); | 2012 | _voxelThrust = glm::vec3(0, 0, 0); |
| @@ -2276,7 +2279,7 @@ void Application::updateAvatar(float deltaTime) { · 266 unmodified lines | |||
| 2276 | // actually need to calculate the view frustum planes to send these details | 2279 | // actually need to calculate the view frustum planes to send these details |
| 2277 | // to the server. | 2280 | // to the server. |
| 2278 | loadViewFrustum(_myCamera, _viewFrustum); | 2281 | loadViewFrustum(_myCamera, _viewFrustum); |
| 2279 | _myAvatar.setCameraPosition(_viewFrustum.getPosition()); // setCameraPosition() dne | 2282 | _myAvatar.setCameraPosition(_viewFrustum.getPosition()); |
| 2280 | _myAvatar.setCameraOrientation(_viewFrustum.getOrientation()); | 2283 | _myAvatar.setCameraOrientation(_viewFrustum.getOrientation()); |
| 2281 | _myAvatar.setCameraFov(_viewFrustum.getFieldOfView()); | 2284 | _myAvatar.setCameraFov(_viewFrustum.getFieldOfView()); |
| 2282 | _myAvatar.setCameraAspectRatio(_viewFrustum.getAspectRatio()); | 2285 | _myAvatar.setCameraAspectRatio(_viewFrustum.getAspectRatio()); |