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

【wip】ポリゴンの頂点をタイル境界にスナップする #678

Draft
wants to merge 7 commits into
base: main
Choose a base branch
from
3 changes: 2 additions & 1 deletion demo/cesium/3dtiles.html
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,8 @@
viewer.scene.globe.depthTestAgainstTerrain = true;

const tileset = await Cesium.Cesium3DTileset.fromUrl(
"/examples/3dtiles/tileset.json"
"./examples/3dtiles_textured/tileset.json",
{ enableDebugWireframe: true }
);
viewer.scene.primitives.add(tileset);
viewer.zoomTo(tileset);
Expand Down
4 changes: 0 additions & 4 deletions nusamai/src/sink/cesiumtiles/slice.rs
Original file line number Diff line number Diff line change
Expand Up @@ -255,8 +255,6 @@ fn slice_polygon(
for yi in y_range.clone() {
let (k1, k2) = tiling::y_slice_range(zoom, yi);

// todo?: check interior bbox to optimize

for (ri, (ring, uv_ring)) in poly.rings().zip_eq(poly_uv.rings()).enumerate() {
if ring.raw_coords().is_empty() {
continue;
Expand Down Expand Up @@ -335,8 +333,6 @@ fn slice_polygon(
for (xi, xs) in x_iter {
let (k1, k2) = tiling::x_slice_range(zoom, xi, xs);

// todo?: check interior bbox to optimize ...

let key = (
zoom,
xi.rem_euclid(1 << zoom) as u32, // handling geometry crossing the antimeridian
Expand Down
Loading