Plane

Category: Built-In Types

Brief Description

Plane in hessian form.

Properties

floatd
Vector3normal
floatx
floaty
floatz

Methods

PlanePlane ( float a, float b, float c, float d )
PlanePlane ( Vector3 v1, Vector3 v2, Vector3 v3 )
PlanePlane ( Vector3 normal, float d )
Vector3center ( )
floatdistance_to ( Vector3 point )
Vector3get_any_point ( )
boolhas_point ( Vector3 point, float epsilon=0.00001 )
Vector3intersect_3 ( Plane b, Plane c )
Vector3intersects_ray ( Vector3 from, Vector3 dir )
Vector3intersects_segment ( Vector3 begin, Vector3 end )
boolis_point_over ( Vector3 point )
Planenormalized ( )
Vector3project ( Vector3 point )

Constants

  • 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

Property Descriptions





Method Descriptions

Creates a plane from the four parameters “a”, “b”, “c” and “d”.


Creates a plane from three points.


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


Returns the center of the plane.


Returns the shortest distance from the plane to the position “point”.


Returns a point on the plane.


Returns true if “point” is inside the plane (by a very minimum threshold).


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


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.


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


Returns true if “point” is located above the plane.


Returns a copy of the plane, normalized.


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