123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221 |
- :github_url: hide
- .. Generated automatically by doc/tools/makerst.py in Godot's source tree.
- .. DO NOT EDIT THIS FILE, but the Plane.xml source instead.
- .. The source is found in doc/classes or modules/<name>/doc_classes.
- .. _class_Plane:
- Plane
- =====
- **Category:** Built-In Types
- Brief Description
- -----------------
- Plane in hessian form.
- Properties
- ----------
- +-------------------------------+--------------------------------------------+
- | :ref:`float<class_float>` | :ref:`d<class_Plane_property_d>` |
- +-------------------------------+--------------------------------------------+
- | :ref:`Vector3<class_Vector3>` | :ref:`normal<class_Plane_property_normal>` |
- +-------------------------------+--------------------------------------------+
- | :ref:`float<class_float>` | :ref:`x<class_Plane_property_x>` |
- +-------------------------------+--------------------------------------------+
- | :ref:`float<class_float>` | :ref:`y<class_Plane_property_y>` |
- +-------------------------------+--------------------------------------------+
- | :ref:`float<class_float>` | :ref:`z<class_Plane_property_z>` |
- +-------------------------------+--------------------------------------------+
- Methods
- -------
- +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`Plane<class_Plane>` | :ref:`Plane<class_Plane_method_Plane>` **(** :ref:`float<class_float>` a, :ref:`float<class_float>` b, :ref:`float<class_float>` c, :ref:`float<class_float>` d **)** |
- +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`Plane<class_Plane>` | :ref:`Plane<class_Plane_method_Plane>` **(** :ref:`Vector3<class_Vector3>` v1, :ref:`Vector3<class_Vector3>` v2, :ref:`Vector3<class_Vector3>` v3 **)** |
- +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`Plane<class_Plane>` | :ref:`Plane<class_Plane_method_Plane>` **(** :ref:`Vector3<class_Vector3>` normal, :ref:`float<class_float>` d **)** |
- +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`Vector3<class_Vector3>` | :ref:`center<class_Plane_method_center>` **(** **)** |
- +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`float<class_float>` | :ref:`distance_to<class_Plane_method_distance_to>` **(** :ref:`Vector3<class_Vector3>` point **)** |
- +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`Vector3<class_Vector3>` | :ref:`get_any_point<class_Plane_method_get_any_point>` **(** **)** |
- +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`bool<class_bool>` | :ref:`has_point<class_Plane_method_has_point>` **(** :ref:`Vector3<class_Vector3>` point, :ref:`float<class_float>` epsilon=0.00001 **)** |
- +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`Vector3<class_Vector3>` | :ref:`intersect_3<class_Plane_method_intersect_3>` **(** :ref:`Plane<class_Plane>` b, :ref:`Plane<class_Plane>` c **)** |
- +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`Vector3<class_Vector3>` | :ref:`intersects_ray<class_Plane_method_intersects_ray>` **(** :ref:`Vector3<class_Vector3>` from, :ref:`Vector3<class_Vector3>` dir **)** |
- +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`Vector3<class_Vector3>` | :ref:`intersects_segment<class_Plane_method_intersects_segment>` **(** :ref:`Vector3<class_Vector3>` begin, :ref:`Vector3<class_Vector3>` end **)** |
- +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`bool<class_bool>` | :ref:`is_point_over<class_Plane_method_is_point_over>` **(** :ref:`Vector3<class_Vector3>` point **)** |
- +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`Plane<class_Plane>` | :ref:`normalized<class_Plane_method_normalized>` **(** **)** |
- +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`Vector3<class_Vector3>` | :ref:`project<class_Plane_method_project>` **(** :ref:`Vector3<class_Vector3>` point **)** |
- +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- Constants
- ---------
- .. _class_Plane_constant_PLANE_YZ:
- .. _class_Plane_constant_PLANE_XZ:
- .. _class_Plane_constant_PLANE_XY:
- - **PLANE_YZ** = **Plane( 1, 0, 0, 0 )**
- - **PLANE_XZ** = **Plane( 0, 1, 0, 0 )**
- - **PLANE_XY** = **Plane( 0, 0, 1, 0 )**
- 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.
- Tutorials
- ---------
- - :doc:`../tutorials/math/index`
- Property Descriptions
- ---------------------
- .. _class_Plane_property_d:
- - :ref:`float<class_float>` **d**
- ----
- .. _class_Plane_property_normal:
- - :ref:`Vector3<class_Vector3>` **normal**
- ----
- .. _class_Plane_property_x:
- - :ref:`float<class_float>` **x**
- ----
- .. _class_Plane_property_y:
- - :ref:`float<class_float>` **y**
- ----
- .. _class_Plane_property_z:
- - :ref:`float<class_float>` **z**
- Method Descriptions
- -------------------
- .. _class_Plane_method_Plane:
- - :ref:`Plane<class_Plane>` **Plane** **(** :ref:`float<class_float>` a, :ref:`float<class_float>` b, :ref:`float<class_float>` c, :ref:`float<class_float>` d **)**
- Creates a plane from the four parameters "a", "b", "c" and "d".
- ----
- - :ref:`Plane<class_Plane>` **Plane** **(** :ref:`Vector3<class_Vector3>` v1, :ref:`Vector3<class_Vector3>` v2, :ref:`Vector3<class_Vector3>` v3 **)**
- Creates a plane from three points.
- ----
- - :ref:`Plane<class_Plane>` **Plane** **(** :ref:`Vector3<class_Vector3>` normal, :ref:`float<class_float>` d **)**
- Creates a plane from the normal and the plane's distance to the origin.
- ----
- .. _class_Plane_method_center:
- - :ref:`Vector3<class_Vector3>` **center** **(** **)**
- Returns the center of the plane.
- ----
- .. _class_Plane_method_distance_to:
- - :ref:`float<class_float>` **distance_to** **(** :ref:`Vector3<class_Vector3>` point **)**
- Returns the shortest distance from the plane to the position "point".
- ----
- .. _class_Plane_method_get_any_point:
- - :ref:`Vector3<class_Vector3>` **get_any_point** **(** **)**
- Returns a point on the plane.
- ----
- .. _class_Plane_method_has_point:
- - :ref:`bool<class_bool>` **has_point** **(** :ref:`Vector3<class_Vector3>` point, :ref:`float<class_float>` epsilon=0.00001 **)**
- Returns ``true`` if "point" is inside the plane (by a very minimum threshold).
- ----
- .. _class_Plane_method_intersect_3:
- - :ref:`Vector3<class_Vector3>` **intersect_3** **(** :ref:`Plane<class_Plane>` b, :ref:`Plane<class_Plane>` c **)**
- Returns the intersection point of the three planes "b", "c" and this plane. If no intersection is found null is returned.
- ----
- .. _class_Plane_method_intersects_ray:
- - :ref:`Vector3<class_Vector3>` **intersects_ray** **(** :ref:`Vector3<class_Vector3>` from, :ref:`Vector3<class_Vector3>` dir **)**
- Returns the intersection point of a ray consisting of the position "from" and the direction normal "dir" with this plane. If no intersection is found null is returned.
- ----
- .. _class_Plane_method_intersects_segment:
- - :ref:`Vector3<class_Vector3>` **intersects_segment** **(** :ref:`Vector3<class_Vector3>` begin, :ref:`Vector3<class_Vector3>` end **)**
- Returns the intersection point of a segment from position "begin" to position "end" with this plane. If no intersection is found null is returned.
- ----
- .. _class_Plane_method_is_point_over:
- - :ref:`bool<class_bool>` **is_point_over** **(** :ref:`Vector3<class_Vector3>` point **)**
- Returns ``true`` if "point" is located above the plane.
- ----
- .. _class_Plane_method_normalized:
- - :ref:`Plane<class_Plane>` **normalized** **(** **)**
- Returns a copy of the plane, normalized.
- ----
- .. _class_Plane_method_project:
- - :ref:`Vector3<class_Vector3>` **project** **(** :ref:`Vector3<class_Vector3>` point **)**
- Returns the orthogonal projection of point "p" into a point in the plane.
|