Plane

    Plane in hessian form.

    Properties

    Plane ( a, float b, c, float d )
    Plane ( v1, Vector3 v2, v3 )
    Plane ( Vector3 normal, d )
    Vector3 ( )
    float ( Vector3 point )
    get_any_point ( )
    has_point ( point, float epsilon=0.00001 )
    intersect_3 ( b, Plane c )
    intersects_ray ( from, Vector3 dir )
    intersects_segment ( begin, Vector3 end )
    is_point_over ( point )
    Plane ( )
    Vector3 ( Vector3 point )

    Constants

    • PLANE_YZ = Plane( 1, 0, 0, 0 )
    • PLANE_XY = Plane( 0, 0, 1, 0 )

    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


    • normal


    • y

    Method Descriptions

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


    Creates a plane from three points.



    Returns the center of the plane.


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


    • get_any_point ( )

    Returns a point on the plane.


    • bool has_point ( point, float epsilon=0.00001 )

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


    • intersect_3 ( Plane b, c )

    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 ( Vector3 begin, end )

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


    • bool is_point_over ( point )

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


    Returns a copy of the plane, normalized.