Plane

group plane

In projective geometry, planes are the fundamental element through which all other entities are constructed. Lines are the meet of two planes, and points are the meet of three planes (equivalently, a line and a plane).

The plane multivector in PGA looks like \(d\mathbf{e}_0 + a\mathbf{e}_1 + b\mathbf{e}_2 + c\mathbf{e}_3\). Points that reside on the plane satisfy the familiar equation \(d + ax + by + cz = 0\).

Summary

Members Descriptions
public plane() = default
public plane(__m128 xmm) noexcept
public plane(float a,float b,float c,float d) noexcept The constructor performs the rearrangement so the plane can be specified in the familiar form: ax + by + cz + d
public explicit plane(float * data) noexcept Data should point to four floats with memory layout (d, a, b, c) where d occupies the lowest address in memory.
public void load(float * data) noexcept Unaligned load of data. The data argument should point to 4 floats corresponding to the (d, a, b, c) components of the plane multivector where d occupies the lowest address in memory.
public void normalize() noexcept Normalize this plane \(p\) such that \(p \cdot p = 1\).
public plane normalized() const noexcept Return a normalized copy of this plane.
public float norm() const noexcept Compute the plane norm, which is often used to compute distances between points and lines.
public void invert() noexcept
public plane inverse() const noexcept
public bool KLN_VEC_CALL operator==(plane other) const noexcept
public bool KLN_VEC_CALL approx_eq(plane other,float epsilon) const noexcept
public plane KLN_VEC_CALL operator()(plane const & p) const noexcept Reflect another plane \(p_2\) through this plane \(p_1\). The operation performed via this call operator is an optimized routine equivalent to the expression \(p_1 p_2 p_1\).
public line KLN_VEC_CALL operator()(line const & l) const noexcept Reflect line \(\ell\) through this plane \(p\). The operation performed via this call operator is an optimized routine equivalent to the expression \(p \ell p\).
public point KLN_VEC_CALL operator()(point const & p) const noexcept Reflect the point \(P\) through this plane \(p\). The operation performed via this call operator is an optimized routine equivalent to the expression \(p P p\).
public plane &KLN_VEC_CALL operator+=(plane b) noexcept Plane addition.
public plane &KLN_VEC_CALL operator-=(plane b) noexcept Plane subtraction.
public plane & operator*=(float s) noexcept Plane uniform scale.
public plane & operator*=(int s) noexcept Plane uniform scale.
public plane & operator/=(float s) noexcept Plane uniform inverse scale.
public plane & operator/=(int s) noexcept Plane uniform inverse scale.
public float x() const noexcept
public float e1() const noexcept
public float y() const noexcept
public float e2() const noexcept
public float z() const noexcept
public float e3() const noexcept
public float d() const noexcept
public float e0() const noexcept
public plane KLN_VEC_CALL operator+(plane a,plane b) noexcept Plane addition.
public plane KLN_VEC_CALL operator-(plane a,plane b) noexcept Plane subtraction.
public plane KLN_VEC_CALL operator*(plane p,float s) noexcept Plane uniform scale.
public plane KLN_VEC_CALL operator*(float s,plane p) noexcept Plane uniform scale.
public plane KLN_VEC_CALL operator*(plane p,int s) noexcept Plane uniform scale.
public plane KLN_VEC_CALL operator*(int s,plane p) noexcept Plane uniform scale.
public plane KLN_VEC_CALL operator/(plane p,float s) noexcept Plane uniform inverse scale.
public plane KLN_VEC_CALL operator/(plane p,int s) noexcept Plane uniform inverse scale.
public plane KLN_VEC_CALL operator-(plane p) noexcept Unary minus (leaves displacement from origin untouched, changing orientation only)

Members

plane() = default

plane(__m128 xmm) noexcept

plane(float a,float b,float c,float d) noexcept

The constructor performs the rearrangement so the plane can be specified in the familiar form: ax + by + cz + d

explicit plane(float * data) noexcept

Data should point to four floats with memory layout (d, a, b, c) where d occupies the lowest address in memory.

void load(float * data) noexcept

Unaligned load of data. The data argument should point to 4 floats corresponding to the (d, a, b, c) components of the plane multivector where d occupies the lowest address in memory.

Tip

This is a faster mechanism for setting data compared to setting components one at a time.

void normalize() noexcept

Normalize this plane \(p\) such that \(p \cdot p = 1\).

In order to compute the cosine of the angle between planes via the inner product operator | , the planes must be normalized. Producing a normalized rotor between two planes with the geometric product * also requires that the planes are normalized.

plane normalized() const noexcept

Return a normalized copy of this plane.

float norm() const noexcept

Compute the plane norm, which is often used to compute distances between points and lines.

Given a normalized point \(P\) and normalized line \(\ell\), the plane \(P\vee\ell\) containing both \(\ell\) and \(P\) will have a norm equivalent to the distance between \(P\) and \(\ell\).

void invert() noexcept

plane inverse() const noexcept

bool KLN_VEC_CALL operator==(plane other) const noexcept

bool KLN_VEC_CALL approx_eq(plane other,float epsilon) const noexcept

plane KLN_VEC_CALL operator()(plane const & p) const noexcept

Reflect another plane \(p_2\) through this plane \(p_1\). The operation performed via this call operator is an optimized routine equivalent to the expression \(p_1 p_2 p_1\).

line KLN_VEC_CALL operator()(line const & l) const noexcept

Reflect line \(\ell\) through this plane \(p\). The operation performed via this call operator is an optimized routine equivalent to the expression \(p \ell p\).

point KLN_VEC_CALL operator()(point const & p) const noexcept

Reflect the point \(P\) through this plane \(p\). The operation performed via this call operator is an optimized routine equivalent to the expression \(p P p\).

plane &KLN_VEC_CALL operator+=(plane b) noexcept

Plane addition.

plane &KLN_VEC_CALL operator-=(plane b) noexcept

Plane subtraction.

plane & operator*=(float s) noexcept

Plane uniform scale.

plane & operator*=(int s) noexcept

Plane uniform scale.

plane & operator/=(float s) noexcept

Plane uniform inverse scale.

plane & operator/=(int s) noexcept

Plane uniform inverse scale.

float x() const noexcept

float e1() const noexcept

float y() const noexcept

float e2() const noexcept

float z() const noexcept

float e3() const noexcept

float d() const noexcept

float e0() const noexcept

plane KLN_VEC_CALL operator+(plane a,plane b) noexcept

Plane addition.

plane KLN_VEC_CALL operator-(plane a,plane b) noexcept

Plane subtraction.

plane KLN_VEC_CALL operator*(plane p,float s) noexcept

Plane uniform scale.

plane KLN_VEC_CALL operator*(float s,plane p) noexcept

Plane uniform scale.

plane KLN_VEC_CALL operator*(plane p,int s) noexcept

Plane uniform scale.

plane KLN_VEC_CALL operator*(int s,plane p) noexcept

Plane uniform scale.

plane KLN_VEC_CALL operator/(plane p,float s) noexcept

Plane uniform inverse scale.

plane KLN_VEC_CALL operator/(plane p,int s) noexcept

Plane uniform inverse scale.

plane KLN_VEC_CALL operator-(plane p) noexcept

Unary minus (leaves displacement from origin untouched, changing orientation only)