From c86cf71d8a996d652e88072784e2ad2b0d49bc0c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Lozier?= Date: Thu, 6 Jul 2017 14:44:48 -0400 Subject: [PATCH 1/2] Documentation fixes --- Source/Core/GoogleEarthEnterpriseMetadata.js | 4 +- .../GoogleEarthEnterpriseTerrainProvider.js | 34 +++++++------- Source/Core/Iso8601.js | 9 ++++ Source/Core/ScreenSpaceEventHandler.js | 1 + Source/Core/TimeStandard.js | 5 +++ Source/Core/Transforms.js | 44 ++++++++++--------- Source/DataSources/PolygonGraphics.js | 2 +- Source/Scene/OrthographicFrustum.js | 4 +- .../Cesium3DTilesInspectorViewModel.js | 2 + 9 files changed, 63 insertions(+), 42 deletions(-) diff --git a/Source/Core/GoogleEarthEnterpriseMetadata.js b/Source/Core/GoogleEarthEnterpriseMetadata.js index e3d2fd0076f9..9cff0a945fbb 100644 --- a/Source/Core/GoogleEarthEnterpriseMetadata.js +++ b/Source/Core/GoogleEarthEnterpriseMetadata.js @@ -157,7 +157,7 @@ define([ /** * Gets the proxy used for metadata requests. - * @memberof GoogleEarthEnterpriseImageryProvider.prototype + * @memberof GoogleEarthEnterpriseMetadata.prototype * @type {Proxy} * @readonly */ @@ -169,7 +169,7 @@ define([ /** * Gets a promise that resolves to true when the metadata is ready for use. - * @memberof GoogleEarthEnterpriseProvider.prototype + * @memberof GoogleEarthEnterpriseMetadata.prototype * @type {Promise.} * @readonly */ diff --git a/Source/Core/GoogleEarthEnterpriseTerrainProvider.js b/Source/Core/GoogleEarthEnterpriseTerrainProvider.js index 86e20aed6abc..69a88d3460c3 100644 --- a/Source/Core/GoogleEarthEnterpriseTerrainProvider.js +++ b/Source/Core/GoogleEarthEnterpriseTerrainProvider.js @@ -185,7 +185,7 @@ define([ defineProperties(GoogleEarthEnterpriseTerrainProvider.prototype, { /** * Gets the name of the Google Earth Enterprise server url hosting the imagery. - * @memberof GoogleEarthEnterpriseProvider.prototype + * @memberof GoogleEarthEnterpriseTerrainProvider.prototype * @type {String} * @readonly */ @@ -197,7 +197,7 @@ define([ /** * Gets the proxy used by this provider. - * @memberof GoogleEarthEnterpriseProvider.prototype + * @memberof GoogleEarthEnterpriseTerrainProvider.prototype * @type {Proxy} * @readonly */ @@ -209,8 +209,8 @@ define([ /** * Gets the tiling scheme used by this provider. This function should - * not be called before {@link GoogleEarthEnterpriseProvider#ready} returns true. - * @memberof GoogleEarthEnterpriseProvider.prototype + * not be called before {@link GoogleEarthEnterpriseTerrainProvider#ready} returns true. + * @memberof GoogleEarthEnterpriseTerrainProvider.prototype * @type {TilingScheme} * @readonly */ @@ -230,7 +230,7 @@ define([ * Gets an event that is raised when the imagery provider encounters an asynchronous error. By subscribing * to the event, you will be notified of the error and can potentially recover from it. Event listeners * are passed an instance of {@link TileProviderError}. - * @memberof GoogleEarthEnterpriseProvider.prototype + * @memberof GoogleEarthEnterpriseTerrainProvider.prototype * @type {Event} * @readonly */ @@ -242,7 +242,7 @@ define([ /** * Gets a value indicating whether or not the provider is ready for use. - * @memberof GoogleEarthEnterpriseProvider.prototype + * @memberof GoogleEarthEnterpriseTerrainProvider.prototype * @type {Boolean} * @readonly */ @@ -254,7 +254,7 @@ define([ /** * Gets a promise that resolves to true when the provider is ready for use. - * @memberof GoogleEarthEnterpriseProvider.prototype + * @memberof GoogleEarthEnterpriseTerrainProvider.prototype * @type {Promise.} * @readonly */ @@ -266,8 +266,8 @@ define([ /** * Gets the credit to display when this terrain provider is active. Typically this is used to credit - * the source of the terrain. This function should not be called before {@link GoogleEarthEnterpriseProvider#ready} returns true. - * @memberof GoogleEarthEnterpriseProvider.prototype + * the source of the terrain. This function should not be called before {@link GoogleEarthEnterpriseTerrainProvider#ready} returns true. + * @memberof GoogleEarthEnterpriseTerrainProvider.prototype * @type {Credit} * @readonly */ @@ -281,8 +281,8 @@ define([ * Gets a value indicating whether or not the provider includes a water mask. The water mask * indicates which areas of the globe are water rather than land, so they can be rendered * as a reflective surface with animated waves. This function should not be - * called before {@link GoogleEarthEnterpriseProvider#ready} returns true. - * @memberof GoogleEarthEnterpriseProvider.prototype + * called before {@link GoogleEarthEnterpriseTerrainProvider#ready} returns true. + * @memberof GoogleEarthEnterpriseTerrainProvider.prototype * @type {Boolean} */ hasWaterMask : { @@ -293,8 +293,8 @@ define([ /** * Gets a value indicating whether or not the requested tiles include vertex normals. - * This function should not be called before {@link GoogleEarthEnterpriseProvider#ready} returns true. - * @memberof GoogleEarthEnterpriseProvider.prototype + * This function should not be called before {@link GoogleEarthEnterpriseTerrainProvider#ready} returns true. + * @memberof GoogleEarthEnterpriseTerrainProvider.prototype * @type {Boolean} */ hasVertexNormals : { @@ -306,9 +306,9 @@ define([ /** * Gets an object that can be used to determine availability of terrain from this provider, such as * at points and in rectangles. This function should not be called before - * {@link GoogleEarthEnterpriseProvider#ready} returns true. This property may be undefined if availability + * {@link GoogleEarthEnterpriseTerrainProvider#ready} returns true. This property may be undefined if availability * information is not available. - * @memberof GoogleEarthEnterpriseProvider.prototype + * @memberof GoogleEarthEnterpriseTerrainProvider.prototype * @type {TileAvailability} */ availability : { @@ -339,7 +339,7 @@ define([ /** * Requests the geometry for a given tile. This function should not be called before - * {@link GoogleEarthEnterpriseProvider#ready} returns true. The result must include terrain data and + * {@link GoogleEarthEnterpriseTerrainProvider#ready} returns true. The result must include terrain data and * may optionally include a water mask and an indication of which child tiles are available. * * @param {Number} x The X coordinate of the tile for which to request geometry. @@ -350,7 +350,7 @@ define([ * returns undefined instead of a promise, it is an indication that too many requests are already * pending and the request will be retried later. * - * @exception {DeveloperError} This function must not be called before {@link GoogleEarthEnterpriseProvider#ready} + * @exception {DeveloperError} This function must not be called before {@link GoogleEarthEnterpriseTerrainProvider#ready} * returns true. */ GoogleEarthEnterpriseTerrainProvider.prototype.requestTileGeometry = function(x, y, level, request) { diff --git a/Source/Core/Iso8601.js b/Source/Core/Iso8601.js index 564e9954000e..8882fc9d2490 100644 --- a/Source/Core/Iso8601.js +++ b/Source/Core/Iso8601.js @@ -28,18 +28,27 @@ define([ /** * A {@link JulianDate} representing the earliest time representable by an ISO8601 date. * This is equivalent to the date string '0000-01-01T00:00:00Z' + * + * @type {JulianDate} + * @constant */ MINIMUM_VALUE : MINIMUM_VALUE, /** * A {@link JulianDate} representing the latest time representable by an ISO8601 date. * This is equivalent to the date string '9999-12-31T24:00:00Z' + * + * @type {JulianDate} + * @constant */ MAXIMUM_VALUE : MAXIMUM_VALUE, /** * A {@link TimeInterval} representing the largest interval representable by an ISO8601 interval. * This is equivalent to the interval string '0000-01-01T00:00:00Z/9999-12-31T24:00:00Z' + * + * @type {JulianDate} + * @constant */ MAXIMUM_INTERVAL : MAXIMUM_INTERVAL }; diff --git a/Source/Core/ScreenSpaceEventHandler.js b/Source/Core/ScreenSpaceEventHandler.js index 06a5944ebdfd..7a56624cae60 100644 --- a/Source/Core/ScreenSpaceEventHandler.js +++ b/Source/Core/ScreenSpaceEventHandler.js @@ -786,6 +786,7 @@ define([ /** * The amount of time, in milliseconds, that mouse events will be disabled after * receiving any touch events, such that any emulated mouse events will be ignored. + * @type {Number} * @default 800 */ ScreenSpaceEventHandler.mouseEmulationIgnoreMilliseconds = 800; diff --git a/Source/Core/TimeStandard.js b/Source/Core/TimeStandard.js index 5f08446a3eab..89fd612b138d 100644 --- a/Source/Core/TimeStandard.js +++ b/Source/Core/TimeStandard.js @@ -19,12 +19,17 @@ define([ * UTC = TAI - deltaT where deltaT is the number of leap * seconds which have been introduced as of the time in TAI. * + * @type {Number} + * @constant */ UTC : 0, /** * Represents the International Atomic Time (TAI) time standard. * TAI is the principal time standard to which the other time standards are related. + * + * @type {Number} + * @constant */ TAI : 1 }; diff --git a/Source/Core/Transforms.js b/Source/Core/Transforms.js index 9a3276a31018..8e097ca48789 100644 --- a/Source/Core/Transforms.js +++ b/Source/Core/Transforms.js @@ -222,6 +222,7 @@ define([ *
  • The z axis points in the direction of the ellipsoid surface normal which passes through the position.
  • * * + * @function * @param {Cartesian3} origin The center point of the local reference frame. * @param {Ellipsoid} [ellipsoid=Ellipsoid.WGS84] The ellipsoid whose fixed frame is used in the transformation. * @param {Matrix4} [result] The object onto which to store the result. @@ -244,6 +245,7 @@ define([ *
  • The z axis points in the opposite direction of the ellipsoid surface normal which passes through the position.
  • * * + * @function * @param {Cartesian3} origin The center point of the local reference frame. * @param {Ellipsoid} [ellipsoid=Ellipsoid.WGS84] The ellipsoid whose fixed frame is used in the transformation. * @param {Matrix4} [result] The object onto which to store the result. @@ -266,6 +268,7 @@ define([ *
  • The z axis points in the local east direction.
  • * * + * @function * @param {Cartesian3} origin The center point of the local reference frame. * @param {Ellipsoid} [ellipsoid=Ellipsoid.WGS84] The ellipsoid whose fixed frame is used in the transformation. * @param {Matrix4} [result] The object onto which to store the result. @@ -279,26 +282,27 @@ define([ Transforms.northUpEastToFixedFrame = Transforms.localFrameToFixedFrameGenerator('north','up'); /** - * Computes a 4x4 transformation matrix from a reference frame with an north-west-up axes - * centered at the provided origin to the provided ellipsoid's fixed reference frame. - * The local axes are defined as: - *
      - *
    • The x axis points in the local north direction.
    • - *
    • The y axis points in the local west direction.
    • - *
    • The z axis points in the direction of the ellipsoid surface normal which passes through the position.
    • - *
    - * - * @param {Cartesian3} origin The center point of the local reference frame. - * @param {Ellipsoid} [ellipsoid=Ellipsoid.WGS84] The ellipsoid whose fixed frame is used in the transformation. - * @param {Matrix4} [result] The object onto which to store the result. - * @returns {Matrix4} The modified result parameter or a new Matrix4 instance if none was provided. - * - * @example - * // Get the transform from local north-West-Up at cartographic (0.0, 0.0) to Earth's fixed frame. - * var center = Cesium.Cartesian3.fromDegrees(0.0, 0.0); - * var transform = Cesium.Transforms.northWestUpToFixedFrame(center); - */ - Transforms.northWestUpToFixedFrame = Transforms.localFrameToFixedFrameGenerator('north','west'); + * Computes a 4x4 transformation matrix from a reference frame with an north-west-up axes + * centered at the provided origin to the provided ellipsoid's fixed reference frame. + * The local axes are defined as: + *
      + *
    • The x axis points in the local north direction.
    • + *
    • The y axis points in the local west direction.
    • + *
    • The z axis points in the direction of the ellipsoid surface normal which passes through the position.
    • + *
    + * + * @function + * @param {Cartesian3} origin The center point of the local reference frame. + * @param {Ellipsoid} [ellipsoid=Ellipsoid.WGS84] The ellipsoid whose fixed frame is used in the transformation. + * @param {Matrix4} [result] The object onto which to store the result. + * @returns {Matrix4} The modified result parameter or a new Matrix4 instance if none was provided. + * + * @example + * // Get the transform from local north-West-Up at cartographic (0.0, 0.0) to Earth's fixed frame. + * var center = Cesium.Cartesian3.fromDegrees(0.0, 0.0); + * var transform = Cesium.Transforms.northWestUpToFixedFrame(center); + */ + Transforms.northWestUpToFixedFrame = Transforms.localFrameToFixedFrameGenerator('north','west'); var scratchHPRQuaternion = new Quaternion(); var scratchScale = new Cartesian3(1.0, 1.0, 1.0); diff --git a/Source/DataSources/PolygonGraphics.js b/Source/DataSources/PolygonGraphics.js index cfec1fba9f54..a2361ec5b230 100644 --- a/Source/DataSources/PolygonGraphics.js +++ b/Source/DataSources/PolygonGraphics.js @@ -219,7 +219,7 @@ define([ /** * Gets or sets the {@link DistanceDisplayCondition} Property specifying at what distance from the camera that this polygon will be displayed. - * @memberof BillboardGraphics.prototype + * @memberof PolygonGraphics.prototype * @type {Property} */ distanceDisplayCondition : createPropertyDescriptor('distanceDisplayCondition') diff --git a/Source/Scene/OrthographicFrustum.js b/Source/Scene/OrthographicFrustum.js index 7d36ab91817f..197e444f0a22 100644 --- a/Source/Scene/OrthographicFrustum.js +++ b/Source/Scene/OrthographicFrustum.js @@ -16,13 +16,13 @@ define([ * define the unit vector normal to the plane, and the w component is the distance of the * plane from the origin/camera position. * - * @alias OrthographicOffCenterFrustum + * @alias OrthographicFrustum * @constructor * * @example * var maxRadii = ellipsoid.maximumRadius; * - * var frustum = new Cesium.OrthographicOffCenterFrustum(); + * var frustum = new Cesium.OrthographicFrustum(); * frustum.near = 0.01 * maxRadii; * frustum.far = 50.0 * maxRadii; */ diff --git a/Source/Widgets/Cesium3DTilesInspector/Cesium3DTilesInspectorViewModel.js b/Source/Widgets/Cesium3DTilesInspector/Cesium3DTilesInspectorViewModel.js index 087e97918e5f..b59e3b5d668f 100644 --- a/Source/Widgets/Cesium3DTilesInspector/Cesium3DTilesInspectorViewModel.js +++ b/Source/Widgets/Cesium3DTilesInspector/Cesium3DTilesInspectorViewModel.js @@ -1227,6 +1227,8 @@ define([ /** * Generates an HTML string of the statistics + * + * @function * @param {Cesium3DTileset} tileset The tileset * @param {Boolean} isPick Whether this is getting the statistics for the pick pass * @returns {String} The formatted statistics From 05b9dcec4e7e61476ff3055cf9c8bb8a08cd43d4 Mon Sep 17 00:00:00 2001 From: Hannah Date: Tue, 11 Jul 2017 09:33:28 -0400 Subject: [PATCH 2/2] Update CHANGES.md --- CHANGES.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGES.md b/CHANGES.md index 2cd1c2c0c442..0d47f81cf748 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -5,6 +5,7 @@ Change Log * Fixed a bug where a Model's compressed textures were not being displayed. [#5596](https://github.com/AnalyticalGraphicsInc/cesium/pull/5596) * Fixed a bug where jsep was undefined when using webpack [#5593](https://github.com/AnalyticalGraphicsInc/cesium/issues/5593) +* Fixed documentation for `OrthographicFrustum` [#5586](https://github.com/AnalyticalGraphicsInc/cesium/issues/5586) ### 1.35 - 2017-07-05