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 ability to create open extruded PolygonGeometry #3879

Merged
merged 5 commits into from
Apr 26, 2016
Merged

Conversation

mramato
Copy link
Contributor

@mramato mramato commented Apr 25, 2016

While working on the NYC 3D Tiles demo, I needed to create open Polygon geometry (for example, a building with a different color roof). Having a top and bottom on the polygon was inefficient and also caused z-fighting.)

Also added feature to CZML and Entity API as well as tweaked Sandcastle examples to show it.

This also makes it easier for users who want to create a polygon with different top/bottonm materials, which is often asked about on the mailing list (and doesn't work with walls because of interpolation).

While working on the NYC 3D Tiles demo, I needed to create open Polygon
geometry (for example, a building with a different color roof). Having a
top and bottom on the polygon was inefficient and also caused z-fighting.)

Also added feature to CZML and Entity API as well as tweaked Sandcastle
examples to show it.
@hpinkos
Copy link
Contributor

hpinkos commented Apr 25, 2016

RectangleGeometry has a similar ability with the boolean property names closeTop and closeBottom. Can we make this option consistent with that?

@mramato
Copy link
Contributor Author

mramato commented Apr 25, 2016

That's probably a good idea (I originally wanted something similar but didn't know Rectangle already had it). I was having trouble figuring out how to separate the two, since they seem to be genereated together currently.

@hpinkos
Copy link
Contributor

hpinkos commented Apr 25, 2016

I can take a look at it. I think I can do it really easily.

@mramato
Copy link
Contributor Author

mramato commented Apr 25, 2016

👍 Thanks

@mramato
Copy link
Contributor Author

mramato commented Apr 25, 2016

Okay, this should be good to go. @bagnell, you should probably take a quick look at PolygonGeometry.js, everything else is pretty striaghtforward.


it('computes positions extruded and not closeBottom', function() {
var p = PolygonGeometry.createGeometry(PolygonGeometry.fromPositions({
vertexFormat : VertexFormat.POSITION_ONLY,
Copy link
Contributor

Choose a reason for hiding this comment

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

whitespace

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We should probably revert the Cesium-only tweak to the WebStorm defaults that is causing this to happen on format. So annoying.

@bagnell bagnell merged commit dacc530 into master Apr 26, 2016
@bagnell bagnell deleted the open-polygon branch April 26, 2016 16:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants