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

GPU Accelerated Point In Polygon Test #1360

Merged
merged 7 commits into from
Feb 20, 2020
Merged

GPU Accelerated Point In Polygon Test #1360

merged 7 commits into from
Feb 20, 2020

Conversation

1chandu
Copy link
Contributor

@1chandu 1chandu commented Feb 12, 2020

For #1356

Background

  • Add new public class GPUPointInPolygon to perform point-in-polygon test.
  • Transform: Add support for TextureTransform to be created with source as Buffers and Texture as target. (Shouldn't impact any existing use cases)
  • Add polygon triangulation code (polygon.js) from deck.gl, we should move this to math.gl eventually to avoid duplication.
  • Add Docs, Unit Tests and Bench test.

Change List

@1chandu 1chandu changed the title GPU Accelerated Point In Polygon GPU Accelerated Point In Polygon Test Feb 12, 2020
@coveralls
Copy link

coveralls commented Feb 12, 2020

Coverage Status

Coverage increased (+2.2%) to 64.293% when pulling 139bfd0 on GPUPIP into 02a3488 on master.

modules/engine/src/transform/texture-transform.js Outdated Show resolved Hide resolved
const curCount = curVertices.length / SIZE;
const curIds = new Float32Array(curCount).fill(polygonId);
vertices.push(...curVertices);
ids.push(...curIds);
Copy link
Contributor

Choose a reason for hiding this comment

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

How big can these arrays get? Would recommend pre-allocating the arrays to avoid re-allocating and they dynamically extend.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We can add array manager support in the future PRs, that can be independent of this feature and used across all luma modules.

@1chandu 1chandu merged commit 745df52 into master Feb 20, 2020
@1chandu 1chandu deleted the GPUPIP branch February 20, 2020 04:39
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.

None yet

4 participants