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

Allow users to define clipping regions with polygons #11750

Merged
merged 31 commits into from
Apr 30, 2024
Merged
Changes from 1 commit
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
77bb0d1
ClippingPolygonCollection
ggetz Jan 9, 2024
eab1d19
Fix TS
ggetz Jan 9, 2024
0140ce0
Update CHANGES.md
ggetz Jan 9, 2024
15cad35
Draft
ggetz Mar 12, 2024
5079310
Merge branch 'main' into clip-region
ggetz Mar 12, 2024
7a789fd
Draft 2
ggetz Mar 13, 2024
70f1170
Merge branch 'main' into clip-region
ggetz Mar 15, 2024
b5ba48d
Draft
ggetz Mar 18, 2024
c185b7b
Merge branch 'main' into clip-region
ggetz Mar 18, 2024
fe5704e
Start cleanup
ggetz Mar 19, 2024
f42b7db
Update Specs
ggetz Mar 22, 2024
be45ded
Update clipping plane performance, wire through terrain clipping
ggetz Mar 25, 2024
c624775
Merge branch 'main' into clip-region
ggetz Mar 25, 2024
aca4f14
cleanup doc
ggetz Mar 25, 2024
3158943
Cleanup private classes
ggetz Mar 25, 2024
e87589d
Fix jagged edges
ggetz Apr 3, 2024
7305ce1
Specs cleanup
ggetz Apr 5, 2024
1b24f93
More specs
ggetz Apr 5, 2024
3cf00dc
More specs
ggetz Apr 5, 2024
58b5a42
Cleanup AEC example for tutorial
ggetz Apr 10, 2024
73cf3e2
Fix typos and whitespace
Apr 10, 2024
a43d78f
Fix typos and whitespace
Apr 11, 2024
dc84c67
Feedback from PR
ggetz Apr 12, 2024
3ac081f
Fix issue with terrain when zoomed out
ggetz Apr 15, 2024
38a2b9d
Update tests
ggetz Apr 16, 2024
e69d21f
Fix P3DT not clipping when zoomed out
ggetz Apr 16, 2024
b32fa28
Cleanup:
ggetz Apr 17, 2024
0f5c0a3
Cleanup
ggetz Apr 17, 2024
859abb9
Fix minor docs typos
Apr 22, 2024
71f7197
Fix sandcastle angle, too agressive simplification
ggetz Apr 23, 2024
620a0ec
Adjust clip polygon region combining
ggetz Apr 26, 2024
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix minor docs typos
  • Loading branch information
Jeshurun Hembd committed Apr 22, 2024
commit 859abb96c9d7098e9da7c97c315ac0e0b56f7fce
6 changes: 3 additions & 3 deletions packages/engine/Source/Scene/ClippingPolygonCollection.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ import PolygonSignedDistanceFS from "../Shaders/PolygonSignedDistanceFS.js";
* @param {object} [options] Object with the following properties:
* @param {ClippingPolygon[]} [options.polygons=[]] An array of {@link ClippingPolygon} objects used to selectively disable rendering on the inside of each polygon.
* @param {boolean} [options.enabled=true] Determines whether the clipping polygons are active.
* @param {boolean} [options.inverse=false] If true, a region will be clipped if it is outside of every polygon in the collection. Otherwise, a region will only be clipped if it is on the inside of any polygon.
* @param {boolean} [options.inverse=false] If true, a region will be clipped if it is outside of every polygon in the collection. Otherwise, a region will only be clipped if it is on the inside of any polygon.
*
* @example
* const positions = Cesium.Cartesian3.fromRadiansArray([
Expand Down Expand Up @@ -75,7 +75,7 @@ function ClippingPolygonCollection(options) {
/**
* If true, a region will be clipped if it is outside of every polygon in the
* collection. Otherwise, a region will only be clipped if it is
* outside of any polygon.
* inside of any polygon.
*
* @memberof ClippingPolygonCollection.prototype
* @type {boolean}
Expand Down Expand Up @@ -474,7 +474,7 @@ ClippingPolygonCollection.prototype.update = function (frameState) {
return;
}

// It'd be expensive to validate any individual position has changed. Instead verify if the list of polygon positions has has elements added or removed, which should be good enough for most cases.
// It'd be expensive to validate any individual position has changed. Instead verify if the list of polygon positions has had elements added or removed, which should be good enough for most cases.
const totalPositions = this._polygons.reduce(
(totalPositions, polygon) => totalPositions + polygon.length,
0
Expand Down
Loading