summaryrefslogtreecommitdiff
path: root/doc/classes
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2020-05-29 12:10:37 +0200
committerGitHub <noreply@github.com>2020-05-29 12:10:37 +0200
commit1620669f4e37c21fa45991a9bc37410014845419 (patch)
treecb9162147bba330ff007c12b349dba070b385a3a /doc/classes
parent6aa399be59b886e1c8c371f4ceb09f41c86a0584 (diff)
parent69d5de632e04d48a247d50c1dc2c09322129c73a (diff)
Merge pull request #39051 from Xrayez/geometry-split
Split `Geometry` singleton into `Geometry2D` and `Geometry3D`
Diffstat (limited to 'doc/classes')
-rw-r--r--doc/classes/@GlobalScope.xml7
-rw-r--r--doc/classes/ConvexPolygonShape2D.xml2
-rw-r--r--doc/classes/Geometry2D.xml (renamed from doc/classes/Geometry.xml)232
-rw-r--r--doc/classes/Geometry3D.xml194
4 files changed, 219 insertions, 216 deletions
diff --git a/doc/classes/@GlobalScope.xml b/doc/classes/@GlobalScope.xml
index 03eb733e54..41811a48b1 100644
--- a/doc/classes/@GlobalScope.xml
+++ b/doc/classes/@GlobalScope.xml
@@ -27,8 +27,11 @@
<member name="Engine" type="Engine" setter="" getter="">
The [Engine] singleton.
</member>
- <member name="Geometry" type="Geometry" setter="" getter="">
- The [Geometry] singleton.
+ <member name="Geometry2D" type="Geometry2D" setter="" getter="">
+ The [Geometry2D] singleton.
+ </member>
+ <member name="Geometry3D" type="Geometry3D" setter="" getter="">
+ The [Geometry3D] singleton.
</member>
<member name="IP" type="IP" setter="" getter="">
The [IP] singleton.
diff --git a/doc/classes/ConvexPolygonShape2D.xml b/doc/classes/ConvexPolygonShape2D.xml
index cba446fff8..42951e2158 100644
--- a/doc/classes/ConvexPolygonShape2D.xml
+++ b/doc/classes/ConvexPolygonShape2D.xml
@@ -16,7 +16,7 @@
<argument index="0" name="point_cloud" type="PackedVector2Array">
</argument>
<description>
- Based on the set of points provided, this creates and assigns the [member points] property using the convex hull algorithm. Removing all unneeded points. See [method Geometry.convex_hull_2d] for details.
+ Based on the set of points provided, this creates and assigns the [member points] property using the convex hull algorithm. Removing all unneeded points. See [method Geometry2D.convex_hull] for details.
</description>
</method>
</methods>
diff --git a/doc/classes/Geometry.xml b/doc/classes/Geometry2D.xml
index 4d6f7b60a3..ffd4bd108d 100644
--- a/doc/classes/Geometry.xml
+++ b/doc/classes/Geometry2D.xml
@@ -1,67 +1,15 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Geometry" inherits="Object" version="4.0">
+<class name="Geometry2D" inherits="Object" version="4.0">
<brief_description>
- Helper node to calculate generic geometry operations.
+ Helper node to calculate generic geometry operations in 2D space.
</brief_description>
<description>
- Geometry provides users with a set of helper functions to create geometric shapes, compute intersections between shapes, and process various other geometric operations.
+ Geometry2D provides users with a set of helper functions to create geometric shapes, compute intersections between shapes, and process various other geometric operations.
</description>
<tutorials>
</tutorials>
<methods>
- <method name="build_box_planes">
- <return type="Array">
- </return>
- <argument index="0" name="extents" type="Vector3">
- </argument>
- <description>
- Returns an array with 6 [Plane]s that describe the sides of a box centered at the origin. The box size is defined by [code]extents[/code], which represents one (positive) corner of the box (i.e. half its actual size).
- </description>
- </method>
- <method name="build_capsule_planes">
- <return type="Array">
- </return>
- <argument index="0" name="radius" type="float">
- </argument>
- <argument index="1" name="height" type="float">
- </argument>
- <argument index="2" name="sides" type="int">
- </argument>
- <argument index="3" name="lats" type="int">
- </argument>
- <argument index="4" name="axis" type="int" enum="Vector3.Axis" default="2">
- </argument>
- <description>
- Returns an array of [Plane]s closely bounding a faceted capsule centered at the origin with radius [code]radius[/code] and height [code]height[/code]. The parameter [code]sides[/code] defines how many planes will be generated for the side part of the capsule, whereas [code]lats[/code] gives the number of latitudinal steps at the bottom and top of the capsule. The parameter [code]axis[/code] describes the axis along which the capsule is oriented (0 for X, 1 for Y, 2 for Z).
- </description>
- </method>
- <method name="build_cylinder_planes">
- <return type="Array">
- </return>
- <argument index="0" name="radius" type="float">
- </argument>
- <argument index="1" name="height" type="float">
- </argument>
- <argument index="2" name="sides" type="int">
- </argument>
- <argument index="3" name="axis" type="int" enum="Vector3.Axis" default="2">
- </argument>
- <description>
- Returns an array of [Plane]s closely bounding a faceted cylinder centered at the origin with radius [code]radius[/code] and height [code]height[/code]. The parameter [code]sides[/code] defines how many planes will be generated for the round part of the cylinder. The parameter [code]axis[/code] describes the axis along which the cylinder is oriented (0 for X, 1 for Y, 2 for Z).
- </description>
- </method>
- <method name="clip_polygon">
- <return type="PackedVector3Array">
- </return>
- <argument index="0" name="points" type="PackedVector3Array">
- </argument>
- <argument index="1" name="plane" type="Plane">
- </argument>
- <description>
- Clips the polygon defined by the points in [code]points[/code] against the [code]plane[/code] and returns the points of the clipped polygon.
- </description>
- </method>
- <method name="clip_polygons_2d">
+ <method name="clip_polygons">
<return type="Array">
</return>
<argument index="0" name="polygon_a" type="PackedVector2Array">
@@ -73,7 +21,7 @@
If [code]polygon_b[/code] is enclosed by [code]polygon_a[/code], returns an outer polygon (boundary) and inner polygon (hole) which could be distinguished by calling [method is_polygon_clockwise].
</description>
</method>
- <method name="clip_polyline_with_polygon_2d">
+ <method name="clip_polyline_with_polygon">
<return type="Array">
</return>
<argument index="0" name="polyline" type="PackedVector2Array">
@@ -84,7 +32,7 @@
Clips [code]polyline[/code] against [code]polygon[/code] and returns an array of clipped polylines. This performs [constant OPERATION_DIFFERENCE] between the polyline and the polygon. This operation can be thought of as cutting a line with a closed shape.
</description>
</method>
- <method name="convex_hull_2d">
+ <method name="convex_hull">
<return type="PackedVector2Array">
</return>
<argument index="0" name="points" type="PackedVector2Array">
@@ -93,7 +41,7 @@
Given an array of [Vector2]s, returns the convex hull as a list of points in counterclockwise order. The last point is the same as the first one.
</description>
</method>
- <method name="exclude_polygons_2d">
+ <method name="exclude_polygons">
<return type="Array">
</return>
<argument index="0" name="polygon_a" type="PackedVector2Array">
@@ -101,24 +49,11 @@
<argument index="1" name="polygon_b" type="PackedVector2Array">
</argument>
<description>
- Mutually excludes common area defined by intersection of [code]polygon_a[/code] and [code]polygon_b[/code] (see [method intersect_polygons_2d]) and returns an array of excluded polygons. This performs [constant OPERATION_XOR] between polygons. In other words, returns all but common area between polygons.
+ Mutually excludes common area defined by intersection of [code]polygon_a[/code] and [code]polygon_b[/code] (see [method intersect_polygons]) and returns an array of excluded polygons. This performs [constant OPERATION_XOR] between polygons. In other words, returns all but common area between polygons.
The operation may result in an outer polygon (boundary) and inner polygon (hole) produced which could be distinguished by calling [method is_polygon_clockwise].
</description>
</method>
<method name="get_closest_point_to_segment">
- <return type="Vector3">
- </return>
- <argument index="0" name="point" type="Vector3">
- </argument>
- <argument index="1" name="s1" type="Vector3">
- </argument>
- <argument index="2" name="s2" type="Vector3">
- </argument>
- <description>
- Returns the 3D point on the 3D segment ([code]s1[/code], [code]s2[/code]) that is closest to [code]point[/code]. The returned point will always be inside the specified segment.
- </description>
- </method>
- <method name="get_closest_point_to_segment_2d">
<return type="Vector2">
</return>
<argument index="0" name="point" type="Vector2">
@@ -132,19 +67,6 @@
</description>
</method>
<method name="get_closest_point_to_segment_uncapped">
- <return type="Vector3">
- </return>
- <argument index="0" name="point" type="Vector3">
- </argument>
- <argument index="1" name="s1" type="Vector3">
- </argument>
- <argument index="2" name="s2" type="Vector3">
- </argument>
- <description>
- Returns the 3D point on the 3D line defined by ([code]s1[/code], [code]s2[/code]) that is closest to [code]point[/code]. The returned point can be inside the segment ([code]s1[/code], [code]s2[/code]) or outside of it, i.e. somewhere on the line extending from the segment.
- </description>
- </method>
- <method name="get_closest_point_to_segment_uncapped_2d">
<return type="Vector2">
</return>
<argument index="0" name="point" type="Vector2">
@@ -158,21 +80,6 @@
</description>
</method>
<method name="get_closest_points_between_segments">
- <return type="PackedVector3Array">
- </return>
- <argument index="0" name="p1" type="Vector3">
- </argument>
- <argument index="1" name="p2" type="Vector3">
- </argument>
- <argument index="2" name="q1" type="Vector3">
- </argument>
- <argument index="3" name="q2" type="Vector3">
- </argument>
- <description>
- Given the two 3D segments ([code]p1[/code], [code]p2[/code]) and ([code]q1[/code], [code]q2[/code]), finds those two points on the two segments that are closest to each other. Returns a [PackedVector3Array] that contains this point on ([code]p1[/code], [code]p2[/code]) as well the accompanying point on ([code]q1[/code], [code]q2[/code]).
- </description>
- </method>
- <method name="get_closest_points_between_segments_2d">
<return type="PackedVector2Array">
</return>
<argument index="0" name="p1" type="Vector2">
@@ -187,16 +94,7 @@
Given the two 2D segments ([code]p1[/code], [code]p2[/code]) and ([code]q1[/code], [code]q2[/code]), finds those two points on the two segments that are closest to each other. Returns a [PackedVector2Array] that contains this point on ([code]p1[/code], [code]p2[/code]) as well the accompanying point on ([code]q1[/code], [code]q2[/code]).
</description>
</method>
- <method name="get_uv84_normal_bit">
- <return type="int">
- </return>
- <argument index="0" name="normal" type="Vector3">
- </argument>
- <description>
- Used internally by the engine.
- </description>
- </method>
- <method name="intersect_polygons_2d">
+ <method name="intersect_polygons">
<return type="Array">
</return>
<argument index="0" name="polygon_a" type="PackedVector2Array">
@@ -208,7 +106,7 @@
The operation may result in an outer polygon (boundary) and inner polygon (hole) produced which could be distinguished by calling [method is_polygon_clockwise].
</description>
</method>
- <method name="intersect_polyline_with_polygon_2d">
+ <method name="intersect_polyline_with_polygon">
<return type="Array">
</return>
<argument index="0" name="polyline" type="PackedVector2Array">
@@ -252,7 +150,7 @@
Returns [code]true[/code] if [code]polygon[/code]'s vertices are ordered in clockwise order, otherwise returns [code]false[/code].
</description>
</method>
- <method name="line_intersects_line_2d">
+ <method name="line_intersects_line">
<return type="Variant">
</return>
<argument index="0" name="from_a" type="Vector2">
@@ -277,7 +175,7 @@
Given an array of [Vector2]s representing tiles, builds an atlas. The returned dictionary has two keys: [code]points[/code] is a vector of [Vector2] that specifies the positions of each tile, [code]size[/code] contains the overall size of the whole atlas as [Vector2].
</description>
</method>
- <method name="merge_polygons_2d">
+ <method name="merge_polygons">
<return type="Array">
</return>
<argument index="0" name="polygon_a" type="PackedVector2Array">
@@ -289,14 +187,14 @@
The operation may result in an outer polygon (boundary) and inner polygon (hole) produced which could be distinguished by calling [method is_polygon_clockwise].
</description>
</method>
- <method name="offset_polygon_2d">
+ <method name="offset_polygon">
<return type="Array">
</return>
<argument index="0" name="polygon" type="PackedVector2Array">
</argument>
<argument index="1" name="delta" type="float">
</argument>
- <argument index="2" name="join_type" type="int" enum="Geometry.PolyJoinType" default="0">
+ <argument index="2" name="join_type" type="int" enum="Geometry2D.PolyJoinType" default="0">
</argument>
<description>
Inflates or deflates [code]polygon[/code] by [code]delta[/code] units (pixels). If [code]delta[/code] is positive, makes the polygon grow outward. If [code]delta[/code] is negative, shrinks the polygon inward. Returns an array of polygons because inflating/deflating may result in multiple discrete polygons. Returns an empty array if [code]delta[/code] is negative and the absolute value of it approximately exceeds the minimum bounding rectangle dimensions of the polygon.
@@ -304,16 +202,16 @@
The operation may result in an outer polygon (boundary) and inner polygon (hole) produced which could be distinguished by calling [method is_polygon_clockwise].
</description>
</method>
- <method name="offset_polyline_2d">
+ <method name="offset_polyline">
<return type="Array">
</return>
<argument index="0" name="polyline" type="PackedVector2Array">
</argument>
<argument index="1" name="delta" type="float">
</argument>
- <argument index="2" name="join_type" type="int" enum="Geometry.PolyJoinType" default="0">
+ <argument index="2" name="join_type" type="int" enum="Geometry2D.PolyJoinType" default="0">
</argument>
- <argument index="3" name="end_type" type="int" enum="Geometry.PolyEndType" default="3">
+ <argument index="3" name="end_type" type="int" enum="Geometry2D.PolyEndType" default="3">
</argument>
<description>
Inflates or deflates [code]polyline[/code] by [code]delta[/code] units (pixels), producing polygons. If [code]delta[/code] is positive, makes the polyline grow outward. Returns an array of polygons because inflating/deflating may result in multiple discrete polygons. If [code]delta[/code] is negative, returns an empty array.
@@ -337,67 +235,7 @@
Returns if [code]point[/code] is inside the triangle specified by [code]a[/code], [code]b[/code] and [code]c[/code].
</description>
</method>
- <method name="ray_intersects_triangle">
- <return type="Variant">
- </return>
- <argument index="0" name="from" type="Vector3">
- </argument>
- <argument index="1" name="dir" type="Vector3">
- </argument>
- <argument index="2" name="a" type="Vector3">
- </argument>
- <argument index="3" name="b" type="Vector3">
- </argument>
- <argument index="4" name="c" type="Vector3">
- </argument>
- <description>
- Tests if the 3D ray starting at [code]from[/code] with the direction of [code]dir[/code] intersects the triangle specified by [code]a[/code], [code]b[/code] and [code]c[/code]. If yes, returns the point of intersection as [Vector3]. If no intersection takes place, an empty [Variant] is returned.
- </description>
- </method>
- <method name="segment_intersects_circle">
- <return type="float">
- </return>
- <argument index="0" name="segment_from" type="Vector2">
- </argument>
- <argument index="1" name="segment_to" type="Vector2">
- </argument>
- <argument index="2" name="circle_position" type="Vector2">
- </argument>
- <argument index="3" name="circle_radius" type="float">
- </argument>
- <description>
- Given the 2D segment ([code]segment_from[/code], [code]segment_to[/code]), returns the position on the segment (as a number between 0 and 1) at which the segment hits the circle that is located at position [code]circle_position[/code] and has radius [code]circle_radius[/code]. If the segment does not intersect the circle, -1 is returned (this is also the case if the line extending the segment would intersect the circle, but the segment does not).
- </description>
- </method>
- <method name="segment_intersects_convex">
- <return type="PackedVector3Array">
- </return>
- <argument index="0" name="from" type="Vector3">
- </argument>
- <argument index="1" name="to" type="Vector3">
- </argument>
- <argument index="2" name="planes" type="Array">
- </argument>
- <description>
- Given a convex hull defined though the [Plane]s in the array [code]planes[/code], tests if the segment ([code]from[/code], [code]to[/code]) intersects with that hull. If an intersection is found, returns a [PackedVector3Array] containing the point the intersection and the hull's normal. If no intersecion is found, an the returned array is empty.
- </description>
- </method>
- <method name="segment_intersects_cylinder">
- <return type="PackedVector3Array">
- </return>
- <argument index="0" name="from" type="Vector3">
- </argument>
- <argument index="1" name="to" type="Vector3">
- </argument>
- <argument index="2" name="height" type="float">
- </argument>
- <argument index="3" name="radius" type="float">
- </argument>
- <description>
- Checks if the segment ([code]from[/code], [code]to[/code]) intersects the cylinder with height [code]height[/code] that is centered at the origin and has radius [code]radius[/code]. If no, returns an empty [PackedVector3Array]. If an intersection takes place, the returned array contains the point of intersection and the cylinder's normal at the point of intersection.
- </description>
- </method>
- <method name="segment_intersects_segment_2d">
+ <method name="segment_intersects_segment">
<return type="Variant">
</return>
<argument index="0" name="from_a" type="Vector2">
@@ -412,39 +250,7 @@
Checks if the two segments ([code]from_a[/code], [code]to_a[/code]) and ([code]from_b[/code], [code]to_b[/code]) intersect. If yes, return the point of intersection as [Vector2]. If no intersection takes place, returns an empty [Variant].
</description>
</method>
- <method name="segment_intersects_sphere">
- <return type="PackedVector3Array">
- </return>
- <argument index="0" name="from" type="Vector3">
- </argument>
- <argument index="1" name="to" type="Vector3">
- </argument>
- <argument index="2" name="sphere_position" type="Vector3">
- </argument>
- <argument index="3" name="sphere_radius" type="float">
- </argument>
- <description>
- Checks if the segment ([code]from[/code], [code]to[/code]) intersects the sphere that is located at [code]sphere_position[/code] and has radius [code]sphere_radius[/code]. If no, returns an empty [PackedVector3Array]. If yes, returns a [PackedVector3Array] containing the point of intersection and the sphere's normal at the point of intersection.
- </description>
- </method>
- <method name="segment_intersects_triangle">
- <return type="Variant">
- </return>
- <argument index="0" name="from" type="Vector3">
- </argument>
- <argument index="1" name="to" type="Vector3">
- </argument>
- <argument index="2" name="a" type="Vector3">
- </argument>
- <argument index="3" name="b" type="Vector3">
- </argument>
- <argument index="4" name="c" type="Vector3">
- </argument>
- <description>
- Tests if the segment ([code]from[/code], [code]to[/code]) intersects the triangle [code]a[/code], [code]b[/code], [code]c[/code]. If yes, returns the point of intersection as [Vector3]. If no intersection takes place, an empty [Variant] is returned.
- </description>
- </method>
- <method name="triangulate_delaunay_2d">
+ <method name="triangulate_delaunay">
<return type="PackedInt32Array">
</return>
<argument index="0" name="points" type="PackedVector2Array">
diff --git a/doc/classes/Geometry3D.xml b/doc/classes/Geometry3D.xml
new file mode 100644
index 0000000000..ec685a5ce7
--- /dev/null
+++ b/doc/classes/Geometry3D.xml
@@ -0,0 +1,194 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="Geometry3D" inherits="Object" version="4.0">
+ <brief_description>
+ Helper node to calculate generic geometry operations in 3D space.
+ </brief_description>
+ <description>
+ Geometry3D provides users with a set of helper functions to create geometric shapes, compute intersections between shapes, and process various other geometric operations.
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ <method name="build_box_planes">
+ <return type="Array">
+ </return>
+ <argument index="0" name="extents" type="Vector3">
+ </argument>
+ <description>
+ Returns an array with 6 [Plane]s that describe the sides of a box centered at the origin. The box size is defined by [code]extents[/code], which represents one (positive) corner of the box (i.e. half its actual size).
+ </description>
+ </method>
+ <method name="build_capsule_planes">
+ <return type="Array">
+ </return>
+ <argument index="0" name="radius" type="float">
+ </argument>
+ <argument index="1" name="height" type="float">
+ </argument>
+ <argument index="2" name="sides" type="int">
+ </argument>
+ <argument index="3" name="lats" type="int">
+ </argument>
+ <argument index="4" name="axis" type="int" enum="Vector3.Axis" default="2">
+ </argument>
+ <description>
+ Returns an array of [Plane]s closely bounding a faceted capsule centered at the origin with radius [code]radius[/code] and height [code]height[/code]. The parameter [code]sides[/code] defines how many planes will be generated for the side part of the capsule, whereas [code]lats[/code] gives the number of latitudinal steps at the bottom and top of the capsule. The parameter [code]axis[/code] describes the axis along which the capsule is oriented (0 for X, 1 for Y, 2 for Z).
+ </description>
+ </method>
+ <method name="build_cylinder_planes">
+ <return type="Array">
+ </return>
+ <argument index="0" name="radius" type="float">
+ </argument>
+ <argument index="1" name="height" type="float">
+ </argument>
+ <argument index="2" name="sides" type="int">
+ </argument>
+ <argument index="3" name="axis" type="int" enum="Vector3.Axis" default="2">
+ </argument>
+ <description>
+ Returns an array of [Plane]s closely bounding a faceted cylinder centered at the origin with radius [code]radius[/code] and height [code]height[/code]. The parameter [code]sides[/code] defines how many planes will be generated for the round part of the cylinder. The parameter [code]axis[/code] describes the axis along which the cylinder is oriented (0 for X, 1 for Y, 2 for Z).
+ </description>
+ </method>
+ <method name="clip_polygon">
+ <return type="PackedVector3Array">
+ </return>
+ <argument index="0" name="points" type="PackedVector3Array">
+ </argument>
+ <argument index="1" name="plane" type="Plane">
+ </argument>
+ <description>
+ Clips the polygon defined by the points in [code]points[/code] against the [code]plane[/code] and returns the points of the clipped polygon.
+ </description>
+ </method>
+ <method name="get_closest_point_to_segment">
+ <return type="Vector3">
+ </return>
+ <argument index="0" name="point" type="Vector3">
+ </argument>
+ <argument index="1" name="s1" type="Vector3">
+ </argument>
+ <argument index="2" name="s2" type="Vector3">
+ </argument>
+ <description>
+ Returns the 3D point on the 3D segment ([code]s1[/code], [code]s2[/code]) that is closest to [code]point[/code]. The returned point will always be inside the specified segment.
+ </description>
+ </method>
+ <method name="get_closest_point_to_segment_uncapped">
+ <return type="Vector3">
+ </return>
+ <argument index="0" name="point" type="Vector3">
+ </argument>
+ <argument index="1" name="s1" type="Vector3">
+ </argument>
+ <argument index="2" name="s2" type="Vector3">
+ </argument>
+ <description>
+ Returns the 3D point on the 3D line defined by ([code]s1[/code], [code]s2[/code]) that is closest to [code]point[/code]. The returned point can be inside the segment ([code]s1[/code], [code]s2[/code]) or outside of it, i.e. somewhere on the line extending from the segment.
+ </description>
+ </method>
+ <method name="get_closest_points_between_segments">
+ <return type="PackedVector3Array">
+ </return>
+ <argument index="0" name="p1" type="Vector3">
+ </argument>
+ <argument index="1" name="p2" type="Vector3">
+ </argument>
+ <argument index="2" name="q1" type="Vector3">
+ </argument>
+ <argument index="3" name="q2" type="Vector3">
+ </argument>
+ <description>
+ Given the two 3D segments ([code]p1[/code], [code]p2[/code]) and ([code]q1[/code], [code]q2[/code]), finds those two points on the two segments that are closest to each other. Returns a [PackedVector3Array] that contains this point on ([code]p1[/code], [code]p2[/code]) as well the accompanying point on ([code]q1[/code], [code]q2[/code]).
+ </description>
+ </method>
+ <method name="get_uv84_normal_bit">
+ <return type="int">
+ </return>
+ <argument index="0" name="normal" type="Vector3">
+ </argument>
+ <description>
+ Used internally by the engine.
+ </description>
+ </method>
+ <method name="ray_intersects_triangle">
+ <return type="Variant">
+ </return>
+ <argument index="0" name="from" type="Vector3">
+ </argument>
+ <argument index="1" name="dir" type="Vector3">
+ </argument>
+ <argument index="2" name="a" type="Vector3">
+ </argument>
+ <argument index="3" name="b" type="Vector3">
+ </argument>
+ <argument index="4" name="c" type="Vector3">
+ </argument>
+ <description>
+ Tests if the 3D ray starting at [code]from[/code] with the direction of [code]dir[/code] intersects the triangle specified by [code]a[/code], [code]b[/code] and [code]c[/code]. If yes, returns the point of intersection as [Vector3]. If no intersection takes place, an empty [Variant] is returned.
+ </description>
+ </method>
+ <method name="segment_intersects_convex">
+ <return type="PackedVector3Array">
+ </return>
+ <argument index="0" name="from" type="Vector3">
+ </argument>
+ <argument index="1" name="to" type="Vector3">
+ </argument>
+ <argument index="2" name="planes" type="Array">
+ </argument>
+ <description>
+ Given a convex hull defined though the [Plane]s in the array [code]planes[/code], tests if the segment ([code]from[/code], [code]to[/code]) intersects with that hull. If an intersection is found, returns a [PackedVector3Array] containing the point the intersection and the hull's normal. If no intersecion is found, an the returned array is empty.
+ </description>
+ </method>
+ <method name="segment_intersects_cylinder">
+ <return type="PackedVector3Array">
+ </return>
+ <argument index="0" name="from" type="Vector3">
+ </argument>
+ <argument index="1" name="to" type="Vector3">
+ </argument>
+ <argument index="2" name="height" type="float">
+ </argument>
+ <argument index="3" name="radius" type="float">
+ </argument>
+ <description>
+ Checks if the segment ([code]from[/code], [code]to[/code]) intersects the cylinder with height [code]height[/code] that is centered at the origin and has radius [code]radius[/code]. If no, returns an empty [PackedVector3Array]. If an intersection takes place, the returned array contains the point of intersection and the cylinder's normal at the point of intersection.
+ </description>
+ </method>
+ <method name="segment_intersects_sphere">
+ <return type="PackedVector3Array">
+ </return>
+ <argument index="0" name="from" type="Vector3">
+ </argument>
+ <argument index="1" name="to" type="Vector3">
+ </argument>
+ <argument index="2" name="sphere_position" type="Vector3">
+ </argument>
+ <argument index="3" name="sphere_radius" type="float">
+ </argument>
+ <description>
+ Checks if the segment ([code]from[/code], [code]to[/code]) intersects the sphere that is located at [code]sphere_position[/code] and has radius [code]sphere_radius[/code]. If no, returns an empty [PackedVector3Array]. If yes, returns a [PackedVector3Array] containing the point of intersection and the sphere's normal at the point of intersection.
+ </description>
+ </method>
+ <method name="segment_intersects_triangle">
+ <return type="Variant">
+ </return>
+ <argument index="0" name="from" type="Vector3">
+ </argument>
+ <argument index="1" name="to" type="Vector3">
+ </argument>
+ <argument index="2" name="a" type="Vector3">
+ </argument>
+ <argument index="3" name="b" type="Vector3">
+ </argument>
+ <argument index="4" name="c" type="Vector3">
+ </argument>
+ <description>
+ Tests if the segment ([code]from[/code], [code]to[/code]) intersects the triangle [code]a[/code], [code]b[/code], [code]c[/code]. If yes, returns the point of intersection as [Vector3]. If no intersection takes place, an empty [Variant] is returned.
+ </description>
+ </method>
+ </methods>
+ <constants>
+ </constants>
+</class>