Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Geometry tile support #6034

Merged
merged 12 commits into from
Dec 12, 2017
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
// For more details, see:
// https://github.com/AnalyticalGraphicsInc/3d-tiles/tree/vector-tiles/TileFormats/VectorData
var classification = viewer.scene.primitives.add(new Cesium.Cesium3DTileset({
url: 'https://beta.cesium.com/api/assets/3394?access_token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiIzZjM4MjljZi0xNTAzLTQ0MzctODhlZi0zOTU3Njg5ODA1Y2QiLCJpZCI6OCwiaWF0IjoxNDgxODI5ODMyfQ.dYlV8_PoXcFNlPHGook5kMzuJMS-Bb9DCMzI1mFVvgE',
url: 'https://beta.cesium.com/api/assets/3469?access_token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiIzZjM4MjljZi0xNTAzLTQ0MzctODhlZi0zOTU3Njg5ODA1Y2QiLCJpZCI6OCwiaWF0IjoxNDgxODI5ODMyfQ.dYlV8_PoXcFNlPHGook5kMzuJMS-Bb9DCMzI1mFVvgE',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we add an option to use the geometry tile for rendering vs. classification?

Or is it only suitable for classification right now and we will roadmap rendering, e.g., normals, styling, etc. I would be fine with that.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is only suitable for classification right now. I would put geometry tile rendering on the roadmap.

skipLevelOfDetail : false,
classificationType : Cesium.ClassificationType.CESIUM_3D_TILE
}));
Expand Down
2 changes: 1 addition & 1 deletion CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Change Log
* Added `pack` and `unpack` functions to `OrientedBoundingBox` for packing to and unpacking from a flat buffer.
* Added experimental support for [3D Tiles Vector Data](https://github.com/AnalyticalGraphicsInc/3d-tiles/tree/vector-tiles/TileFormats/VectorData) ([#4665](https://github.com/AnalyticalGraphicsInc/cesium/pull/4665)). The new and modified Cesium APIs are:
* `Cesium3DTileStyle` has expanded for styling point features. See the [styling specification](https://github.com/AnalyticalGraphicsInc/3d-tiles/tree/vector-tiles/Styling#vector-data) for details.
* `Cesium3DTileFeature` can modify `color` and `show` properties for polygon, polyline, geometry, and mesh features.
* `Cesium3DTileFeature` can modify `color` and `show` properties for polygon, polyline, and geometry features.
* `Cesium3DTilePointFeature` can modify the styling options for a point feature.
* Added `Cesium3DTileset.classificationType` to specify if a tileset classifies terrain, another 3D Tiles tileset, or both. This only applies to vector, geometry and batched 3D model tilesets. See [#6033](https://github.com/AnalyticalGraphicsInc/cesium/pull/6033) for limitations on the glTF contained in the b3dm tile.

Expand Down
5 changes: 5 additions & 0 deletions Source/Scene/Cesium3DTileContentFactory.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
define([
'./Batched3DModel3DTileContent',
'./Composite3DTileContent',
'./Geometry3DTileContent',
'./Instanced3DModel3DTileContent',
'./PointCloud3DTileContent',
'./Tileset3DTileContent',
'./Vector3DTileContent'
], function(
Batched3DModel3DTileContent,
Composite3DTileContent,
Geometry3DTileContent,
Instanced3DModel3DTileContent,
PointCloud3DTileContent,
Tileset3DTileContent,
Expand Down Expand Up @@ -36,6 +38,9 @@ define([
json : function(tileset, tile, url, arrayBuffer, byteOffset) {
return new Tileset3DTileContent(tileset, tile, url, arrayBuffer, byteOffset);
},
geom : function(tileset, tile, url, arrayBuffer, byteOffset) {
return new Geometry3DTileContent(tileset, tile, url, arrayBuffer, byteOffset);
},
vctr : function(tileset, tile, url, arrayBuffer, byteOffset) {
return new Vector3DTileContent(tileset, tile, url, arrayBuffer, byteOffset);
}
Expand Down
2 changes: 2 additions & 0 deletions Source/Scene/Cesium3DTilePointFeature.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,8 @@ define([
this._pointOutlineColor = undefined;
this._pointOutlineWidth = undefined;
this._heightOffset = undefined;

setBillboardImage(this);
}

var scratchCartographic = new Cartographic();
Expand Down
Loading