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 bezier support to Cesium Cartographic Polygon #439

Open
csciguy8 opened this issue Mar 19, 2024 · 0 comments
Open

Add bezier support to Cesium Cartographic Polygon #439

csciguy8 opened this issue Mar 19, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@csciguy8
Copy link
Contributor

We finally have Cartographic Polygons in Unity as of this PR! Looks great, but of course we always want more...

Cartographic Polygons rely on Unity's Spline editor, and we currently only support Linear splines, yet Bezier curves are also available. Bezier curves are incredibly useful for following curved features, like roads and shorelines.

Here is an example spline following a road:
image

Looking through the code, one of the easiest ways to accomplish this could be to convert bezier curves into linear curves in our Unity plugin, CesiumCartographicPolygon::GetCartographicPoints. We are already dealing with BezierKnot objects (cubic beziers), so it would just be a matter of segmenting the curve into a collection of lines, at some level of granularity.

A harder, but maybe more valuable task, could be to support bezier curves completely, all the way down to cesium-native's CesiumGeospatial::CartographicPolygon class.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants