Skip to content

Commit

Permalink
Merge master to master-to-3d-tiles
Browse files Browse the repository at this point in the history
  • Loading branch information
pjcozzi committed Jan 11, 2017
2 parents f213644 + 2554d15 commit 4fd5e6c
Show file tree
Hide file tree
Showing 5 changed files with 123 additions and 128 deletions.
31 changes: 15 additions & 16 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,21 @@
Change Log
==========

### TODO

* Added compressed texture support.
* glTF models and imagery layers can now reference [KTX](https://www.khronos.org/opengles/sdk/tools/KTX/) textures and textures compressed with [crunch](https://github.com/BinomialLLC/crunch).
* Added `loadKTX` to load KTX textures.
* Added `loadCRN` to load crunch compressed textures.
* Added new `PixelFormat` and `WebGLConstants` enums from WebGL extensions `WEBGL_compressed_s3tc`, `WEBGL_compressed_texture_pvrtc`, and `WEBGL_compressed_texture_etc1`. [#4758](https://github.com/AnalyticalGraphicsInc/cesium/pull/4758)
* Added `CompressedTextureBuffer`.
* Added support for [3D Tiles](https://github.com/AnalyticalGraphicsInc/3d-tiles/blob/master/README.md) for streaming massive heterogeneous 3D geospatial datasets. The new Cesium APIs are:
* `Cesium3DTileset`
* `Cesium3DTileStyle`, `StyleExpression`, `Expression`, and `ConditionsExpression`
* `Cesium3DTile`
* `Cesium3DTileContent`
* `Cesium3DTileFeature`

### 1.30 - 2017-02-01

* Deprecated
Expand All @@ -20,22 +35,6 @@ Change Log
* Fixed KML for when color is an empty string [#4826](https://github.com/AnalyticalGraphicsInc/cesium/pull/4826)
* Added support for WMS version 1.3 by using CRS vice SRS query string parameter to request projection. SRS is still used for older versions.

### TODO

* Added compressed texture support.
* glTF models and imagery layers can now reference [KTX](https://www.khronos.org/opengles/sdk/tools/KTX/) textures and textures compressed with [crunch](https://github.com/BinomialLLC/crunch).
* Added `loadKTX` to load KTX textures.
* Added `loadCRN` to load crunch compressed textures.
* Added new `PixelFormat` and `WebGLConstants` enums from WebGL extensions `WEBGL_compressed_s3tc`, `WEBGL_compressed_texture_pvrtc`, and `WEBGL_compressed_texture_etc1`. [#4758](https://github.com/AnalyticalGraphicsInc/cesium/pull/4758)
* Added `CompressedTextureBuffer`.
* Added support for [3D Tiles](https://github.com/AnalyticalGraphicsInc/3d-tiles/blob/master/README.md) for streaming massive heterogeneous 3D geospatial datasets. The new Cesium APIs are:
* `Cesium3DTileset`
* `Cesium3DTileStyle`, `StyleExpression`, `Expression`, and `ConditionsExpression`
* `Cesium3DTile`
* `Cesium3DTileContent`
* `Cesium3DTileFeature`


### 1.29 - 2017-01-02

* Improved 3D Models
Expand Down
40 changes: 11 additions & 29 deletions Source/Core/BoundingRectangle.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,18 @@
define([
'./Cartesian2',
'./Cartographic',
'./Check',
'./defaultValue',
'./defined',
'./DeveloperError',
'./GeographicProjection',
'./Intersect',
'./Rectangle'
], function(
Cartesian2,
Cartographic,
Check,
defaultValue,
defined,
DeveloperError,
GeographicProjection,
Intersect,
Rectangle) {
Expand Down Expand Up @@ -79,12 +79,8 @@ define([
*/
BoundingRectangle.pack = function(value, array, startingIndex) {
//>>includeStart('debug', pragmas.debug);
if (!defined(value)) {
throw new DeveloperError('value is required');
}
if (!defined(array)) {
throw new DeveloperError('array is required');
}
Check.typeOf.object(value, 'value');
Check.defined(array, 'array');
//>>includeEnd('debug');

startingIndex = defaultValue(startingIndex, 0);
Expand All @@ -107,9 +103,7 @@ define([
*/
BoundingRectangle.unpack = function(array, startingIndex, result) {
//>>includeStart('debug', pragmas.debug);
if (!defined(array)) {
throw new DeveloperError('array is required');
}
Check.defined(array, 'array');
//>>includeEnd('debug');

startingIndex = defaultValue(startingIndex, 0);
Expand Down Expand Up @@ -242,12 +236,8 @@ define([
*/
BoundingRectangle.union = function(left, right, result) {
//>>includeStart('debug', pragmas.debug);
if (!defined(left)) {
throw new DeveloperError('left is required.');
}
if (!defined(right)) {
throw new DeveloperError('right is required.');
}
Check.typeOf.object(left, 'left');
Check.typeOf.object(right, 'right');
//>>includeEnd('debug');

if (!defined(result)) {
Expand Down Expand Up @@ -276,12 +266,8 @@ define([
*/
BoundingRectangle.expand = function(rectangle, point, result) {
//>>includeStart('debug', pragmas.debug);
if (!defined(rectangle)) {
throw new DeveloperError('rectangle is required.');
}
if (!defined(point)) {
throw new DeveloperError('point is required.');
}
Check.typeOf.object(rectangle, 'rectangle');
Check.typeOf.object(point, 'point');
//>>includeEnd('debug');

result = BoundingRectangle.clone(rectangle, result);
Expand Down Expand Up @@ -315,12 +301,8 @@ define([
*/
BoundingRectangle.intersect = function(left, right) {
//>>includeStart('debug', pragmas.debug);
if (!defined(left)) {
throw new DeveloperError('left is required.');
}
if (!defined(right)) {
throw new DeveloperError('right is required.');
}
Check.typeOf.object(left, 'left');
Check.typeOf.object(right, 'right');
//>>includeEnd('debug');

var leftX = left.x;
Expand Down
109 changes: 27 additions & 82 deletions Source/Core/BoundingSphere.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
define([
'./Cartesian3',
'./Cartographic',
'./Check',
'./defaultValue',
'./defined',
'./DeveloperError',
'./Ellipsoid',
'./GeographicProjection',
'./Intersect',
Expand All @@ -15,9 +15,9 @@ define([
], function(
Cartesian3,
Cartographic,
Check,
defaultValue,
defined,
DeveloperError,
Ellipsoid,
GeographicProjection,
Intersect,
Expand Down Expand Up @@ -348,9 +348,7 @@ define([
stride = defaultValue(stride, 3);

//>>includeStart('debug', pragmas.debug);
if (stride < 3) {
throw new DeveloperError('stride must be 3 or greater.');
}
Check.numeric.minimum(stride, 3);
//>>includeEnd('debug');

var currentPos = fromPointsCurrentPos;
Expand Down Expand Up @@ -656,9 +654,8 @@ define([
*/
BoundingSphere.fromCornerPoints = function(corner, oppositeCorner, result) {
//>>includeStart('debug', pragmas.debug);
if (!defined(corner) || !defined(oppositeCorner)) {
throw new DeveloperError('corner and oppositeCorner are required.');
}
Check.typeOf.object(corner, 'corner');
Check.typeOf.object(oppositeCorner, 'oppositeCorner');
//>>includeEnd('debug');

if (!defined(result)) {
Expand All @@ -684,9 +681,7 @@ define([
*/
BoundingSphere.fromEllipsoid = function(ellipsoid, result) {
//>>includeStart('debug', pragmas.debug);
if (!defined(ellipsoid)) {
throw new DeveloperError('ellipsoid is required.');
}
Check.typeOf.object(ellipsoid, 'ellipsoid');
//>>includeEnd('debug');

if (!defined(result)) {
Expand Down Expand Up @@ -814,13 +809,8 @@ define([
*/
BoundingSphere.pack = function(value, array, startingIndex) {
//>>includeStart('debug', pragmas.debug);
if (!defined(value)) {
throw new DeveloperError('value is required');
}

if (!defined(array)) {
throw new DeveloperError('array is required');
}
Check.typeOf.object(value, 'value');
Check.defined(array, 'array');
//>>includeEnd('debug');

startingIndex = defaultValue(startingIndex, 0);
Expand All @@ -844,9 +834,7 @@ define([
*/
BoundingSphere.unpack = function(array, startingIndex, result) {
//>>includeStart('debug', pragmas.debug);
if (!defined(array)) {
throw new DeveloperError('array is required');
}
Check.defined(array, 'array');
//>>includeEnd('debug');

startingIndex = defaultValue(startingIndex, 0);
Expand Down Expand Up @@ -875,13 +863,8 @@ define([
*/
BoundingSphere.union = function(left, right, result) {
//>>includeStart('debug', pragmas.debug);
if (!defined(left)) {
throw new DeveloperError('left is required.');
}

if (!defined(right)) {
throw new DeveloperError('right is required.');
}
Check.typeOf.object(left, 'left');
Check.typeOf.object(right, 'right');
//>>includeEnd('debug');

if (!defined(result)) {
Expand Down Expand Up @@ -932,13 +915,8 @@ define([
*/
BoundingSphere.expand = function(sphere, point, result) {
//>>includeStart('debug', pragmas.debug);
if (!defined(sphere)) {
throw new DeveloperError('sphere is required.');
}

if (!defined(point)) {
throw new DeveloperError('point is required.');
}
Check.typeOf.object(sphere, 'sphere');
Check.typeOf.object(point, 'point');
//>>includeEnd('debug');

result = BoundingSphere.clone(sphere, result);
Expand All @@ -963,13 +941,8 @@ define([
*/
BoundingSphere.intersectPlane = function(sphere, plane) {
//>>includeStart('debug', pragmas.debug);
if (!defined(sphere)) {
throw new DeveloperError('sphere is required.');
}

if (!defined(plane)) {
throw new DeveloperError('plane is required.');
}
Check.typeOf.object(sphere, 'sphere');
Check.typeOf.object(plane, 'plane');
//>>includeEnd('debug');

var center = sphere.center;
Expand Down Expand Up @@ -997,13 +970,8 @@ define([
*/
BoundingSphere.transform = function(sphere, transform, result) {
//>>includeStart('debug', pragmas.debug);
if (!defined(sphere)) {
throw new DeveloperError('sphere is required.');
}

if (!defined(transform)) {
throw new DeveloperError('transform is required.');
}
Check.typeOf.object(sphere, 'sphere');
Check.typeOf.object(transform, 'transform');
//>>includeEnd('debug');

if (!defined(result)) {
Expand Down Expand Up @@ -1033,12 +1001,8 @@ define([
*/
BoundingSphere.distanceSquaredTo = function(sphere, cartesian) {
//>>includeStart('debug', pragmas.debug);
if (!defined(sphere)) {
throw new DeveloperError('sphere is required.');
}
if (!defined(cartesian)) {
throw new DeveloperError('cartesian is required.');
}
Check.typeOf.object(sphere, 'sphere');
Check.typeOf.object(cartesian, 'cartesian');
//>>includeEnd('debug');

var diff = Cartesian3.subtract(sphere.center, cartesian, distanceSquaredToScratch);
Expand All @@ -1062,13 +1026,8 @@ define([
*/
BoundingSphere.transformWithoutScale = function(sphere, transform, result) {
//>>includeStart('debug', pragmas.debug);
if (!defined(sphere)) {
throw new DeveloperError('sphere is required.');
}

if (!defined(transform)) {
throw new DeveloperError('transform is required.');
}
Check.typeOf.object(sphere, 'sphere');
Check.typeOf.object(transform, 'transform');
//>>includeEnd('debug');

if (!defined(result)) {
Expand Down Expand Up @@ -1097,17 +1056,9 @@ define([
*/
BoundingSphere.computePlaneDistances = function(sphere, position, direction, result) {
//>>includeStart('debug', pragmas.debug);
if (!defined(sphere)) {
throw new DeveloperError('sphere is required.');
}

if (!defined(position)) {
throw new DeveloperError('position is required.');
}

if (!defined(direction)) {
throw new DeveloperError('direction is required.');
}
Check.typeOf.object(sphere, 'sphere');
Check.typeOf.object(position, 'position');
Check.typeOf.object(direction, 'direction');
//>>includeEnd('debug');

if (!defined(result)) {
Expand Down Expand Up @@ -1144,9 +1095,7 @@ define([
*/
BoundingSphere.projectTo2D = function(sphere, projection, result) {
//>>includeStart('debug', pragmas.debug);
if (!defined(sphere)) {
throw new DeveloperError('sphere is required.');
}
Check.typeOf.object(sphere, 'sphere');
//>>includeEnd('debug');

projection = defaultValue(projection, projectTo2DProjection);
Expand Down Expand Up @@ -1243,12 +1192,8 @@ define([
*/
BoundingSphere.isOccluded = function(sphere, occluder) {
//>>includeStart('debug', pragmas.debug);
if (!defined(sphere)) {
throw new DeveloperError('sphere is required.');
}
if (!defined(occluder)) {
throw new DeveloperError('occluder is required.');
}
Check.typeOf.object(sphere, 'sphere');
Check.typeOf.object(occluder, 'occluder');
//>>includeEnd('debug');
return !occluder.isBoundingSphereVisible(sphere);
};
Expand Down
2 changes: 1 addition & 1 deletion Source/Scene/ImageryProvider.js
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ define([
* too many requests pending, this function will instead return undefined, indicating
* that the request should be retried later.
*
* @param {ImageryProvider} imageryProvider The imagery provider
* @param {ImageryProvider} imageryProvider The imagery provider for the URL
* @param {String} url The URL of the image.
* @param {Number} [distance] The distance of the tile from the camera, used to prioritize requests.
* @returns {Promise.<Image|Canvas>|undefined} A promise for the image that will resolve when the image is available, or
Expand Down
Loading

0 comments on commit 4fd5e6c

Please sign in to comment.