class_plane - ScyDev/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

center

Returns the center of the plane.

distance_to

Returns the shortest distance from the plane to the position "point".

get_any_point

Returns a point on the plane.

has_point

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

intersect_3

Returns the intersection point of the three planes "b", "c" and this plane. If no intersection is found null is returned.

intersects_ray

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.

intersects_segment

Returns the intersection point of a segment from position "begin" to position "end" with this plane. If no intersection is found null is returned.

is_point_over

Returns true if "point" 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.

Plane

Creates a plane from the three parameters "a", "b", "c" and "d".

Plane

Creates a plane from three points.

Plane

Creates a plane from the normal and the plane's distance to the origin.