2017-09-12 22:42:36 +02:00
<?xml version="1.0" encoding="UTF-8" ?>
2022-08-05 18:51:38 +02:00
<class name= "Plane" version= "3.6" xmlns:xsi= "http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation= "../class.xsd" >
2017-09-12 22:42:36 +02:00
<brief_description >
Plane in hessian form.
</brief_description>
<description >
Plane represents a normalized plane equation. Basically, "normal" is the normal of the plane (a,b,c normalized), and "d" is the distance from the origin to the plane (in the direction of "normal"). "Over" or "Above" the plane is considered the side of the plane towards where the normal is pointing.
</description>
<tutorials >
2021-11-15 17:11:20 +01:00
<link > $DOCS_URL/tutorials/math/index.html</link>
2017-09-12 22:42:36 +02:00
</tutorials>
<methods >
<method name= "Plane" >
2021-07-30 15:28:05 +02:00
<return type= "Plane" />
<argument index= "0" name= "a" type= "float" />
<argument index= "1" name= "b" type= "float" />
<argument index= "2" name= "c" type= "float" />
<argument index= "3" name= "d" type= "float" />
2017-09-12 22:42:36 +02:00
<description >
2019-12-18 08:09:11 +01:00
Creates a plane from the four parameters. The three components of the resulting plane's [member normal] are [code]a[/code], [code]b[/code] and [code]c[/code], and the plane has a distance of [code]d[/code] from the origin.
2017-09-12 22:42:36 +02:00
</description>
</method>
<method name= "Plane" >
2021-07-30 15:28:05 +02:00
<return type= "Plane" />
<argument index= "0" name= "v1" type= "Vector3" />
<argument index= "1" name= "v2" type= "Vector3" />
<argument index= "2" name= "v3" type= "Vector3" />
2017-09-12 22:42:36 +02:00
<description >
2019-12-18 08:09:11 +01:00
Creates a plane from the three points, given in clockwise order.
2017-09-12 22:42:36 +02:00
</description>
</method>
<method name= "Plane" >
2021-07-30 15:28:05 +02:00
<return type= "Plane" />
<argument index= "0" name= "normal" type= "Vector3" />
<argument index= "1" name= "d" type= "float" />
2017-09-12 22:42:36 +02:00
<description >
Creates a plane from the normal and the plane's distance to the origin.
</description>
</method>
<method name= "center" >
2021-07-30 15:28:05 +02:00
<return type= "Vector3" />
2017-09-12 22:42:36 +02:00
<description >
Returns the center of the plane.
</description>
</method>
<method name= "distance_to" >
2021-07-30 15:28:05 +02:00
<return type= "float" />
<argument index= "0" name= "point" type= "Vector3" />
2017-09-12 22:42:36 +02:00
<description >
2019-06-22 01:04:47 +02:00
Returns the shortest distance from the plane to the position [code]point[/code].
2017-09-12 22:42:36 +02:00
</description>
</method>
<method name= "get_any_point" >
2021-07-30 15:28:05 +02:00
<return type= "Vector3" />
2017-09-12 22:42:36 +02:00
<description >
2020-07-22 03:21:41 +02:00
Returns the center of the plane.
This method is deprecated, please use [method center] instead.
2017-09-12 22:42:36 +02:00
</description>
</method>
<method name= "has_point" >
2021-07-30 15:28:05 +02:00
<return type= "bool" />
<argument index= "0" name= "point" type= "Vector3" />
<argument index= "1" name= "epsilon" type= "float" default= "1e-05" />
2017-09-12 22:42:36 +02:00
<description >
2020-07-22 03:21:41 +02:00
Returns [code]true[/code] if [code]point[/code] is inside the plane. Comparison uses a custom minimum [code]epsilon[/code] threshold.
2017-09-12 22:42:36 +02:00
</description>
</method>
<method name= "intersect_3" >
2021-07-30 15:28:05 +02:00
<return type= "Vector3" />
<argument index= "0" name= "b" type= "Plane" />
<argument index= "1" name= "c" type= "Plane" />
2017-09-12 22:42:36 +02:00
<description >
2019-06-22 01:04:47 +02:00
Returns the intersection point of the three planes [code]b[/code], [code]c[/code] and this plane. If no intersection is found, [code]null[/code] is returned.
2017-09-12 22:42:36 +02:00
</description>
</method>
<method name= "intersects_ray" >
2021-07-30 15:28:05 +02:00
<return type= "Vector3" />
<argument index= "0" name= "from" type= "Vector3" />
<argument index= "1" name= "dir" type= "Vector3" />
2017-09-12 22:42:36 +02:00
<description >
2019-06-22 01:04:47 +02:00
Returns the intersection point of a ray consisting of the position [code]from[/code] and the direction normal [code]dir[/code] with this plane. If no intersection is found, [code]null[/code] is returned.
2017-09-12 22:42:36 +02:00
</description>
</method>
<method name= "intersects_segment" >
2021-07-30 15:28:05 +02:00
<return type= "Vector3" />
<argument index= "0" name= "begin" type= "Vector3" />
<argument index= "1" name= "end" type= "Vector3" />
2017-09-12 22:42:36 +02:00
<description >
2019-06-22 01:04:47 +02:00
Returns the intersection point of a segment from position [code]begin[/code] to position [code]end[/code] with this plane. If no intersection is found, [code]null[/code] is returned.
2017-09-12 22:42:36 +02:00
</description>
</method>
2019-11-08 08:33:48 +01:00
<method name= "is_equal_approx" >
2021-07-30 15:28:05 +02:00
<return type= "bool" />
<argument index= "0" name= "plane" type= "Plane" />
2019-11-08 08:33:48 +01:00
<description >
2019-11-30 21:08:50 +01:00
Returns [code]true[/code] if this plane and [code]plane[/code] are approximately equal, by running [method @GDScript.is_equal_approx] on each component.
2019-11-08 08:33:48 +01:00
</description>
</method>
2017-09-12 22:42:36 +02:00
<method name= "is_point_over" >
2021-07-30 15:28:05 +02:00
<return type= "bool" />
<argument index= "0" name= "point" type= "Vector3" />
2017-09-12 22:42:36 +02:00
<description >
2019-06-22 01:04:47 +02:00
Returns [code]true[/code] if [code]point[/code] is located above the plane.
2017-09-12 22:42:36 +02:00
</description>
</method>
<method name= "normalized" >
2021-07-30 15:28:05 +02:00
<return type= "Plane" />
2017-09-12 22:42:36 +02:00
<description >
Returns a copy of the plane, normalized.
</description>
</method>
<method name= "project" >
2021-07-30 15:28:05 +02:00
<return type= "Vector3" />
<argument index= "0" name= "point" type= "Vector3" />
2017-09-12 22:42:36 +02:00
<description >
2020-07-22 03:21:41 +02:00
Returns the orthogonal projection of [code]point[/code] into a point in the plane.
2017-09-12 22:42:36 +02:00
</description>
</method>
</methods>
<members >
2019-06-29 12:38:01 +02:00
<member name= "d" type= "float" setter= "" getter= "" default= "0.0" >
2020-07-22 03:21:41 +02:00
The distance from the origin to the plane, in the direction of [member normal]. This value is typically non-negative.
In the scalar equation of the plane [code]ax + by + cz = d[/code], this is [code]d[/code], while the [code](a, b, c)[/code] coordinates are represented by the [member normal] property.
2017-09-12 22:42:36 +02:00
</member>
2019-06-29 12:38:01 +02:00
<member name= "normal" type= "Vector3" setter= "" getter= "" default= "Vector3( 0, 0, 0 )" >
2020-07-22 03:21:41 +02:00
The normal of the plane, which must be normalized.
In the scalar equation of the plane [code]ax + by + cz = d[/code], this is the vector [code](a, b, c)[/code], where [code]d[/code] is the [member d] property.
2017-09-12 22:42:36 +02:00
</member>
2019-06-29 12:38:01 +02:00
<member name= "x" type= "float" setter= "" getter= "" default= "0.0" >
2020-07-22 03:21:41 +02:00
The X component of the plane's [member normal] vector.
2017-09-12 22:42:36 +02:00
</member>
2019-06-29 12:38:01 +02:00
<member name= "y" type= "float" setter= "" getter= "" default= "0.0" >
2020-07-22 03:21:41 +02:00
The Y component of the plane's [member normal] vector.
2017-09-12 22:42:36 +02:00
</member>
2019-06-29 12:38:01 +02:00
<member name= "z" type= "float" setter= "" getter= "" default= "0.0" >
2020-07-22 03:21:41 +02:00
The Z component of the plane's [member normal] vector.
2017-09-12 22:42:36 +02:00
</member>
</members>
<constants >
2018-08-29 22:25:11 +02:00
<constant name= "PLANE_YZ" value= "Plane( 1, 0, 0, 0 )" >
2020-07-22 03:21:41 +02:00
A plane that extends in the Y and Z axes (normal vector points +X).
2018-08-21 00:35:30 +02:00
</constant>
2018-08-29 22:25:11 +02:00
<constant name= "PLANE_XZ" value= "Plane( 0, 1, 0, 0 )" >
2020-07-22 03:21:41 +02:00
A plane that extends in the X and Z axes (normal vector points +Y).
2018-08-21 00:35:30 +02:00
</constant>
2018-08-29 22:25:11 +02:00
<constant name= "PLANE_XY" value= "Plane( 0, 0, 1, 0 )" >
2020-07-22 03:21:41 +02:00
A plane that extends in the X and Y axes (normal vector points +Z).
2018-08-21 00:35:30 +02:00
</constant>
2017-09-12 22:42:36 +02:00
</constants>
</class>