Skip to content

Commit

Permalink
update classification type
Browse files Browse the repository at this point in the history
  • Loading branch information
hpinkos committed May 22, 2018
1 parent 8d7902c commit 840fd3e
Show file tree
Hide file tree
Showing 8 changed files with 16 additions and 20 deletions.
18 changes: 6 additions & 12 deletions Apps/Sandcastle/gallery/Z-Indexing Geometry.html
Original file line number Diff line number Diff line change
Expand Up @@ -35,53 +35,47 @@
rectangle : {
coordinates : Cesium.Rectangle.fromDegrees(-110.0, 20.0, -100.5, 30.0),
material : Cesium.Color.RED,
zIndex: 1,
classificationType : Cesium.ClassificationType.TERRAIN
zIndex: 1
}
});

viewer.entities.add({
rectangle : {
coordinates : Cesium.Rectangle.fromDegrees(-112.0, 25.0, -102.5, 35.0),
material : '../images/Cesium_Logo_Color.jpg',
zIndex: 2,
classificationType : Cesium.ClassificationType.TERRAIN
zIndex: 2
}
});

viewer.entities.add({
rectangle : {
coordinates : Cesium.Rectangle.fromDegrees(-110.0, 31.0, -100.5, 41.0),
material : Cesium.Color.BLUE,
zIndex: 3,
classificationType : Cesium.ClassificationType.TERRAIN
zIndex: 3
}
});

viewer.entities.add({
rectangle : {
coordinates : Cesium.Rectangle.fromDegrees(-99.5, 20.0, -90.0, 30.0),
material : '../images/Cesium_Logo_Color.jpg',
zIndex: 3,
classificationType : Cesium.ClassificationType.TERRAIN
zIndex: 3
}
});

viewer.entities.add({
rectangle : {
coordinates : Cesium.Rectangle.fromDegrees(-97.5, 25.0, -88.0, 35.0),
material : Cesium.Color.GREEN,
zIndex: 2,
classificationType : Cesium.ClassificationType.TERRAIN
zIndex: 2
}
});

viewer.entities.add({
rectangle : {
coordinates : Cesium.Rectangle.fromDegrees(-99.5, 31.0, -90.0, 41.0),
material : Cesium.Color.BLUE,
zIndex: 1,
classificationType : Cesium.ClassificationType.TERRAIN
zIndex: 1
}
});

