Plane¶
Plane in hessian form.
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¶
Properties¶
| ||
| ||
| ||
| ||
|
Methods¶
center() | |
distance_to(Vector3 point) | |
intersect_3(Plane b,Plane c) | |
intersects_ray(Vector3 from,Vector3 dir) | |
intersects_segment(Vector3 begin,Vector3 end) | |
is_equal_approx(Plane plane) | |
is_point_over(Vector3 point) | |
Constants¶
PLANE_YZ =Plane( 1, 0, 0, 0 ) --- A plane that extends in the Y and Z axes (normal vector points +X).
PLANE_XZ =Plane( 0, 1, 0, 0 ) --- A plane that extends in the X and Z axes (normal vector points +Y).
PLANE_XY =Plane( 0, 0, 1, 0 ) --- A plane that extends in the X and Y axes (normal vector points +Z).
Property Descriptions¶
Default |
|
The distance from the origin to the plane, in the direction ofnormal. This value is typically non-negative.
In the scalar equation of the planeax+by+cz=d, this isd, while the(a,b,c) coordinates are represented by thenormal property.
Vector3normal
Default |
|
The normal of the plane, which must be normalized.
In the scalar equation of the planeax+by+cz=d, this is the vector(a,b,c), whered is thed property.
Default |
|
The X component of the plane'snormal vector.
Default |
|
The Y component of the plane'snormal vector.
Default |
|
The Z component of the plane'snormal vector.
Method Descriptions¶
Creates a plane from the four parameters. The three components of the resulting plane'snormal area,b andc, and the plane has a distance ofd from the origin.
Creates a plane from the three points, given in clockwise order.
Creates a plane from the normal and the plane's distance to the origin.
Vector3center()
Returns the center of the plane.
Returns the shortest distance from the plane to the positionpoint.
Vector3get_any_point()
Returns the center of the plane.
This method is deprecated, please usecenter instead.
Returnstrue ifpoint is inside the plane. Comparison uses a custom minimumepsilon threshold.
Returns the intersection point of the three planesb,c and this plane. If no intersection is found,null is returned.
Returns the intersection point of a ray consisting of the positionfrom and the direction normaldir with this plane. If no intersection is found,null is returned.
Returns the intersection point of a segment from positionbegin to positionend with this plane. If no intersection is found,null is returned.
Returnstrue if this plane andplane are approximately equal, by running@GDScript.is_equal_approx on each component.
Returnstrue ifpoint is located above the plane.
Planenormalized()
Returns a copy of the plane, normalized.
Returns the orthogonal projection ofpoint into a point in the plane.