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

Extrude polygon #855

Closed
wants to merge 33 commits into from
Closed
Show file tree
Hide file tree
Changes from 12 commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
64655e5
index on extrudePolygon: 86ce69c Added doc for removeDuplicates
Jun 10, 2013
dcc1dd7
On extrudePolygon: extrudepoly
Jun 10, 2013
5a9bff1
initial implementation
Jun 10, 2013
845b675
fix polygons with cut-outs
Jun 10, 2013
5fbe15e
Merge branch 'batching' into extrudePolygon
Jun 10, 2013
1a3e0d5
correct computation of attributes for walls
Jun 11, 2013
958a55d
documentation and tests
Jun 11, 2013
4b17635
updated cesiumviewer example
Jun 11, 2013
11591f4
Merge branch 'batching' into extrudePolygon
Jun 12, 2013
db4e09b
Merge branch 'batching' into extrudePolygon
Jun 14, 2013
1b61e26
Merge branch 'batching' into extrudePolygon
Jun 14, 2013
4b5ea62
Merge branch 'batching' into extrudePolygon
Jun 14, 2013
652e52b
check if undefined
Jun 17, 2013
5f2be15
fix indices, texture coordinates
Jun 18, 2013
594d101
reindex
Jun 18, 2013
d614336
Merge branch 'batching' into extrudePolygon
Jun 19, 2013
b98542c
wall subdivide
Jun 19, 2013
a40e3bb
Merge branch 'batching' into extrudePolygon
Jun 19, 2013
eb8e5e1
Merge branch 'batching' into extrudePolygon
Jun 21, 2013
db6bb59
fix bounding sphere
Jun 24, 2013
19be5f6
Merge branch 'batching' into extrudePolygon
Jun 24, 2013
c6eb932
correct wall normals
Jun 24, 2013
3a6eaa2
correct indices
Jun 24, 2013
ec95e14
Merge branch 'batching' into extrudePolygon
Jun 25, 2013
ef5e8d3
correct normals for polygon hierarchy
Jun 25, 2013
5ea4929
Merge branch 'batching' into extrudePolygon
Jun 27, 2013
7f5c87a
Merge branch 'batching' into extrudePolygon
Jun 27, 2013
4f55ff4
corrected subdivide wall positions
Jun 28, 2013
4871f60
correct wall tangent and binormal
Jun 28, 2013
4a4130c
relocate wrapLongitude
Jul 1, 2013
69672c4
correct tangent/binormal
Jul 8, 2013
9c6eef5
Merge branch 'batching' into extrudePolygon
Jul 9, 2013
d8a8550
missing GeometryAttributes
Jul 9, 2013
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 17 additions & 8 deletions Apps/CesiumViewer/CesiumViewer.js
Original file line number Diff line number Diff line change
Expand Up @@ -280,15 +280,24 @@ define([
var polygonGeometry = new GeometryInstance({
geometry : new PolygonGeometry({
vertexFormat : VertexFormat.POSITION_AND_ST,
/*

positions : ellipsoid.cartographicArrayToCartesianArray([
Cartographic.fromDegrees(-72.0, 40.0),
Cartographic.fromDegrees(-70.0, 35.0),
Cartographic.fromDegrees(-75.0, 30.0),
Cartographic.fromDegrees(-82.0, 40.0),
Cartographic.fromDegrees(-75.0, 35.0),
Cartographic.fromDegrees(-85.0, 30.0),
Cartographic.fromDegrees(-70.0, 30.0),
Cartographic.fromDegrees(-68.0, 40.0)
]),
*/
surfaceHeight: 600000,
extrudedHeight: 300000,
stRotation : 0.523598776
}),
pickData : 'polygon3'
});

var polygonGeometry1 = new GeometryInstance({
geometry : new PolygonGeometry({
vertexFormat : VertexFormat.POSITION_AND_ST,
polygonHierarchy : {
positions : ellipsoid.cartographicArrayToCartesianArray([
Cartographic.fromDegrees(-109.0, 30.0),
Expand Down Expand Up @@ -326,7 +335,7 @@ define([
pickData : 'polygon3'
});
scene.getPrimitives().add(new Primitive({
geometryInstances : polygonGeometry,
geometryInstances : [polygonGeometry, polygonGeometry1],
appearance : new EllipsoidSurfaceAppearance({
material : Material.fromType(scene.getContext(), 'Stripe')
})
Expand Down Expand Up @@ -401,7 +410,7 @@ define([
geometryInstances : customWithoutIndices,
appearance : new Appearance()
}));

/*
var handler = new ScreenSpaceEventHandler(scene.getCanvas());
handler.setInputAction(
function (movement) {
Expand All @@ -412,6 +421,6 @@ define([
},
ScreenSpaceEventType.MOUSE_MOVE
);

*/
}
});
1 change: 1 addition & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ Beta Releases
* Added `PolylinePipeline.removeDuplicates`.
* Added `BoundingSphere.fromEllipsoid`.
* Added `czm_tangentToEyeSpaceMatrix` built-in GLSL function.
* Added `extrudedHeight` parameter to `PolygonGeometry`.
Copy link
Contributor

Choose a reason for hiding this comment

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

Remove this. PolygonGeometry itself is new and already mentioned.

* Improved the performance of drawing polygons created with `configureFromPolygonHierarchy`.

### b18 - 2013-07-01
Expand Down
Loading