Expand Down
2 changes: 2 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ Change Log
* Added `PostProcessStageComposite` for multi-stage post-processes like depth of field.
* Added a new Sandcastle label `Post Processing` to showcase the different built-in post-process stages.
* Added `Rectangle.equalsEpsilon` for comparing the equality of two rectangles [#6533](https:/AnalyticalGraphicsInc/cesium/pull/6533)
* Added `zIndex` for ground geometry, including corridor, ellipse, polygon and rectangle entities. [#6362](https:/AnalyticalGraphicsInc/cesium/pull/6362)

##### Fixes :wrench:
* Fixed a bug causing custom TilingScheme classes to not be able to use a GeographicProjection. [#6524](https:/AnalyticalGraphicsInc/cesium/pull/6524)
Expand All @@ -30,6 +31,7 @@ Change Log

##### Breaking Changes :mega:
* Removed `Scene.copyGlobeDepth`. Globe depth will now be copied by default when supported. [#6393](https:/AnalyticalGraphicsInc/cesium/pull/6393)
* The default `classificationType` for `GroundPrimitive`, `CorridorGraphics`, `EllipseGraphics`, `PolygonGraphics` and `RectangleGraphics` is now `ClassificationType.TERRAIN`. If you wish the geometry to color both terrain and 3D tiles, pass in the option `classificationType: Cesium.ClassificationType.BOTH`.

##### Additions :tada:
* Added support for materials on terrain entities (entities with unspecified `height`) and `GroundPrimitives`. [#6393](https:/AnalyticalGraphicsInc/cesium/pull/6393)
Expand Down
2 changes: 1 addition & 1 deletion Source/DataSources/CorridorGraphics.js
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ define([
* Gets or sets the {@link ClassificationType} Property specifying whether this corridor will classify terrain, 3D Tiles, or both when on the ground.
* @memberof CorridorGraphics.prototype
* @type {Property}
* @default ClassificationType.BOTH
* @default ClassificationType.TERRAIN
*/
classificationType : createPropertyDescriptor('classificationType'),

Expand Down
2 changes: 1 addition & 1 deletion Source/DataSources/EllipseGraphics.js
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ define([
* Gets or sets the {@link ClassificationType} Property specifying whether this ellipse will classify terrain, 3D Tiles, or both when on the ground.
* @memberof EllipseGraphics.prototype
* @type {Property}
* @default ClassificationType.BOTH
* @default ClassificationType.TERRAIN
*/
classificationType : createPropertyDescriptor('classificationType'),

Expand Down
2 changes: 1 addition & 1 deletion Source/DataSources/GeometryUpdater.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ define([
var defaultOutlineColor = new ConstantProperty(Color.BLACK);
var defaultShadows = new ConstantProperty(ShadowMode.DISABLED);
var defaultDistanceDisplayCondition = new ConstantProperty(new DistanceDisplayCondition());
var defaultClassificationType = new ConstantProperty(ClassificationType.BOTH);
var defaultClassificationType = new ConstantProperty(ClassificationType.TERRAIN);

/**
* An abstract class for updating geometry entites.
Expand Down
2 changes: 1 addition & 1 deletion Source/DataSources/PolygonGraphics.js
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ define([
* Gets or sets the {@link ClassificationType} Property specifying whether this polygon will classify terrain, 3D Tiles, or both when on the ground.
* @memberof PolygonGraphics.prototype
* @type {Property}
* @default ClassificationType.BOTH
* @default ClassificationType.TERRAIN
*/
classificationType : createPropertyDescriptor('classificationType'),

Expand Down
2 changes: 1 addition & 1 deletion Source/DataSources/RectangleGraphics.js
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ define([
* Gets or sets the {@link ClassificationType} Property specifying whether this rectangle will classify terrain, 3D Tiles, or both when on the ground.
* @memberof RectangleGraphics.prototype
* @type {Property}
* @default ClassificationType.BOTH
* @default ClassificationType.TERRAIN
*/
classificationType : createPropertyDescriptor('classificationType'),

Expand Down
6 changes: 3 additions & 3 deletions Source/Scene/GroundPrimitive.js
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ define([
* @param {Boolean} [options.releaseGeometryInstances=true] When <code>true</code>, the primitive does not keep a reference to the input <code>geometryInstances</code> to save memory.
* @param {Boolean} [options.allowPicking=true] When <code>true</code>, each geometry instance will only be pickable with {@link Scene#pick}. When <code>false</code>, GPU memory is saved.
* @param {Boolean} [options.asynchronous=true] Determines if the primitive will be created asynchronously or block until ready. If false initializeTerrainHeights() must be called first.
* @param {ClassificationType} [options.classificationType=ClassificationType.BOTH] Determines whether terrain, 3D Tiles or both will be classified.
* @param {ClassificationType} [options.classificationType=ClassificationType.TERRAIN] Determines whether terrain, 3D Tiles or both will be classified.
* @param {Boolean} [options.debugShowBoundingVolume=false] For debugging only. Determines if this primitive's commands' bounding spheres are shown.
* @param {Boolean} [options.debugShowShadowVolume=false] For debugging only. Determines if the shadow volume for each geometry in the primitive is drawn. Must be <code>true</code> on
* creation for the volumes to be created before the geometry is released or options.releaseGeometryInstance must be <code>false</code>.
Expand Down Expand Up @@ -208,9 +208,9 @@ define([
*
* @type {ClassificationType}
*
* @default ClassificationType.BOTH
* @default ClassificationType.TERRAIN
*/
this.classificationType = defaultValue(options.classificationType, ClassificationType.BOTH);
this.classificationType = defaultValue(options.classificationType, ClassificationType.TERRAIN);
/**
* This property is for debugging only; it is not for production use nor is it optimized.
* <p>
Expand Down

0 comments on commit 840fd3e

Please sign in to comment.