Skip to content

Commit

Permalink
Merge pull request #6275 from AnalyticalGraphicsInc/geometry-entity-s…
Browse files Browse the repository at this point in the history
…pecs

Consolidate duplicate specs for geometry entities
  • Loading branch information
mramato authored Feb 27, 2018
2 parents 57971e6 + 4ea3c6b commit d3e878d
Show file tree
Hide file tree
Showing 26 changed files with 1,182 additions and 4,446 deletions.
8 changes: 0 additions & 8 deletions Source/DataSources/BoxGeometryUpdater.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,16 @@ define([
'../Core/Color',
'../Core/ColorGeometryInstanceAttribute',
'../Core/defined',
'../Core/destroyObject',
'../Core/DeveloperError',
'../Core/DistanceDisplayConditionGeometryInstanceAttribute',
'../Core/GeometryInstance',
'../Core/Iso8601',
'../Core/ShowGeometryInstanceAttribute',
'../Scene/MaterialAppearance',
'../Scene/PerInstanceColorAppearance',
'../Scene/Primitive',
'./ColorMaterialProperty',
'./DynamicGeometryUpdater',
'./GeometryUpdater',
'./MaterialProperty',
'./Property'
], function(
BoxGeometry,
Expand All @@ -28,19 +25,16 @@ define([
Color,
ColorGeometryInstanceAttribute,
defined,
destroyObject,
DeveloperError,
DistanceDisplayConditionGeometryInstanceAttribute,
GeometryInstance,
Iso8601,
ShowGeometryInstanceAttribute,
MaterialAppearance,
PerInstanceColorAppearance,
Primitive,
ColorMaterialProperty,
DynamicGeometryUpdater,
GeometryUpdater,
MaterialProperty,
Property) {
'use strict';

Expand Down Expand Up @@ -69,8 +63,6 @@ define([
geometryPropertyName : 'box',
observedPropertyNames : ['availability', 'position', 'orientation', 'box']
});

this._isClosed = true;
}

if (defined(Object.create)) {
Expand Down
6 changes: 0 additions & 6 deletions Source/DataSources/CorridorGeometryUpdater.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ define([
'../Core/CorridorGeometry',
'../Core/CorridorOutlineGeometry',
'../Core/defined',
'../Core/destroyObject',
'../Core/DeveloperError',
'../Core/DistanceDisplayConditionGeometryInstanceAttribute',
'../Core/GeometryInstance',
Expand All @@ -14,11 +13,9 @@ define([
'../Scene/GroundPrimitive',
'../Scene/MaterialAppearance',
'../Scene/PerInstanceColorAppearance',
'../Scene/Primitive',
'./ColorMaterialProperty',
'./DynamicGeometryUpdater',
'./GeometryUpdater',
'./MaterialProperty',
'./Property'
], function(
Check,
Expand All @@ -27,7 +24,6 @@ define([
CorridorGeometry,
CorridorOutlineGeometry,
defined,
destroyObject,
DeveloperError,
DistanceDisplayConditionGeometryInstanceAttribute,
GeometryInstance,
Expand All @@ -36,11 +32,9 @@ define([
GroundPrimitive,
MaterialAppearance,
PerInstanceColorAppearance,
Primitive,
ColorMaterialProperty,
DynamicGeometryUpdater,
GeometryUpdater,
MaterialProperty,
Property) {
'use strict';

Expand Down
8 changes: 0 additions & 8 deletions Source/DataSources/CylinderGeometryUpdater.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,16 @@ define([
'../Core/CylinderGeometry',
'../Core/CylinderOutlineGeometry',
'../Core/defined',
'../Core/destroyObject',
'../Core/DeveloperError',
'../Core/DistanceDisplayConditionGeometryInstanceAttribute',
'../Core/GeometryInstance',
'../Core/Iso8601',
'../Core/ShowGeometryInstanceAttribute',
'../Scene/MaterialAppearance',
'../Scene/PerInstanceColorAppearance',
'../Scene/Primitive',
'./ColorMaterialProperty',
'./DynamicGeometryUpdater',
'./GeometryUpdater',
'./MaterialProperty',
'./Property'
], function(
Cartesian3,
Expand All @@ -28,19 +25,16 @@ define([
CylinderGeometry,
CylinderOutlineGeometry,
defined,
destroyObject,
DeveloperError,
DistanceDisplayConditionGeometryInstanceAttribute,
GeometryInstance,
Iso8601,
ShowGeometryInstanceAttribute,
MaterialAppearance,
PerInstanceColorAppearance,
Primitive,
ColorMaterialProperty,
DynamicGeometryUpdater,
GeometryUpdater,
MaterialProperty,
Property) {
'use strict';

Expand Down Expand Up @@ -73,8 +67,6 @@ define([
geometryPropertyName: 'cylinder',
observedPropertyNames: ['availability', 'position', 'orientation', 'cylinder']
});

this._isClosed = true;
}

if (defined(Object.create)) {
Expand Down
6 changes: 6 additions & 0 deletions Source/DataSources/DynamicGeometryUpdater.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,12 @@ define([
* @private
*/
function DynamicGeometryUpdater(geometryUpdater, primitives, groundPrimitives) {
//>>includeStart('debug', pragmas.debug);
Check.defined('geometryUpdater', geometryUpdater);
Check.defined('primitives', primitives);
Check.defined('groundPrimitives', groundPrimitives);
//>>includeEnd('debug');

this._primitives = primitives;
this._groundPrimitives = groundPrimitives;
this._primitive = undefined;
Expand Down
6 changes: 0 additions & 6 deletions Source/DataSources/EllipseGeometryUpdater.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ define([
'../Core/Color',
'../Core/ColorGeometryInstanceAttribute',
'../Core/defined',
'../Core/destroyObject',
'../Core/DeveloperError',
'../Core/DistanceDisplayConditionGeometryInstanceAttribute',
'../Core/EllipseGeometry',
Expand All @@ -14,18 +13,15 @@ define([
'../Scene/GroundPrimitive',
'../Scene/MaterialAppearance',
'../Scene/PerInstanceColorAppearance',
'../Scene/Primitive',
'./ColorMaterialProperty',
'./DynamicGeometryUpdater',
'./GeometryUpdater',
'./MaterialProperty',
'./Property'
], function(
Check,
Color,
ColorGeometryInstanceAttribute,
defined,
destroyObject,
DeveloperError,
DistanceDisplayConditionGeometryInstanceAttribute,
EllipseGeometry,
Expand All @@ -36,11 +32,9 @@ define([
GroundPrimitive,
MaterialAppearance,
PerInstanceColorAppearance,
Primitive,
ColorMaterialProperty,
DynamicGeometryUpdater,
GeometryUpdater,
MaterialProperty,
Property) {
'use strict';

Expand Down
4 changes: 0 additions & 4 deletions Source/DataSources/EllipsoidGeometryUpdater.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ define([
'../Core/ColorGeometryInstanceAttribute',
'../Core/defaultValue',
'../Core/defined',
'../Core/destroyObject',
'../Core/DeveloperError',
'../Core/DistanceDisplayCondition',
'../Core/DistanceDisplayConditionGeometryInstanceAttribute',
'../Core/EllipsoidGeometry',
Expand All @@ -31,8 +29,6 @@ define([
ColorGeometryInstanceAttribute,
defaultValue,
defined,
destroyObject,
DeveloperError,
DistanceDisplayCondition,
DistanceDisplayConditionGeometryInstanceAttribute,
EllipsoidGeometry,
Expand Down
14 changes: 1 addition & 13 deletions Source/DataSources/PlaneGeometryUpdater.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ define([
'../Core/Color',
'../Core/ColorGeometryInstanceAttribute',
'../Core/defined',
'../Core/destroyObject',
'../Core/DeveloperError',
'../Core/DistanceDisplayConditionGeometryInstanceAttribute',
'../Core/GeometryInstance',
Expand All @@ -17,11 +16,9 @@ define([
'../Core/Quaternion',
'../Scene/MaterialAppearance',
'../Scene/PerInstanceColorAppearance',
'../Scene/Primitive',
'./ColorMaterialProperty',
'./DynamicGeometryUpdater',
'./GeometryUpdater',
'./MaterialProperty',
'./Property'
], function(
PlaneGeometry,
Expand All @@ -32,7 +29,6 @@ define([
Color,
ColorGeometryInstanceAttribute,
defined,
destroyObject,
DeveloperError,
DistanceDisplayConditionGeometryInstanceAttribute,
GeometryInstance,
Expand All @@ -42,11 +38,9 @@ define([
Quaternion,
MaterialAppearance,
PerInstanceColorAppearance,
Primitive,
ColorMaterialProperty,
DynamicGeometryUpdater,
GeometryUpdater,
MaterialProperty,
Property) {
'use strict';

Expand Down Expand Up @@ -132,9 +126,6 @@ define([
var modelMatrix = entity.computeModelMatrix(time);
var plane = Property.getValueOrDefault(planeGraphics.plane, time, options.plane);
var dimensions = Property.getValueOrUndefined(planeGraphics.dimensions, time, options.dimensions);
if (!defined(modelMatrix) || !defined(plane) || !defined(dimensions)) {
return;
}

options.plane = plane;
options.dimensions = dimensions;
Expand Down Expand Up @@ -176,9 +167,6 @@ define([
var modelMatrix = entity.computeModelMatrix(time);
var plane = Property.getValueOrDefault(planeGraphics.plane, time, options.plane);
var dimensions = Property.getValueOrUndefined(planeGraphics.dimensions, time, options.dimensions);
if (!defined(modelMatrix) || !defined(plane) || !defined(dimensions)) {
return;
}

options.plane = plane;
options.dimensions = dimensions;
Expand All @@ -201,7 +189,7 @@ define([
return !defined(plane.plane) || !defined(plane.dimensions) || !defined(entity.position) || GeometryUpdater.prototype._isHidden.call(this, entity, plane);
};

GeometryUpdater.prototype._getIsClosed = function(options) {
PlaneGeometryUpdater.prototype._getIsClosed = function(options) {
return false;
};

Expand Down
6 changes: 0 additions & 6 deletions Source/DataSources/PolygonGeometryUpdater.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ define([
'../Core/Color',
'../Core/ColorGeometryInstanceAttribute',
'../Core/defined',
'../Core/destroyObject',
'../Core/DeveloperError',
'../Core/DistanceDisplayConditionGeometryInstanceAttribute',
'../Core/GeometryInstance',
Expand All @@ -16,18 +15,15 @@ define([
'../Scene/GroundPrimitive',
'../Scene/MaterialAppearance',
'../Scene/PerInstanceColorAppearance',
'../Scene/Primitive',
'./ColorMaterialProperty',
'./DynamicGeometryUpdater',
'./GeometryUpdater',
'./MaterialProperty',
'./Property'
], function(
Check,
Color,
ColorGeometryInstanceAttribute,
defined,
destroyObject,
DeveloperError,
DistanceDisplayConditionGeometryInstanceAttribute,
GeometryInstance,
Expand All @@ -40,11 +36,9 @@ define([
GroundPrimitive,
MaterialAppearance,
PerInstanceColorAppearance,
Primitive,
ColorMaterialProperty,
DynamicGeometryUpdater,
GeometryUpdater,
MaterialProperty,
Property) {
'use strict';

Expand Down
8 changes: 0 additions & 8 deletions Source/DataSources/PolylineVolumeGeometryUpdater.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ define([
'../Core/Color',
'../Core/ColorGeometryInstanceAttribute',
'../Core/defined',
'../Core/destroyObject',
'../Core/DeveloperError',
'../Core/DistanceDisplayConditionGeometryInstanceAttribute',
'../Core/GeometryInstance',
Expand All @@ -13,18 +12,15 @@ define([
'../Core/ShowGeometryInstanceAttribute',
'../Scene/MaterialAppearance',
'../Scene/PerInstanceColorAppearance',
'../Scene/Primitive',
'./ColorMaterialProperty',
'./DynamicGeometryUpdater',
'./GeometryUpdater',
'./MaterialProperty',
'./Property'
], function(
Check,
Color,
ColorGeometryInstanceAttribute,
defined,
destroyObject,
DeveloperError,
DistanceDisplayConditionGeometryInstanceAttribute,
GeometryInstance,
Expand All @@ -34,11 +30,9 @@ define([
ShowGeometryInstanceAttribute,
MaterialAppearance,
PerInstanceColorAppearance,
Primitive,
ColorMaterialProperty,
DynamicGeometryUpdater,
GeometryUpdater,
MaterialProperty,
Property) {
'use strict';

Expand Down Expand Up @@ -69,8 +63,6 @@ define([
geometryPropertyName : 'polylineVolume',
observedPropertyNames : ['availability', 'polylineVolume']
});

this._isClosed = true;
}

if (defined(Object.create)) {
Expand Down
Loading

0 comments on commit d3e878d

Please sign in to comment.