Skip to content
New issue

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

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

Already on GitHub? # to your account

Refactor vertex positions #70

Merged
merged 2 commits into from
Jul 8, 2014
Merged

Refactor vertex positions #70

merged 2 commits into from
Jul 8, 2014

Conversation

mramato
Copy link
Contributor

@mramato mramato commented Jul 1, 2014

I'm opening this up for early feedback. There is a vertexPositions branch in Cesium that goes along with this (which I'm still working on).

  1. Remove vertexPositions from Packet
  2. Add equivalent positions property to Polygon and Polyline
  3. Add a new hierarchy property to Polygon to support an arbitrary number of holes

KML is broken but I opened #69 to remove it completely.

It's number 3, above, that is causing me issues. I'm not really sure how we want to define polygons with holes in CZML. The GeoJSON way of doing it is probably CZML friendly, but the spec is not very 3D friendly (see CesiumGS/cesium/issues/1878). KML and Cesium have similar rules for defining them but I'm not sure how well that will translate to CZML.

GeoJSON spec for polygon with holes
KML spec for polygon with holes
Cesium doc for polygon with holes

I want to get this into Cesium 1.0 because I think it's important from a backwards compatibility standpoint. Worst case, we can forgo wholes support for now and then add it later (but still move vertexPositions down into the individual objects).

@shunter and @kring any thoughts?

@mramato
Copy link
Contributor Author

mramato commented Jul 2, 2014

I decided to pull out the polygon hierarchy stuff for now, so this nixes 3 in my list above. I still want to add support for holes, but I don't want it coupled to the more urgent need of refactoring vertex positions. I'll let you know when this is ready.

#69 still needs to go in before this change.

1. Remove vertexPositions from Packet
2. Add equivalent `positions` property to Polygon and Polyline
holes
@mramato
Copy link
Contributor Author

mramato commented Jul 2, 2014

I was feeling fancy so I did a squash and force push. This is ready to look at.

@@ -54,6 +54,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Schema", "Schema", "{04E49F
..\Schema\PixelOffset.jsonschema = ..\Schema\PixelOffset.jsonschema
..\Schema\Point.jsonschema = ..\Schema\Point.jsonschema
..\Schema\Polygon.jsonschema = ..\Schema\Polygon.jsonschema
..\Schema\PolygonHierarchy.jsonschema = ..\Schema\PolygonHierarchy.jsonschema
Copy link
Member

Choose a reason for hiding this comment

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

PolygonHierarchy.jsonschema doesn't exist.

Copy link
Member

Choose a reason for hiding this comment

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

I'll just remove this and merge.

shunter added a commit that referenced this pull request Jul 8, 2014
@shunter shunter merged commit 9c6de6c into master Jul 8, 2014
@shunter shunter deleted the refactorVertexPositions branch July 8, 2014 22:58
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants