virtualx-engine/core/math
Andrii Doroshenko (Xrayez) 883ef8570a Expose 2D polygon boolean operations in Geometry singleton
Clipper 6.4.2 is used internally to perform polypaths clipping, as well
as inflating/deflating polypaths. The following methods were added:

```
Geometry.merge_polygons_2d(poly_a, poly_b) # union
Geometry.clip_polygons_2d(poly_a, poly_b) # difference
Geometry.intersect_polygons_2d(poly_a, poly_b) # intersection
Geometry.exclude_polygons_2d(poly_a, poly_b) # xor

Geometry.clip_polyline_with_polygon_2d(poly_a, poly_b)
Geometry.intersect_polyline_with_polygon_2d(poly_a, poly_b)

Geometry.offset_polygon_2d(polygon, delta) # inflate/deflate
Geometry.offset_polyline_2d(polyline, delta) # returns polygons

// This one helps to implement CSG-like behaviour:
Geometry.transform_points_2d(points, transform)
```

All the methods return an array of polygons/polylines. The resulting
polygons could possibly be holes which could be checked with
`Geometry.is_polygon_clockwise()` which was exposed to scripting as well.
2019-05-22 17:12:39 +03:00
..
a_star.cpp Use a binary heap for the open list of Astar 2019-05-16 20:14:35 +02:00
a_star.h Use a binary heap for the open list of Astar 2019-05-16 20:14:35 +02:00
aabb.cpp Update copyright statements to 2019 2019-01-01 12:58:10 +01:00
aabb.h Update copyright statements to 2019 2019-01-01 12:58:10 +01:00
audio_frame.cpp Update copyright statements to 2019 2019-01-01 12:58:10 +01:00
audio_frame.h Added generator audio stream, and spectrum analyzer audio effect 2019-04-10 12:58:06 -03:00
basis.cpp Style: Apply new changes from clang-format 8.0 2019-04-09 17:09:48 +02:00
basis.h Style: Apply new changes from clang-format 8.0 2019-04-09 17:09:48 +02:00
bsp_tree.cpp Update copyright statements to 2019 2019-01-01 12:58:10 +01:00
bsp_tree.h Core: Ensure classes match their header filename 2019-02-12 13:34:25 +01:00
camera_matrix.cpp Add FRUSTUM camera mode, allowing tilted frustums 2019-02-19 17:48:08 +01:00
camera_matrix.h Add FRUSTUM camera mode, allowing tilted frustums 2019-02-19 17:48:08 +01:00
delaunay.h Use approximate equallity methods in many places 2019-04-25 13:20:29 -04:00
expression.cpp Make "decimal" functions more consistent 2019-04-30 13:49:17 -04:00
expression.h Make "decimal" functions more consistent 2019-04-30 13:49:17 -04:00
face3.cpp Update copyright statements to 2019 2019-01-01 12:58:10 +01:00
face3.h Add -Wshadow=local to warnings and fix reported issues. 2019-02-20 19:44:12 +01:00
geometry.cpp Expose 2D polygon boolean operations in Geometry singleton 2019-05-22 17:12:39 +03:00
geometry.h Expose 2D polygon boolean operations in Geometry singleton 2019-05-22 17:12:39 +03:00
math_defs.h Several fixes to make GLES2 on HTML5 work much better. 2019-02-25 21:47:29 -03:00
math_fieldwise.cpp Update copyright statements to 2019 2019-01-01 12:58:10 +01:00
math_fieldwise.h Update copyright statements to 2019 2019-01-01 12:58:10 +01:00
math_funcs.cpp Update copyright statements to 2019 2019-01-01 12:58:10 +01:00
math_funcs.h Implement Lanczos image filter 2019-05-05 14:03:56 +02:00
octree.h Add -Wshadow=local to warnings and fix reported issues. 2019-02-20 19:44:12 +01:00
plane.cpp [Core] Approximate equality 2019-04-25 13:20:29 -04:00
plane.h [Core] Approximate equality 2019-04-25 13:20:29 -04:00
quat.cpp Several fixes to make GLES2 on HTML5 work much better. 2019-02-25 21:47:29 -03:00
quat.h Fix new GCC 9 warnings: -Wdeprecated-copy. 2019-03-02 14:37:02 +01:00
quick_hull.cpp Scale quickhull tolerance with mesh size 2019-03-01 20:58:39 +00:00
quick_hull.h Scale quickhull tolerance with mesh size 2019-03-01 20:58:39 +00:00
random_number_generator.cpp Added normally distributed generation function to RNG 2019-03-17 08:09:46 +03:00
random_number_generator.h Added normally distributed generation function to RNG 2019-03-17 08:09:46 +03:00
random_pcg.cpp Properly setup seed in RNG 2019-03-27 19:37:25 +03:00
random_pcg.h Merge pull request #27043 from Chaosus/randfn 2019-04-07 08:32:04 +03:00
rect2.cpp Update copyright statements to 2019 2019-01-01 12:58:10 +01:00
rect2.h Merge pull request #27676 from qarmin/small_fixes_2 2019-05-01 08:19:04 +02:00
SCsub SCons: Build core's thirdparty code in own environment 2018-09-28 11:40:41 +02:00
transform.cpp Update copyright statements to 2019 2019-01-01 12:58:10 +01:00
transform.h [Core] Rename Matrix3 file to Basis 2019-02-09 14:42:23 -05:00
transform_2d.cpp Added ability for multiple images to be imported as an atlas 2019-04-19 15:56:34 -03:00
transform_2d.h Added ability for multiple images to be imported as an atlas 2019-04-19 15:56:34 -03:00
triangle_mesh.cpp Core: Ensure classes match their header filename 2019-02-12 13:34:25 +01:00
triangle_mesh.h Update copyright statements to 2019 2019-01-01 12:58:10 +01:00
triangulate.cpp Update copyright statements to 2019 2019-01-01 12:58:10 +01:00
triangulate.h Update copyright statements to 2019 2019-01-01 12:58:10 +01:00
vector2.cpp Several fixes to make GLES2 on HTML5 work much better. 2019-02-25 21:47:29 -03:00
vector2.h [Core] Approximate equality 2019-04-25 13:20:29 -04:00
vector3.cpp [Core] Rename Matrix3 file to Basis 2019-02-09 14:42:23 -05:00
vector3.h [Core] Approximate equality 2019-04-25 13:20:29 -04:00