Commit graph

19 commits

Author SHA1 Message Date
Rémi Verschelde 71d53637b5 doc: Fix scoped hyperlinks to same-class enums/methods
The class name does not need to be specified when it is the current class.
2019-06-27 11:44:37 +02:00
Andrii Doroshenko (Xrayez) 6f2233d13a Bind is_point_in_polygon in Geometry singleton 2019-06-27 00:20:22 +03:00
Andrii Doroshenko (Xrayez) 24e9a881c0 Expose 2D Delaunay triangulation in Geometry singleton
Can be used via scripting as `Geometry.triangulate_delaunay_2d(points)`

The interface is the same as in `Triangulate` library, returning indices
into triangulated points.
2019-05-24 13:10:13 +03:00
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
Rémi Verschelde 6af69f851a doc: Drop unused <demos> tag 2019-04-19 11:03:46 +02:00
Rémi Verschelde 39c868171e doc: Bump version to 3.2 2019-04-01 12:33:56 +02:00
Rémi Verschelde 3d9deda8b3 Sync classref with current source 2018-05-12 09:38:00 +02:00
Juan Linietsky 69a96ff4a6
Merge pull request #15943 from poke1024/geometry-line-line
Add Geometry::line_intersects_line_2d()
2018-05-07 17:54:33 -03:00
Rémi Verschelde 3fa77b3172 doc: Remove status from hardcoded version string
It has no practical use case and just generates noise for each alpha, beta, etc.
2018-02-27 13:40:49 +01:00
Rémi Verschelde 3c7a39b40c doc: Update version string in header 2018-02-19 10:46:33 +01:00
Rémi Verschelde d516aab8fa doc: Sync with current source
Also enhance RigidBody docs as per https://github.com/godotengine/godot-docs/pull/1018
and fix the version tag in all files (not really stable yet, but it makes no sense
to hardcode rc3 at this stage).
2018-01-25 08:50:56 +01:00
Bernhard Liebl c1e099b48f Add Geometry::line_intersects_line_2d() 2018-01-21 15:31:34 +01:00
Rémi Verschelde e28cdc4654 doc: Update version string in XML 2018-01-13 11:43:42 +01:00
Rémi Verschelde bc75fae579 doc: Update header version for 3.0-beta 2017-11-24 09:16:52 +01:00
Rémi Verschelde 967bfb0c4a doc: Remove revision.module_config from version string
It is now "3.0-alpha" instead of "3.0.alpha.custom_build{,.mono}",
limits unnecessary diffs.
2017-11-15 20:41:16 +01:00
Rémi Verschelde 2fce0010f0 classref: Sync with current source
[ci skip]
2017-11-13 09:25:53 +01:00
Bernhard Liebl 7ec32b6d09 Basic docs for Geometry plus two new functions 2017-11-05 07:56:27 +01:00
letheed 5ad9be4c24 Rename pos to position in user facing methods and variables
Rename user facing methods and variables as well as the corresponding
C++ methods according to the folloming changes:

* pos -> position
* rot -> rotation
* loc -> location

C++ variables are left as is.
2017-09-20 13:11:10 +02:00
Juan Linietsky 4f929a0fdf Changed the doc class generation to individual files per class. It is also possible to save module files in module directories and the build system will
recognize them.
2017-09-12 17:45:41 -03:00