-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Straight CorridorGeometry. #2513
Conversation
Anyway we can unit test this? |
What about straight lines that aren't parallel to lines of longitude or latitude, like this case var viewer = new Cesium.Viewer('cesiumContainer', { infoBox : false });
var entities = viewer.entities;
entities.add({
corridor : {
positions : Cesium.Cartesian3.fromDegreesArray([
-90,30, /*45 deg 100km*/
-89.260833,30.633889, /*45.373056 deg 100km*/
-88.511944,31.263611, /*45.758056 deg 100km*/
-87.753056,31.888889, /*46.155278 deg 100km*/
-86.983889,32.509444, /*46.565 deg 100km*/
]),
width : 40000,
height : 0,
outline : true,
outlineColor : Cesium.Color.WHITE,
outlineWidth : 4,
material : Cesium.Color.fromRandom({alpha : 0.7})
}
});
viewer.zoomTo(viewer.entities); Change width to 400 and it's straight as an arrow, but it is crooked when it's 40000. I generated these series of points using And converted to decimal degrees using |
You're welcome, I'm glad I could help. Though I haven't really studied the code much to see how it all works. It's strange that narrow widths are straight, but not wide widths. I thought widths wouldn't affect the path. |
Update CHANGES.md. Can we merge this today so it makes 1.7? |
Tests pass, example code in the linked issue is clearly fixed in this branch (and broken in master). I updated CHANGES. |
Fixes #2511 and also the same problem that was occurring for
PolylineVolumeGeometry
.