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
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
- float d
normal. This value is typically non-negative.
ax + by + cz = d, this isd, while the(a, b, c)coordinates are represented by the normal property.
- Vector3 normal
The normal of the plane, which must be normalized.
ax + by + cz = d, this is the vector(a, b, c), wheredis the d property.
- float x normal vector.
- float y normal vector.
- float z
normal vector.
Method Descriptions
- Plane Plane ( float a, float b, float c, float d )
normal are
a,bandc, and the plane has a distance ofdfrom the origin.
- Plane Plane ( Vector3 v1, Vector3 v2, Vector3 v3 ) Creates a plane from the three points, given in clockwise order.
- Plane Plane ( Vector3 normal, float d ) Creates a plane from the normal and the plane’s distance to the origin.
- Vector3 center ( ) Returns the center of the plane.
- float distance_to ( Vector3 point )
point.
- Vector3 get_any_point ( ) Returns the center of the plane. center instead.
- bool has_point ( Vector3 point, float epsilon=1e-05 )
trueifpointis inside the plane. Comparison uses a custom minimumepsilonthreshold.
- Vector3 intersect_3 ( Plane b, Plane c )
b,cand this plane. If no intersection is found,nullis returned.
- Vector3 intersects_ray ( Vector3 from, Vector3 dir )
fromand the direction normaldirwith this plane. If no intersection is found,nullis returned.
- Vector3 intersects_segment ( Vector3 begin, Vector3 end )
beginto positionendwith this plane. If no intersection is found,nullis returned.
- bool is_equal_approx ( Plane plane )
trueif this plane andplaneare approximately equal, by running @GDScript.is_equal_approx on each component.
- bool is_point_over ( Vector3 point )
trueifpointis located above the plane.
- Plane normalized ( ) Returns a copy of the plane, normalized.
- Vector3 project ( Vector3 point )
pointinto a point in the plane.
