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

GroundPrimitive bounding volume doesn't take curvature of the earth into consideration #4483

Closed
hpinkos opened this issue Oct 20, 2016 · 3 comments · Fixed by #8475
Closed

Comments

@hpinkos
Copy link
Contributor

hpinkos commented Oct 20, 2016

For example, the bounding box for this rectangle is too short:

image

var viewer = new Cesium.Viewer('cesiumContainer');
var primitive = viewer.scene.primitives.add(new Cesium.GroundPrimitive({
    geometryInstances : [new Cesium.GeometryInstance({
        geometry : new Cesium.RectangleGeometry({
            rectangle : Cesium.Rectangle.fromDegrees(-110.0, 20.0, -80.0, 25.0),
            vertexFormat : Cesium.PerInstanceColorAppearance.VERTEX_FORMAT
        }),
        attributes: {
            color: Cesium.ColorGeometryInstanceAttribute.fromColor(new Cesium.Color(1.0, 0.0, 0.0, 0.5))
        }
    })],
    appearance : new Cesium.PerInstanceColorAppearance({
        closed : true
    })
}));
primitive.debugShowBoundingVolume = true;
@pjcozzi
Copy link
Contributor

pjcozzi commented Dec 20, 2016

@hpinkos is this still the case with #4751?

@hpinkos
Copy link
Contributor Author

hpinkos commented Dec 21, 2016

@pjcozzi yep, it'll still be a problem after #4751 gets merged

@pjcozzi
Copy link
Contributor

pjcozzi commented Jan 4, 2017

Even for small ground primitives the bounding volume is not tall enough:

image

For example, try the red rectangle ground primitive in http://localhost:8080/Apps/Sandcastle/index.html?src=development/Ground%20Primitive.html&label=Development

This is likely more apparent now that debugShowShadowVolume shows the actual volume used for rendering.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants