class_plane - vkbsb/godot GitHub Wiki

Plane

####Category: Built-In Types

Brief Description

Plane in hessian form.

Member Functions

Member Variables

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.

Member Function Description

has_point

Returns true if "p" is inside the plane (by a very minimum treshold).

intersect_3

Returns true if this plane intersects with planes "a" and "b". The resulting intersectin is placed in "r".

intersects_ray

Returns true if ray consiting of position "p" and direction normal "d" intersects this plane. If true, the result is placed in "r".

intersects_segment

Returns true if segment from position "sa" to position "sb" intersects this plane. If true, the result is placed in "r".

is_point_over

Returns true if "p" is located above the plane.

normalized

Returns a copy of the plane, normalized.

project

Returns the orthogonal projection of point "p" into a point in the plane.