Skip to content

Commit

Permalink
Clean up sensor API
Browse files Browse the repository at this point in the history
This are changes needed ahead of #1887 to ensure API/CZML compatibility with 1.0
  • Loading branch information
mramato committed Jul 18, 2014
1 parent 5205099 commit 248f4d3
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
18 changes: 9 additions & 9 deletions Source/DataSources/ConeVisualizer.js
Original file line number Diff line number Diff line change
Expand Up @@ -139,8 +139,8 @@ define([
var cachedPosition = new Cartesian3();
var cachedOrientation = new Quaternion();
function updateObject(visualizer, time, entity) {
var coneGraphics = entity._cone;
if (!defined(coneGraphics)) {
var dynamicCone = entity._cone;
if (!defined(dynamicCone)) {
return;
}

Expand Down Expand Up @@ -176,7 +176,7 @@ define([
cone.show = true;

var minimumClockAngle;
var property = coneGraphics._minimumClockAngle;
var property = dynamicCone._minimumClockAngle;
if (defined(property)) {
minimumClockAngle = property.getValue(time);
}
Expand All @@ -185,7 +185,7 @@ define([
}

var maximumClockAngle;
property = coneGraphics._maximumClockAngle;
property = dynamicCone._maximumClockAngle;
if (defined(property)) {
maximumClockAngle = property.getValue(time);
}
Expand All @@ -194,7 +194,7 @@ define([
}

var innerHalfAngle;
property = coneGraphics._innerHalfAngle;
property = dynamicCone._innerHalfAngle;
if (defined(property)) {
innerHalfAngle = property.getValue(time);
}
Expand All @@ -203,7 +203,7 @@ define([
}

var outerHalfAngle;
property = coneGraphics._outerHalfAngle;
property = dynamicCone._outerHalfAngle;
if (defined(property)) {
outerHalfAngle = property.getValue(time);
}
Expand All @@ -223,7 +223,7 @@ define([
cone.minimumClockAngle = minimumClockAngle;
}

property = coneGraphics._radius;
property = dynamicCone._radius;
if (defined(property)) {
var radius = property.getValue(time);
if (defined(radius)) {
Expand All @@ -245,12 +245,12 @@ define([

cone.lateralSurfaceMaterial = MaterialProperty.getValue(time, coneGraphics._lateralSurfaceMaterial, cone.lateralSurfaceMaterial);

property = coneGraphics._intersectionColor;
property = dynamicCone._intersectionColor;
if (defined(property)) {
property.getValue(time, cone.intersectionColor);
}

property = coneGraphics._intersectionWidth;
property = dynamicCone._intersectionWidth;
if (defined(property)) {
var intersectionWidth = property.getValue(time);
if (defined(intersectionWidth)) {
Expand Down
8 changes: 4 additions & 4 deletions Source/DataSources/PyramidVisualizer.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,12 +97,12 @@ define([
var position;
var orientation;
function updateObject(visualizer, time, entity) {
var pyramidGraphics = entity._pyramid;
if (!defined(pyramidGraphics)) {
var dynamicPyramid = entity._pyramid;
if (!defined(dynamicPyramid)) {
return;
}

var directionsProperty = pyramidGraphics._directions;
var directionsProperty = dynamicPyramid._directions;
if (!defined(directionsProperty)) {
return;
}
Expand Down Expand Up @@ -174,7 +174,7 @@ define([
}
}

property = pyramidGraphics._intersectionWidth;
property = dynamicPyramid._intersectionWidth;
if (defined(property)) {
var intersectionWidth = property.getValue(time);
if (defined(intersectionWidth)) {
Expand Down

0 comments on commit 248f4d3

Please sign in to comment.