Skip to content

Commit

Permalink
adding picking tiles wip
Browse files Browse the repository at this point in the history
  • Loading branch information
rahwang committed Apr 12, 2017
1 parent d79d883 commit 14f83ea
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 10 deletions.
11 changes: 11 additions & 0 deletions Source/Scene/Cesium3DTileset.js
Original file line number Diff line number Diff line change
Expand Up @@ -388,6 +388,17 @@ define([
this.debugShowGeometricError = defaultValue(options.debugShowGeometricError, false);
this._tileInfoLabels = undefined;

/**
* This property is for debugging only; it is not optimized for production use.
* <p>
* When true, draws label displaying tile info only for picked tile.
* </p>
*
* @type {Boolean}
* @default false
*/
this.debugShowOnlyPickedTile = defaultValue(options.debugShowOnlyPickedTile, false);

/**
* This property is for debugging only; it is not optimized for production use.
* <p>
Expand Down
1 change: 1 addition & 0 deletions Source/Widgets/CesiumInspector/Cesium3DTilesInspector.js
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,7 @@ define([
stylePanel.contents.appendChild(errorBox);
knockout.applyBindings(viewModel, stylePanel.contents);

tileInfoPanel.contents.appendChild(makeCheckbox('onlyPickedTileInfo', 'Display Only Picked Tile Info'));
tileInfoPanel.contents.appendChild(makeCheckbox('showGeometricError', 'Geometric Error'));
tileInfoPanel.contents.appendChild(makeCheckbox('numberOfCommands', 'Number of Commands'));
tileInfoPanel.contents.appendChild(makeCheckbox('numberOfPoints', 'Number of Points'));
Expand Down
38 changes: 28 additions & 10 deletions Source/Widgets/CesiumInspector/Cesium3DTilesInspectorViewModel.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
define([
'../../Core/Cartesian3',
'../../Core/Cartographic',
'../../Scene/Cesium3DTile',
'../../Scene/Cesium3DTileFeature',
'../../Scene/Cesium3DTileset',
'../../Scene/Cesium3DTileStyle',
Expand All @@ -20,6 +21,7 @@ define([
], function(
Cartesian3,
Cartographic,
Cesium3DTile,
Cesium3DTileFeature,
Cesium3DTileset,
Cesium3DTileStyle,
Expand Down Expand Up @@ -400,12 +402,28 @@ define([
}
},

/**
* Displays tile info for only picked tile. This property is observable.
* @memberof Cesium3DTilesInspectorViewModel.prototype
*
* @type {Boolean}
* @default false
*/
onlyPickedTileInfo: {
default: false,
subscribe: function(val) {
if (defined(that._tileset)) {
that._tileset.debugShowOnlyPickedTile = val;
}
}
},

/**
* Displays the texture memory used per tile. This property is observable.
* @memberof Cesium3DTilesInspectorViewModel.prototype
*
* @type {String}
* @default '{}'
* @type {Boolean}
* @default false
*/
textureMemory : {
default: false,
Expand All @@ -420,8 +438,8 @@ define([
* Displays the number of triangles per tile. This property is observable.
* @memberof Cesium3DTilesInspectorViewModel.prototype
*
* @type {String}
* @default '{}'
* @type {Boolean}
* @default false
*/
numberOfTriangles : {
default: false,
Expand All @@ -436,8 +454,8 @@ define([
* Displays the number of points per tile. This property is observable.
* @memberof Cesium3DTilesInspectorViewModel.prototype
*
* @type {String}
* @default '{}'
* @type {Boolean}
* @default false
*/
numberOfPoints : {
default: false,
Expand All @@ -452,8 +470,8 @@ define([
* Displays the vertex memory used per tile. This property is observable.
* @memberof Cesium3DTilesInspectorViewModel.prototype
*
* @type {String}
* @default '{}'
* @type {Boolean}
* @default false
*/
vertexMemory : {
default: false,
Expand All @@ -468,8 +486,8 @@ define([
* Displays the number of commands used per tile. This property is observable.
* @memberof Cesium3DTilesInspectorViewModel.prototype
*
* @type {String}
* @default '{}'
* @type {Boolean}
* @default false
*/
numberOfCommands : {
default: false,
Expand Down

0 comments on commit 14f83ea

Please sign in to comment.