A 2D plane that extends infinitely in a 3D volume.
The contents of the <GraphenePlane> are private, and
should not be modified directly.
Allocates a new <GraphenePlane> structure.
The contents of the returned structure are undefined.
Returned: a <GraphenePlane>.
the newly allocated <GraphenePlane>. Use
plane:free to free the resources allocated by
this function
Computes the distance of point from a
<GraphenePlane>.
Passed: a <GraphenePlane>.
Passed: a <GraphenePoint3D>.
Returned: a real number.
the distance of the given <GraphenePoint3D> from
the plane
Checks whether the two given <GraphenePlane> are
equal.
Passed: a <GraphenePlane>.
Passed: a <GraphenePlane>.
Returned: a boolean.
true if the given planes are equal
Frees the resources allocated by plane:alloc.
Passed: a <GraphenePlane>.
Retrieves the distance along the normal vector of the given
<GraphenePlane> from the origin.
Passed: a <GraphenePlane>.
Returned: a real number.
the constant value of the plane
Retrieves the normal vector pointing towards the origin of the given
<GraphenePlane>.
Passed: a <GraphenePlane>.
Passed, filled in, and returned: a <GrapheneVec3>.
return location for the normal vector
Initializes the given <GraphenePlane> using the
given normal vector and constant values.
Passed: a <GraphenePlane>.
the <GraphenePlane> to initialize
Passed: a <GrapheneVec3>, or #f.
a unit length normal vector defining the plane pointing towards the origin; if unset, we use the X axis by default
Passed: a real number.
the distance from the origin to the plane along the normal vector; the sign determines the half-space occupied by the plane
Returned: a <GraphenePlane>.
the initialized plane
Initializes the given <GraphenePlane> using the
normal vector and constant of another
<GraphenePlane>.
Passed: a <GraphenePlane>.
the <GraphenePlane> to initialize
Passed: a <GraphenePlane>.
Returned: a <GraphenePlane>.
the initialized plane
Initializes the given <GraphenePlane> using the
given normal vector and an arbitrary co-planar point.
Passed: a <GraphenePlane>.
the <GraphenePlane> to initialize
Passed: a <GrapheneVec3>.
a normal vector defining the plane pointing towards the origin
Passed: a <GraphenePoint3D>.
Returned: a <GraphenePlane>.
the initialized plane
Initializes the given <GraphenePlane> using the 3
provided co-planar points.
The winding order is counter-clockwise, and determines which direction the normal vector will point.
Passed: a <GraphenePlane>.
the <GraphenePlane> to initialize
Passed: a <GraphenePoint3D>.
Passed: a <GraphenePoint3D>.
Passed: a <GraphenePoint3D>.
Returned: a <GraphenePlane>.
the initialized plane
Initializes the given <GraphenePlane> using the
components of the given <GrapheneVec4> vector.
Passed: a <GraphenePlane>.
the <GraphenePlane> to initialize
Passed: a <GrapheneVec4>.
a <GrapheneVec4> containing the normal vector in its
first three components, and the distance in its fourth component
Returned: a <GraphenePlane>.
the initialized plane
Negates the normal vector and constant of a
<GraphenePlane>, effectively mirroring the plane
across the origin.
Passed: a <GraphenePlane>.
Passed, filled in, and returned: a <GraphenePlane>.
return location for the negated plane
Normalizes the vector of the given <GraphenePlane>,
and adjusts the constant accordingly.
Passed: a <GraphenePlane>.
Passed, filled in, and returned: a <GraphenePlane>.
return location for the normalized plane
Transforms a <GraphenePlane> self using the
given matrix and normal-matrix.
If normal-matrix is #f, a transformation matrix for the
plane normal will be computed from matrix. If you are
transforming multiple planes using the same matrix it’s
recommended to compute the normal matrix beforehand to avoid incurring
in the cost of recomputing it every time.
Passed: a <GraphenePlane>.
Passed: a <GrapheneMatrix>.
Passed: a <GrapheneMatrix>, or #f.
Passed, filled in, and returned: a <GraphenePlane>.
the transformed plane