Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OrthographicFrustum deprecated properties are removed. #5170

Merged
merged 8 commits into from
Apr 28, 2017
1 change: 1 addition & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ Change Log
* Fixed issues with imagerySplitPosition and the international date line in 2D mode. [#5151](https://github.com/AnalyticalGraphicsInc/cesium/pull/5151)
* Fixed an issue with `TileBoundingBox` that caused the terrain to disappear in certain places [4032](https://github.com/AnalyticalGraphicsInc/cesium/issues/4032)
* `QuadtreePrimitive` now uses `frameState.afterRender` to fire `tileLoadProgressEvent` [#3450](https://github.com/AnalyticalGraphicsInc/cesium/issues/3450)
* Removed left, right, bottom and top properties from `OrthographicFrustum`.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Move this up out of 1.32 changes.


### 1.31 - 2017-03-01

Expand Down
86 changes: 1 addition & 85 deletions Source/Scene/OrthographicFrustum.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,11 @@
define([
'../Core/defined',
'../Core/defineProperties',
'../Core/deprecationWarning',
'../Core/DeveloperError',
'./OrthographicOffCenterFrustum'
], function(
defined,
defineProperties,
deprecationWarning,
DeveloperError,
OrthographicOffCenterFrustum) {
'use strict';
Expand All @@ -26,10 +24,6 @@ define([
* var maxRadii = ellipsoid.maximumRadius;
*
* var frustum = new Cesium.OrthographicOffCenterFrustum();
* frustum.right = maxRadii * Cesium.Math.PI;
* frustum.left = -c.frustum.right;
* frustum.top = c.frustum.right * (canvas.clientHeight / canvas.clientWidth);
* frustum.bottom = -c.frustum.top;
* frustum.near = 0.01 * maxRadii;
* frustum.far = 50.0 * maxRadii;
*/
Expand Down Expand Up @@ -57,8 +51,6 @@ define([
*/
this.far = 500000000.0;
this._far = this.far;

this._useDeprecated = false;
}

function update(frustum) {
Expand Down Expand Up @@ -86,15 +78,6 @@ define([
frustum._near = frustum.near;
frustum._far = frustum.far;

if (!frustum._useDeprecated) {
var ratio = 1.0 / frustum.aspectRatio;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You need to keep these statements because frustum._useDeprecated would always be false.

f.right = frustum.width * 0.5;
f.left = -f.right;
f.top = ratio * f.right;
f.bottom = -f.top;
f.near = frustum.near;
f.far = frustum.far;
}
}
}

Expand All @@ -110,75 +93,8 @@ define([
update(this);
return this._offCenterFrustum.projectionMatrix;
}
},

/**
* The left clipping plane.
* @type {Number}
* @default undefined
*/
left : {
get : function() {
deprecationWarning('OrthographicFrustum', 'OrthographicFrustum left, right, bottom and top properties were deprecated in 1.32 and will be removed in 1.33.');
return this._offCenterFrustum.left;
},
set : function(value) {
deprecationWarning('OrthographicFrustum', 'OrthographicFrustum left, right, bottom and top properties were deprecated in 1.32 and will be removed in 1.33.');
this._useDeprecated = true;
this._offCenterFrustum.left = value;
}
},

/**
* The right clipping plane.
* @type {Number}
* @default undefined
*/
right : {
get : function() {
deprecationWarning('OrthographicFrustum', 'OrthographicFrustum left, right, bottom and top properties were deprecated in 1.32 and will be removed in 1.33.');
return this._offCenterFrustum.right;
},
set : function(value) {
deprecationWarning('OrthographicFrustum', 'OrthographicFrustum left, right, bottom and top properties were deprecated in 1.32 and will be removed in 1.33.');
this._useDeprecated = true;
this._offCenterFrustum.right = value;
}
},

/**
* The top clipping plane.
* @type {Number}
* @default undefined
*/
top : {
get : function() {
deprecationWarning('OrthographicFrustum', 'OrthographicFrustum left, right, bottom and top properties were deprecated in 1.32 and will be removed in 1.33.');
return this._offCenterFrustum.top;
},
set : function(value) {
deprecationWarning('OrthographicFrustum', 'OrthographicFrustum left, right, bottom and top properties were deprecated in 1.32 and will be removed in 1.33.');
this._useDeprecated = true;
this._offCenterFrustum.top = value;
}
},

/**
* The bottom clipping plane.
* @type {Number}
* @default undefined
*/
bottom : {
get : function() {
deprecationWarning('OrthographicFrustum', 'OrthographicFrustum left, right, bottom and top properties were deprecated in 1.32 and will be removed in 1.33.');
return this._offCenterFrustum.bottom;
},
set : function(value) {
deprecationWarning('OrthographicFrustum', 'OrthographicFrustum left, right, bottom and top properties were deprecated in 1.32 and will be removed in 1.33.');
this._useDeprecated = true;
this._offCenterFrustum.bottom = value;
}
}

});

/**
Expand Down