cesium-native icon indicating copy to clipboard operation
cesium-native copied to clipboard

Raster overlays don't work with non-indexed triangles, or with triangle fans or strips

Open kring opened this issue 1 year ago • 1 comments

The top of upsamplePrimitiveForRasterOverlays has this:

  if (primitive.mode != MeshPrimitive::Mode::TRIANGLES ||
      primitive.indices < 0 ||
      primitive.indices >= static_cast<int>(parentModel.accessors.size())) {
    // Not indexed triangles, so we don't know how to divide this primitive
    // (yet). So remove it.
    return false;
  }

Fortunately, indexed triangle lists are the most common by far, so as far as I'm aware no one has ever actually complained about this. But still, we should round out this functionality.

kring avatar Jun 28 '24 13:06 kring

PR #777 has lots of code for dealing with non-indexed tris, fans, and strips. Could be helpful as reference.

csciguy8 avatar Jun 28 '24 14:06 csciguy8