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

Fix polyline clipping against the near plane. #7209

Merged
merged 5 commits into from
Nov 2, 2018
Merged

Conversation

bagnell
Copy link
Contributor

@bagnell bagnell commented Oct 30, 2018

Fixes the issue from this comment: #6741 (comment)

@cesium-concierge
Copy link

cesium-concierge commented Oct 30, 2018

Thanks for the pull request @bagnell!

  • ✔️ Signed CLA found.
  • CHANGES.md was not updated.
    • If this change updates the public API in any way, please add a bullet point to CHANGES.md.

Reviewers, don't forget to make sure that:

  • Cesium Viewer works.
  • Works in 2D/CV.
  • Works (or fails gracefully) in IE11.

I am a bot who helps you make Cesium awesome! Contributions to my configuration are welcome.

🌍 🌎 🌏

@hpinkos
Copy link
Contributor

hpinkos commented Oct 31, 2018

polyline

@bagnell This seems to fix the camera angle posted in that issue, but I'm still seeing some weirdness from different angles.

@bagnell
Copy link
Contributor Author

bagnell commented Oct 31, 2018

Thanks @hpinkos. It's fixed. This seems like it should have been a bug for a while, but I couldn't find any issue for it.

@hpinkos
Copy link
Contributor

hpinkos commented Oct 31, 2018

@bagnell looks fine in chrome now. It's doing something weird in IE though.

image

That doesn't happen in master. It happens in this branch with logarithmicDepthBuffer set to true or false.

var viewer = new Cesium.Viewer('cesiumContainer');
var scene = viewer.scene;
scene.logarithmicDepthBuffer = false;

var blueCartographic = new Cesium.Cartographic(-1.3196863177294136, 0.6988508714746624, 30.0);
var redCartographic = new Cesium.Cartographic(-1.319681841889412, 0.6989153500784591, 30.0);

var arrowPositions = [
    Cesium.Cartographic.toCartesian(blueCartographic),
    Cesium.Cartographic.toCartesian(redCartographic)
];

var line = viewer.entities.add({
    polyline : {
        positions : arrowPositions,
        width : 50,
        followSurface : false,
        material : new Cesium.PolylineArrowMaterialProperty(Cesium.Color.CYAN)
    }
});

viewer.zoomTo(viewer.entities);

@bagnell
Copy link
Contributor Author

bagnell commented Nov 1, 2018

@hpinkos this is ready for another look.

@hpinkos
Copy link
Contributor

hpinkos commented Nov 2, 2018

Looks great, thanks @bagnell!

@hpinkos hpinkos merged commit cfb15cb into master Nov 2, 2018
@hpinkos hpinkos deleted the fix-polyline-clipping branch November 2, 2018 16:00
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