Skip to content

Commit

Permalink
Merge pull request #1891 from AnalyticalGraphicsInc/documentFunctions
Browse files Browse the repository at this point in the history
Documentation improvements and cleanup
  • Loading branch information
mramato committed Jul 7, 2014
2 parents 17a35d1 + f08f491 commit 8486227
Show file tree
Hide file tree
Showing 83 changed files with 524 additions and 242 deletions.
3 changes: 2 additions & 1 deletion Source/Core/ClockRange.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ define([
* Constants used by {@link Clock#tick} to determine behavior
* when {@link Clock#startTime} or {@link Clock#stopTime} is reached.
*
* @exports ClockRange
* @namespace
* @alias ClockRange
*
* @see Clock
* @see ClockStep
Expand Down
3 changes: 2 additions & 1 deletion Source/Core/ClockStep.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ define([
* Constants to determine how much time advances with each call
* to {@link Clock#tick}.
*
* @exports ClockStep
* @namespace
* @alias ClockStep
*
* @see Clock
* @see ClockRange
Expand Down
3 changes: 2 additions & 1 deletion Source/Core/ComponentDatatype.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ define([
* WebGL component datatypes. Components are intrinsics,
* which form attributes, which form vertices.
*
* @exports ComponentDatatype
* @namespace
* @alias ComponentDatatype
*/
var ComponentDatatype = {
/**
Expand Down
17 changes: 13 additions & 4 deletions Source/Core/CornerType.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,18 @@ define([
"use strict";

/**
* @exports CornerType
* Style options for corners.
*
* @namespace
* @alias CornerType
*/
var CornerType = {
/**
* ___
* <pre>
* _____
* ( ___
* | |
* </pre>
*
* Corner is circular.
* @type {Number}
Expand All @@ -21,9 +26,11 @@ define([
ROUNDED : 0,

/**
* <pre>
* ______
* | ___
* | ____
* | |
* </pre>
*
* Corner point is the intersection of adjacent edges.
* @type {Number}
Expand All @@ -32,9 +39,11 @@ define([
MITERED : 1,

/**
* ___
* <pre>
* _____
* / ___
* | |
* </pre>
*
* Corner is clipped.
* @type {Number}
Expand Down
2 changes: 1 addition & 1 deletion Source/Core/CorridorGeometry.js
Original file line number Diff line number Diff line change
Expand Up @@ -634,7 +634,7 @@ define([
* @param {Number} [options.height=0] The distance in meters between the ellipsoid surface and the positions.
* @param {Number} [options.extrudedHeight] The distance in meters between the ellipsoid surface and the extrusion.
* @param {VertexFormat} [options.vertexFormat=VertexFormat.DEFAULT] The vertex attributes to be computed.
* @param {Boolean} [options.cornerType=CornerType.ROUNDED] Determines the style of the corners.
* @param {CornerType} [options.cornerType=CornerType.ROUNDED] Determines the style of the corners.
*
* @see CorridorGeometry.createGeometry
*
Expand Down
2 changes: 1 addition & 1 deletion Source/Core/CorridorOutlineGeometry.js
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ define([
* @param {Number} [options.granularity=CesiumMath.RADIANS_PER_DEGREE] The distance, in radians, between each latitude and longitude. Determines the number of positions in the buffer.
* @param {Number} [options.height=0] The distance between the ellipsoid surface and the positions.
* @param {Number} [options.extrudedHeight] The distance between the ellipsoid surface and the extrusion.
* @param {Boolean} [options.cornerType=CornerType.ROUNDED] Determines the style of the corners.
* @param {CornerType} [options.cornerType=CornerType.ROUNDED] Determines the style of the corners.
*
* @see CorridorOutlineGeometry.createGeometry
*
Expand Down
3 changes: 2 additions & 1 deletion Source/Core/CubicRealPolynomial.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ define([
/**
* Defines functions for 3rd order polynomial functions of one variable with only real coefficients.
*
* @exports CubicRealPolynomial
* @namespace
* @alias CubicRealPolynomial
*/
var CubicRealPolynomial = {};

Expand Down
3 changes: 2 additions & 1 deletion Source/Core/EasingFunction.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ define([
* {@link https://github.com/sole/tween.js/|Tween.js} and Robert Penner. See the
* {@link http://sole.github.io/tween.js/examples/03_graphs.html|Tween.js graphs for each function}.
*
* @exports EasingFunction
* @namespace
* @alias EasingFunction
*
* @private
*/
Expand Down
11 changes: 8 additions & 3 deletions Source/Core/Event.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ define([
* @memberof Event.prototype
* @type {Number}
*/
numberOfListeners: {
numberOfListeners : {
get : function() {
return this._listeners.length;
}
Expand All @@ -52,8 +52,8 @@ define([
*
* @param {Function} listener The function to be executed when the event is raised.
* @param {Object} [scope] An optional object scope to serve as the <code>this</code>
* pointer in which the listener function will execute.
* @returns {Function} A function that will remove this event listener when invoked.
* pointer in which the listener function will execute.
* @returns {Event~RemoveCallback} A function that will remove this event listener when invoked.
*
* @see Event#raiseEvent
* @see Event#removeEventListener
Expand Down Expand Up @@ -128,5 +128,10 @@ define([
}
};

/**
* A function that removes a listener.
* @callback Event~RemoveCallback
*/

return Event;
});
9 changes: 7 additions & 2 deletions Source/Core/EventHelper.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ define([
* @param {Event} event The event to attach to.
* @param {Function} listener The function to be executed when the event is raised.
* @param {Object} [scope] An optional object scope to serve as the <code>this</code>
* pointer in which the listener function will execute.
* @returns {Function} A function that will remove this event listener when invoked.
* pointer in which the listener function will execute.
* @returns {EventHelper~RemoveCallback} A function that will remove this event listener when invoked.
*
* @see Event#addEventListener
*/
Expand Down Expand Up @@ -72,5 +72,10 @@ define([
removalFunctions.length = 0;
};

/**
* A function that removes a listener.
* @callback EventHelper~RemoveCallback
*/

return EventHelper;
});
3 changes: 2 additions & 1 deletion Source/Core/FeatureDetection.js
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,8 @@ define([
* A set of functions to detect whether the current browser supports
* various features.
*
* @exports FeatureDetection
* @namespace
* @alias FeatureDetection
*/
var FeatureDetection = {
isChrome : isChrome,
Expand Down
7 changes: 4 additions & 3 deletions Source/Core/Fullscreen.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ define([
/**
* Browser-independent functions for working with the standard fullscreen API.
*
* @exports Fullscreen
* @namespace
* @alias Fullscreen
*
* @see {@link http://dvcs.w3.org/hg/fullscreen/raw-file/tip/Overview.html|W3C Fullscreen Living Specification}
*/
Expand All @@ -33,7 +34,7 @@ define([
* @memberof Fullscreen
* @type {Object}
*/
element: {
element : {
get : function() {
if (!Fullscreen.supportsFullscreen()) {
return undefined;
Expand Down Expand Up @@ -139,7 +140,7 @@ define([
//check for the correct combination of prefix plus the various names that browsers use
var prefixes = ['webkit', 'moz', 'o', 'ms', 'khtml'];
var name;
for ( var i = 0, len = prefixes.length; i < len; ++i) {
for (var i = 0, len = prefixes.length; i < len; ++i) {
var prefix = prefixes[i];

// casing of Fullscreen differs across browsers
Expand Down
3 changes: 2 additions & 1 deletion Source/Core/GeometryPipeline.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,8 @@ define([
/**
* Content pipeline functions for geometries.
*
* @exports GeometryPipeline
* @namespace
* @alias GeometryPipeline
*
* @see Geometry
*/
Expand Down
21 changes: 11 additions & 10 deletions Source/Core/HeightmapTessellator.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ define([
/**
* Contains functions to create a mesh from a heightmap image.
*
* @exports HeightmapTessellator
* @namespace
* @alias HeightmapTessellator
*/
var HeightmapTessellator = {};

Expand All @@ -30,13 +31,13 @@ define([
* @constant
*/
HeightmapTessellator.DEFAULT_STRUCTURE = freezeObject({
heightScale : 1.0,
heightOffset : 0.0,
elementsPerHeight : 1,
stride : 1,
elementMultiplier : 256.0,
isBigEndian : false
});
heightScale : 1.0,
heightOffset : 0.0,
elementsPerHeight : 1,
stride : 1,
elementMultiplier : 256.0,
isBigEndian : false
});

/**
* Fills an array of vertices from a heightmap image. On return, the vertex data is in the order
Expand Down Expand Up @@ -211,7 +212,7 @@ define([
++endCol;
}

for ( var rowIndex = startRow; rowIndex < endRow; ++rowIndex) {
for (var rowIndex = startRow; rowIndex < endRow; ++rowIndex) {
var row = rowIndex;
if (row < 0) {
row = 0;
Expand All @@ -234,7 +235,7 @@ define([

var v = (latitude - geographicSouth) / (geographicNorth - geographicSouth);

for ( var colIndex = startCol; colIndex < endCol; ++colIndex) {
for (var colIndex = startCol; colIndex < endCol; ++colIndex) {
var col = colIndex;
if (col < 0) {
col = 0;
Expand Down
4 changes: 3 additions & 1 deletion Source/Core/HermitePolynomialApproximation.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,9 @@ define([

/**
* An {@link InterpolationAlgorithm} for performing Hermite interpolation.
* @exports HermitePolynomialApproximation
*
* @namespace
* @alias HermitePolynomialApproximation
*/
var HermitePolynomialApproximation = {
type : 'Hermite'
Expand Down
4 changes: 3 additions & 1 deletion Source/Core/Iau2000Orientation.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@ define([
* This is a collection of the orientation information available for central bodies.
* The data comes from the Report of the IAU/IAG Working Group on Cartographic
* Coordinates and Rotational Elements: 2000.
* @exports Iau2000Orientation
*
* @namespace
* @alias Iau2000Orientation
*
* @private
*/
Expand Down
11 changes: 9 additions & 2 deletions Source/Core/IauOrientationAxes.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@ define([
* @alias IauOrientationAxes
* @constructor
*
* @param {Function} [computeFunction] The function that computes the {@link IauOrientationParameters} given a {@link JulianDate}.
* @param {IauOrientationAxes~ComputeFunction} [computeFunction] The function that computes the {@link IauOrientationParameters} given a {@link JulianDate}.
*
* @see Iau2000Orientation
*
* @private
*/
var IauOrientationAxes = function (computeFunction) {
var IauOrientationAxes = function(computeFunction) {
if (!defined(computeFunction) || typeof computeFunction !== 'function') {
computeFunction = Iau2000Orientation.ComputeMoon;
}
Expand Down Expand Up @@ -99,5 +99,12 @@ define([
return cbi2cbf;
};

/**
* A function that computes the {@link IauOrientationParameters} for a {@link JulianDate}.
* @callback IauOrientationAxes~ComputeFunction
* @param {JulianDate} date The date to evaluate the parameters.
* @returns {IauOrientationParameters} The orientation parameters.
*/

return IauOrientationAxes;
});
4 changes: 3 additions & 1 deletion Source/Core/IauOrientationParameters.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ define(function() {
* These parameters correspond to the parameters in the Report from the IAU/IAG Working Group
* except that they are expressed in radians.
* </p>
* @exports IauOrientationParameters
*
* @namespace
* @alias IauOrientationParameters
*
* @private
*/
Expand Down
3 changes: 2 additions & 1 deletion Source/Core/IndexDatatype.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ define([
* Constants for WebGL index datatypes. These corresponds to the
* <code>type</code> parameter of {@link http://www.khronos.org/opengles/sdk/docs/man/xhtml/glDrawElements.xml|drawElements}.
*
* @exports IndexDatatype
* @namespace
* @alias IndexDatatype
*/
var IndexDatatype = {
/**
Expand Down
4 changes: 3 additions & 1 deletion Source/Core/InterpolationAlgorithm.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ define([

/**
* The interface for interpolation algorithms.
* @exports InterpolationAlgorithm
*
* @namespace
* @alias InterpolationAlgorithm
*
* @see LagrangePolynomialApproximation
* @see LinearApproximation
Expand Down
3 changes: 2 additions & 1 deletion Source/Core/Intersect.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ define([
* partially inside the frustum and partially outside (INTERSECTING), or somwhere entirely
* outside of the frustum's 6 planes (OUTSIDE).
*
* @exports Intersect
* @namespace
* @alias Intersect
*/
var Intersect = {
/**
Expand Down
3 changes: 2 additions & 1 deletion Source/Core/IntersectionTests.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ define([
/**
* Functions for computing the intersection between geometries such as rays, planes, triangles, and ellipsoids.
*
* @exports IntersectionTests
* @namespace
* @alias IntersectionTests
*/
var IntersectionTests = {};

Expand Down
4 changes: 3 additions & 1 deletion Source/Core/Intersections2D.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@ define([

/**
* Contains functions for operating on 2D triangles.
* @exports Intersections2D
*
* @namespace
* @alias Intersections2D
*/
var Intersections2D = {};

Expand Down
3 changes: 2 additions & 1 deletion Source/Core/Iso8601.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ define([
/**
* Constants related to ISO8601 support.
*
* @exports Iso8601
* @namespace
* @alias Iso8601
*
* @see {@link http://en.wikipedia.org/wiki/ISO_8601|ISO 8601 on Wikipedia}
* @see JulianDate
Expand Down
Loading

0 comments on commit 8486227

Please sign in to comment.