remove ViewFrustum::calculateProjection()

This commit is contained in:
Andrew Meadows 2017-09-08 15:04:14 -07:00
parent 3433c5c414
commit a55661e1ff
3 changed files with 0 additions and 19 deletions

View file

@ -190,7 +190,6 @@ bool OctreeQueryNode::updateCurrentViewFrustum() {
QMutexLocker viewLocker(&_viewMutex);
if (!newestViewFrustum.isVerySimilar(_currentViewFrustum)) {
_currentViewFrustum = newestViewFrustum;
//_currentViewFrustum.calculateProjection();
currentViewFrustumChanged = true;
}
}

View file

@ -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) {

View file

@ -91,7 +91,6 @@ public:
float getCenterRadius() const { return _centerSphereRadius; }
void calculate();
void calculateProjection();
typedef enum { OUTSIDE = 0, INTERSECT, INSIDE } intersection;