gl3n.plane
-
Declaration
structPlaneT(type = float) if (isFloatingPoint!type);Base template for all plane-types.
Parameters
typeall values get stored as this type (must be floating point)
-
Declaration
aliaspt= type;Holds the internal type of the plane.
-
Declaration
aliasvec3= Vector!(pt, 3);Convenience alias to the corresponding vector type.
-
Declaration
pta;normal.x
-
Declaration
ptb;normal.y
-
Declaration
ptc;normal.z
-
Declaration
vec3normal;Holds the planes
normal. -
Declaration
ptd;Holds the planes "constant" (HNF).
-
Declaration
this(pta, ptb, ptc, ptd);
this(vec3normal, ptd);Constructs the plane, from either four scalars of type pt or from
a3-dimensional vector (=normal) andascalar. -
Declaration
voidnormalize();Normalizes the plane inplace.
-
Declaration
const @property PlaneTnormalized();Returns a
normalizedcopy of the plane. -
Declaration
const ptdistance(vec3point);Returns the
distancefrom apointto the plane.Note: the plane must be normalized, the result can be negative.
-
Declaration
const ptndistance(vec3point);Returns the distance from a
pointto the plane.Note: the plane does not have to be normalized, the result can be negative.
-