diff --git a/libraries/octree/src/OctreeQueryNode.cpp b/libraries/octree/src/OctreeQueryNode.cpp index 3003d76d14..c26b4ce77b 100644 --- a/libraries/octree/src/OctreeQueryNode.cpp +++ b/libraries/octree/src/OctreeQueryNode.cpp @@ -190,7 +190,6 @@ bool OctreeQueryNode::updateCurrentViewFrustum() { QMutexLocker viewLocker(&_viewMutex); if (!newestViewFrustum.isVerySimilar(_currentViewFrustum)) { _currentViewFrustum = newestViewFrustum; - //_currentViewFrustum.calculateProjection(); currentViewFrustumChanged = true; } } diff --git a/libraries/shared/src/ViewFrustum.cpp b/libraries/shared/src/ViewFrustum.cpp index 0ba5d4c9b3..aac8683b08 100644 --- a/libraries/shared/src/ViewFrustum.cpp +++ b/libraries/shared/src/ViewFrustum.cpp @@ -118,23 +118,6 @@ void ViewFrustum::calculate() { _ourModelViewProjectionMatrix = _projection * view; // Remember, matrix multiplication is the other way around } -void ViewFrustum::calculateProjection() { - if (0.0f != _aspectRatio && 0.0f != _nearClip && 0.0f != _farClip && _nearClip != _farClip) { - // _projection is calculated from the frustum parameters - _projection = glm::perspective( glm::radians(_fieldOfView), _aspectRatio, _nearClip, _farClip); - - // frustum corners are computed from inverseProjection - glm::mat4 inverseProjection = glm::inverse(_projection); - for (int i = 0; i < NUM_FRUSTUM_CORNERS; ++i) { - _corners[i] = inverseProjection * NDC_VALUES[i]; - _corners[i] /= _corners[i].w; - } - - // finally calculate planes and _ourModelViewProjectionMatrix - calculate(); - } -} - //enum { TOP_PLANE = 0, BOTTOM_PLANE, LEFT_PLANE, RIGHT_PLANE, NEAR_PLANE, FAR_PLANE }; const char* ViewFrustum::debugPlaneName (int plane) const { switch (plane) { diff --git a/libraries/shared/src/ViewFrustum.h b/libraries/shared/src/ViewFrustum.h index acf463810d..d1b88fb2a5 100644 --- a/libraries/shared/src/ViewFrustum.h +++ b/libraries/shared/src/ViewFrustum.h @@ -91,7 +91,6 @@ public: float getCenterRadius() const { return _centerSphereRadius; } void calculate(); - void calculateProjection(); typedef enum { OUTSIDE = 0, INTERSECT, INSIDE } intersection;