Skip to content

Clipping polygon buffer migration#13623

Open
mzschwartz5 wants to merge 1 commit into
DanielZ/feat/vector-terrian-polygonfrom
clipping-polygon-buffer-migration
Open

Clipping polygon buffer migration#13623
mzschwartz5 wants to merge 1 commit into
DanielZ/feat/vector-terrian-polygonfrom
clipping-polygon-buffer-migration

Conversation

@mzschwartz5

@mzschwartz5 mzschwartz5 commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

Description

This is the first step in reimplementing Clipping Polygon workflows on top of the Vector data pipeline. This PR simply introduces a write-through copy of a ClippingPolygonCollection's polygon data in the form of a BufferPolygonCollection. Eventually, this will be the only backing data structure. It will be used with the VectorPipeline class to generate textures used for the new vector-style clipping approach.

Issue number and link

https://github.com/iTwin/cesiumjs-web3d-internal/issues/31

Testing plan

This PR introduces no behavioral changes, and thus there are no spec changes. Regression tests suffice: this sandcastle, for instance, or the clipping performance dev sandcastle.

Author checklist

  • I have submitted a Contributor License Agreement
  • I have added my name to CONTRIBUTORS.md
  • I have updated CHANGES.md with a short summary of my change
  • I have added or updated unit tests to ensure consistent code coverage
  • I have updated the inline documentation, and included code examples where relevant
  • I have performed a self-review of my code

AI acknowledgment

  • I used AI to generate content in this PR
  • If yes, I have reviewed the AI-generated content before submitting

If yes, I used the following Tools(s) and/or Service(s):

If yes, I used the following Model(s):

PR Dependency Tree

This tree was auto-generated by Charcoal

@github-actions

Copy link
Copy Markdown
Contributor

Thank you for the pull request, @mzschwartz5!

✅ We can confirm we have a CLA on file for you.

Comment on lines +73 to +82
// Add each ClippingPolygon object.
const polygons = options.polygons;
let numVertices = 0;
if (defined(polygons)) {
const polygonsLength = polygons.length;
for (let i = 0; i < polygonsLength; ++i) {
this._polygons.push(polygons[i]);
numVertices += polygons[i].length;
}
}

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note: this was just hoisted up from the bottom of the constructor to be nearer to relevant code. I did, however, add the numVerticescounter.

@mzschwartz5
mzschwartz5 force-pushed the clipping-polygon-buffer-migration branch 2 times, most recently from 03539d0 to dcabaa5 Compare July 15, 2026 21:42
@mzschwartz5
mzschwartz5 changed the base branch from main to DanielZ/feat/vector-terrian-polygon July 15, 2026 21:42
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.

1 participant