Skip to content

Commit

Permalink
Merge pull request #5170 from ateshuseyin/remove-orthographicfrustum-…
Browse files Browse the repository at this point in the history
…properties

OrthographicFrustum deprecated properties are removed.
  • Loading branch information
pjcozzi authored Apr 28, 2017
2 parents 776456e + d88a8e5 commit 852ba64
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 85 deletions.
2 changes: 2 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ Change Log

### 1.33 - 2017-05-01

* Breaking changes
* Removed left, right, bottom and top properties from `OrthographicFrustum`. Use `OrthographicOffCenterFrustum` instead. [#5109](https://github.com/AnalyticalGraphicsInc/cesium/issues/5109)
* 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)
* Fixed bug in conversion formula in Matrix3.fromHeadingPitchRoll [5195](https://github.com/AnalyticalGraphicsInc/cesium/issues/5195)
Expand Down
94 changes: 9 additions & 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,14 @@ define([
frustum._near = frustum.near;
frustum._far = frustum.far;

if (!frustum._useDeprecated) {
var ratio = 1.0 / frustum.aspectRatio;
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;
}
var ratio = 1.0 / frustum.aspectRatio;
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 +101,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

0 comments on commit 852ba64

Please sign in to comment.