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
2 changes: 2 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ Change Log

* Added `disableDepthTestDistance` to billboards, points and labels. This sets the distance to the camera where the depth test will be disabled. Setting it to zero (the default) will alwasy enable the depth test. Setting it to `Number.POSITVE_INFINITY` will never enabled the depth test. Also added `scene.minimumDisableDepthTestDistance` to change the default value from zero. [#5166](https://github.com/AnalyticalGraphicsInc/cesium/pull/5166)
* Fixed issue with displaying `MapboxImageryProvider` default token error message [#5191](https://github.com/AnalyticalGraphicsInc/cesium/pull/5191)
* Removed left, right, bottom and top properties from `OrthographicFrustum`. Use `OrthographicOffCenterFrustum` instead. [#5109](https://github.com/AnalyticalGraphicsInc/cesium/issues/5109)


### 1.32 - 2017-04-03

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