Skip to content

Commit

Permalink
Add RightAngleConeTemplate and Tool classes.
Browse files Browse the repository at this point in the history
Correct issue with scaling when drawing shapes.

Was drawing in the ZonePoint space (0,0), (0, 1), etc.
When I needed to draw in GridPoint space (100,100), (100, 200).

Fix cone size and calculate theta instead of endpoint.

There is an issue still with calculating the theta
on the fly... The issue comes up when we zoom in
and out while we are adjusting the angle.

Add bounding boxes to the cone.

Add logic to reduce cone into AOE squares in grid.

Add logic to reduce cone into AOE squares in grid.

Add shoelace formula for partially intersecting segments.

Improve performance of painting.

Instead of iterating over gridsquare, we split the candidate aoe vertically
and horizontally and apply tests on the aoe before getting down to
the grid size. The tests are more limited when looking at larger than
grid size: It's either no intersection with the cone or full
 intersection... We can only evaluate the overlapping area against the
  threshold meaningfully at the grid square level.

Add persisting of AOE when confirmed.

Added dto and related usage in Drawable.java and implement
builder in RightAngleConeTemplate.java.

Also added some logic to not show the cone overlay when
the template is "confirmed" and added to the layer...
This is driven by the showOAEOverlay property in
RightAngleConeTemplate.java, which is set to true
when constructed without an id (i.e. in drawing mode)
and false when given an id (i.e. confirmed and persisted
into the campaign).

I also fixed a minor bug with the behavior of the threshold
which was doing the opposite of what is expected (
90% threshold setting was actually 10%).

Remove snapping to grid

Use ZonePoint instead of CellPoint to determine radius more fluidly

Remove useless comments

Re-organize code

Run spotlessApply
  • Loading branch information
mal-w committed Dec 27, 2023
1 parent 736655e commit f4f10fc
Show file tree
Hide file tree
Showing 5 changed files with 833 additions and 0 deletions.
Loading

0 comments on commit f4f10fc

Please sign in to comment.