123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320 |
- import defaultValue from "../Core/defaultValue.js";
- import defined from "../Core/defined.js";
- import DeveloperError from "../Core/DeveloperError.js";
- import Event from "../Core/Event.js";
- import createMaterialPropertyDescriptor from "./createMaterialPropertyDescriptor.js";
- import createPropertyDescriptor from "./createPropertyDescriptor.js";
- function EllipsoidGraphics(options) {
- this._definitionChanged = new Event();
- this._show = undefined;
- this._showSubscription = undefined;
- this._radii = undefined;
- this._radiiSubscription = undefined;
- this._innerRadii = undefined;
- this._innerRadiiSubscription = undefined;
- this._minimumClock = undefined;
- this._minimumClockSubscription = undefined;
- this._maximumClock = undefined;
- this._maximumClockSubscription = undefined;
- this._minimumCone = undefined;
- this._minimumConeSubscription = undefined;
- this._maximumCone = undefined;
- this._maximumConeSubscription = undefined;
- this._heightReference = undefined;
- this._heightReferenceSubscription = undefined;
- this._fill = undefined;
- this._fillSubscription = undefined;
- this._material = undefined;
- this._materialSubscription = undefined;
- this._outline = undefined;
- this._outlineSubscription = undefined;
- this._outlineColor = undefined;
- this._outlineColorSubscription = undefined;
- this._outlineWidth = undefined;
- this._outlineWidthSubscription = undefined;
- this._stackPartitions = undefined;
- this._stackPartitionsSubscription = undefined;
- this._slicePartitions = undefined;
- this._slicePartitionsSubscription = undefined;
- this._subdivisions = undefined;
- this._subdivisionsSubscription = undefined;
- this._shadows = undefined;
- this._shadowsSubscription = undefined;
- this._distanceDisplayCondition = undefined;
- this._distanceDisplayConditionSubscription = undefined;
- this.merge(defaultValue(options, defaultValue.EMPTY_OBJECT));
- }
- Object.defineProperties(EllipsoidGraphics.prototype, {
-
- definitionChanged: {
- get: function () {
- return this._definitionChanged;
- },
- },
-
- show: createPropertyDescriptor("show"),
-
- radii: createPropertyDescriptor("radii"),
-
- innerRadii: createPropertyDescriptor("innerRadii"),
-
- minimumClock: createPropertyDescriptor("minimumClock"),
-
- maximumClock: createPropertyDescriptor("maximumClock"),
-
- minimumCone: createPropertyDescriptor("minimumCone"),
-
- maximumCone: createPropertyDescriptor("maximumCone"),
-
- heightReference: createPropertyDescriptor("heightReference"),
-
- fill: createPropertyDescriptor("fill"),
-
- material: createMaterialPropertyDescriptor("material"),
-
- outline: createPropertyDescriptor("outline"),
-
- outlineColor: createPropertyDescriptor("outlineColor"),
-
- outlineWidth: createPropertyDescriptor("outlineWidth"),
-
- stackPartitions: createPropertyDescriptor("stackPartitions"),
-
- slicePartitions: createPropertyDescriptor("slicePartitions"),
-
- subdivisions: createPropertyDescriptor("subdivisions"),
-
- shadows: createPropertyDescriptor("shadows"),
-
- distanceDisplayCondition: createPropertyDescriptor(
- "distanceDisplayCondition"
- ),
- });
- EllipsoidGraphics.prototype.clone = function (result) {
- if (!defined(result)) {
- return new EllipsoidGraphics(this);
- }
- result.show = this.show;
- result.radii = this.radii;
- result.innerRadii = this.innerRadii;
- result.minimumClock = this.minimumClock;
- result.maximumClock = this.maximumClock;
- result.minimumCone = this.minimumCone;
- result.maximumCone = this.maximumCone;
- result.heightReference = this.heightReference;
- result.fill = this.fill;
- result.material = this.material;
- result.outline = this.outline;
- result.outlineColor = this.outlineColor;
- result.outlineWidth = this.outlineWidth;
- result.stackPartitions = this.stackPartitions;
- result.slicePartitions = this.slicePartitions;
- result.subdivisions = this.subdivisions;
- result.shadows = this.shadows;
- result.distanceDisplayCondition = this.distanceDisplayCondition;
- return result;
- };
- EllipsoidGraphics.prototype.merge = function (source) {
-
- if (!defined(source)) {
- throw new DeveloperError("source is required.");
- }
-
- this.show = defaultValue(this.show, source.show);
- this.radii = defaultValue(this.radii, source.radii);
- this.innerRadii = defaultValue(this.innerRadii, source.innerRadii);
- this.minimumClock = defaultValue(this.minimumClock, source.minimumClock);
- this.maximumClock = defaultValue(this.maximumClock, source.maximumClock);
- this.minimumCone = defaultValue(this.minimumCone, source.minimumCone);
- this.maximumCone = defaultValue(this.maximumCone, source.maximumCone);
- this.heightReference = defaultValue(
- this.heightReference,
- source.heightReference
- );
- this.fill = defaultValue(this.fill, source.fill);
- this.material = defaultValue(this.material, source.material);
- this.outline = defaultValue(this.outline, source.outline);
- this.outlineColor = defaultValue(this.outlineColor, source.outlineColor);
- this.outlineWidth = defaultValue(this.outlineWidth, source.outlineWidth);
- this.stackPartitions = defaultValue(
- this.stackPartitions,
- source.stackPartitions
- );
- this.slicePartitions = defaultValue(
- this.slicePartitions,
- source.slicePartitions
- );
- this.subdivisions = defaultValue(this.subdivisions, source.subdivisions);
- this.shadows = defaultValue(this.shadows, source.shadows);
- this.distanceDisplayCondition = defaultValue(
- this.distanceDisplayCondition,
- source.distanceDisplayCondition
- );
- };
- export default EllipsoidGraphics;
|