Lines

group lines

Klein provides three line classes: "line", "branch", and "ideal_line". The line class represents a full six-coordinate bivector. The branch contains three non-degenerate components (aka, a line through the origin). The ideal line represents the line at infinity. When the line is created as a meet of two planes or join of two points (or carefully selected Plücker coordinates), it will be a Euclidean line (factorizable as the meet of two vectors).

Summary

Members Descriptions
public ideal_line() = default
public ideal_line(float a,float b,float c) noexcept
public ideal_line(__m128 xmm) noexcept
public float squared_ideal_norm() noexcept
public float ideal_norm() noexcept
public ideal_line &KLN_VEC_CALL operator+=(ideal_line b) noexcept Ideal line addition.
public ideal_line &KLN_VEC_CALL operator-=(ideal_line b) noexcept Ideal line subtraction.
public ideal_line & operator*=(float s) noexcept Ideal line uniform scale.
public ideal_line & operator*=(int s) noexcept Ideal line uniform scale.
public ideal_line & operator/=(float s) noexcept Ideal line uniform inverse scale.
public ideal_line & operator/=(int s) noexcept Ideal line uniform inverse scale.
public float e01() const noexcept
public float e10() const noexcept
public float e02() const noexcept
public float e20() const noexcept
public float e03() const noexcept
public float e30() const noexcept
public ideal_line KLN_VEC_CALL operator+(ideal_line a,ideal_line b) noexcept Ideal line addition.
public ideal_line KLN_VEC_CALL operator-(ideal_line a,ideal_line b) noexcept Ideal line subtraction.
public ideal_line KLN_VEC_CALL operator*(ideal_line l,float s) noexcept Ideal line uniform scale.
public ideal_line KLN_VEC_CALL operator*(ideal_line l,int s) noexcept Ideal line uniform scale.
public ideal_line KLN_VEC_CALL operator*(float s,ideal_line l) noexcept Ideal line uniform scale.
public ideal_line KLN_VEC_CALL operator*(int s,ideal_line l) noexcept Ideal line uniform scale.
public ideal_line KLN_VEC_CALL operator/(ideal_line l,float s) noexcept Ideal line uniform inverse scale.
public ideal_line KLN_VEC_CALL operator/(ideal_line l,int s) noexcept
public ideal_line KLN_VEC_CALL operator-(ideal_line l) noexcept Unary minus.
public ideal_line KLN_VEC_CALL operator~(ideal_line l) noexcept Reversion operator.
public branch() = default
public branch(float a,float b,float c) noexcept Construct the branch as the following multivector:
public branch(__m128 xmm) noexcept
public float squared_norm() noexcept If a line is constructed as the regressive product (join) of two points, the squared norm provided here is the squared distance between the two points (provided the points are normalized). Returns \(d^2 + e^2 + f^2\).
public float norm() noexcept Returns the square root of the quantity produced by squared_norm .
public void normalize() noexcept
public branch normalized() const noexcept
public void invert() noexcept
public branch inverse() const noexcept
public branch &KLN_VEC_CALL operator+=(branch b) noexcept Branch addition.
public branch &KLN_VEC_CALL operator-=(branch b) noexcept Branch subtraction.
public branch & operator*=(float s) noexcept Branch uniform scale.
public branch & operator*=(int s) noexcept Branch uniform scale.
public branch & operator/=(float s) noexcept Branch uniform inverse scale.
public branch & operator/=(int s) noexcept Branch uniform inverse scale.
public float e12() const noexcept
public float e21() const noexcept
public float z() const noexcept
public float e31() const noexcept
public float e13() const noexcept
public float y() const noexcept
public float e23() const noexcept
public float e32() const noexcept
public float x() const noexcept
public branch KLN_VEC_CALL operator+(branch a,branch b) noexcept Branch addition.
public branch KLN_VEC_CALL operator-(branch a,branch b) noexcept Branch subtraction.
public branch KLN_VEC_CALL operator*(branch b,float s) noexcept Branch uniform scale.
public branch KLN_VEC_CALL operator*(branch b,int s) noexcept Branch uniform scale.
public branch KLN_VEC_CALL operator*(float s,branch b) noexcept Branch uniform scale.
public branch KLN_VEC_CALL operator*(int s,branch b) noexcept Branch uniform scale.
public branch KLN_VEC_CALL operator/(branch b,float s) noexcept Branch uniform inverse scale.
public branch KLN_VEC_CALL operator/(branch b,int s) noexcept Branch uniform inverse scale.
public branch KLN_VEC_CALL operator-(branch b) noexcept Unary minus.
public branch KLN_VEC_CALL operator~(branch b) noexcept Reversion operator.
public line() = default
public line(float a,float b,float c,float d,float e,float f) noexcept A line is specifed by 6 coordinates which correspond to the line's Plücker coordinates. The coordinates specified in this way correspond to the following multivector:
public line(__m128 xmm1,__m128 xmm2) noexcept
public line(ideal_line other) noexcept
public line(branch other) noexcept
public float norm() noexcept Returns the square root of the quantity produced by squared_norm .
public float squared_norm() noexcept If a line is constructed as the regressive product (join) of two points, the squared norm provided here is the squared distance between the two points (provided the points are normalized). Returns \(d^2 + e^2 + f^2\).
public void normalize() noexcept Normalize a line such that \(\ell^2 = -1\).
public line normalized() const noexcept Return a normalized copy of this line.
public void invert() noexcept
public line inverse() const noexcept
public bool KLN_VEC_CALL operator==(line other) const noexcept Bitwise comparison.
public bool KLN_VEC_CALL approx_eq(line other,float epsilon) const noexcept
public line &KLN_VEC_CALL operator+=(line b) noexcept Line addition.
public line &KLN_VEC_CALL operator-=(line b) noexcept Line subtraction.
public line & operator*=(float s) noexcept Line uniform scale.
public line & operator*=(int s) noexcept Line uniform scale.
public line & operator/=(float s) noexcept Line uniform inverse scale.
public line & operator/=(int s) noexcept Line uniform inverse scale.
public float e12() const noexcept
public float e21() const noexcept
public float e31() const noexcept
public float e13() const noexcept
public float e23() const noexcept
public float e32() const noexcept
public float e01() const noexcept
public float e10() const noexcept
public float e02() const noexcept
public float e20() const noexcept
public float e03() const noexcept
public float e30() const noexcept
public line KLN_VEC_CALL operator+(line a,line b) noexcept Line addition.
public line KLN_VEC_CALL operator-(line a,line b) noexcept Line subtraction.
public line KLN_VEC_CALL operator*(line l,float s) noexcept Line uniform scale.
public line KLN_VEC_CALL operator*(line l,int s) noexcept Line uniform scale.
public line KLN_VEC_CALL operator*(float s,line l) noexcept Line uniform scale.
public line KLN_VEC_CALL operator*(int s,line l) noexcept Line uniform scale.
public line KLN_VEC_CALL operator/(line r,float s) noexcept Line uniform inverse scale.
public line KLN_VEC_CALL operator/(line r,int s) noexcept Line uniform inverse scale.
public line KLN_VEC_CALL operator-(line l) noexcept Unary minus.
public line KLN_VEC_CALL operator~(line l) noexcept Reversion operator.

Members

ideal_line() = default

ideal_line(float a,float b,float c) noexcept

ideal_line(__m128 xmm) noexcept

float squared_ideal_norm() noexcept

float ideal_norm() noexcept

ideal_line &KLN_VEC_CALL operator+=(ideal_line b) noexcept

Ideal line addition.

ideal_line &KLN_VEC_CALL operator-=(ideal_line b) noexcept

Ideal line subtraction.

ideal_line & operator*=(float s) noexcept

Ideal line uniform scale.

ideal_line & operator*=(int s) noexcept

Ideal line uniform scale.

ideal_line & operator/=(float s) noexcept

Ideal line uniform inverse scale.

ideal_line & operator/=(int s) noexcept

Ideal line uniform inverse scale.

float e01() const noexcept

float e10() const noexcept

float e02() const noexcept

float e20() const noexcept

float e03() const noexcept

float e30() const noexcept

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

Ideal line addition.

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

Ideal line subtraction.

ideal_line KLN_VEC_CALL operator*(ideal_line l,float s) noexcept

Ideal line uniform scale.

ideal_line KLN_VEC_CALL operator*(ideal_line l,int s) noexcept

Ideal line uniform scale.

ideal_line KLN_VEC_CALL operator*(float s,ideal_line l) noexcept

Ideal line uniform scale.

ideal_line KLN_VEC_CALL operator*(int s,ideal_line l) noexcept

Ideal line uniform scale.

ideal_line KLN_VEC_CALL operator/(ideal_line l,float s) noexcept

Ideal line uniform inverse scale.

ideal_line KLN_VEC_CALL operator/(ideal_line l,int s) noexcept

ideal_line KLN_VEC_CALL operator-(ideal_line l) noexcept

Unary minus.

ideal_line KLN_VEC_CALL operator~(ideal_line l) noexcept

Reversion operator.

branch() = default

branch(float a,float b,float c) noexcept

Construct the branch as the following multivector:

\[a \mathbf{e}_{23} + b\mathbf{e}_{31} + c\mathbf{e}_{23}\]

To convince yourself this is a line through the origin, remember that such a line can be generated using the geometric product of two planes through the origin.

branch(__m128 xmm) noexcept

float squared_norm() noexcept

If a line is constructed as the regressive product (join) of two points, the squared norm provided here is the squared distance between the two points (provided the points are normalized). Returns \(d^2 + e^2 + f^2\).

float norm() noexcept

Returns the square root of the quantity produced by squared_norm .

void normalize() noexcept

branch normalized() const noexcept

void invert() noexcept

branch inverse() const noexcept

branch &KLN_VEC_CALL operator+=(branch b) noexcept

Branch addition.

branch &KLN_VEC_CALL operator-=(branch b) noexcept

Branch subtraction.

branch & operator*=(float s) noexcept

Branch uniform scale.

branch & operator*=(int s) noexcept

Branch uniform scale.

branch & operator/=(float s) noexcept

Branch uniform inverse scale.

branch & operator/=(int s) noexcept

Branch uniform inverse scale.

float e12() const noexcept

float e21() const noexcept

float z() const noexcept

float e31() const noexcept

float e13() const noexcept

float y() const noexcept

float e23() const noexcept

float e32() const noexcept

float x() const noexcept

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

Branch addition.

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

Branch subtraction.

branch KLN_VEC_CALL operator*(branch b,float s) noexcept

Branch uniform scale.

branch KLN_VEC_CALL operator*(branch b,int s) noexcept

Branch uniform scale.

branch KLN_VEC_CALL operator*(float s,branch b) noexcept

Branch uniform scale.

branch KLN_VEC_CALL operator*(int s,branch b) noexcept

Branch uniform scale.

branch KLN_VEC_CALL operator/(branch b,float s) noexcept

Branch uniform inverse scale.

branch KLN_VEC_CALL operator/(branch b,int s) noexcept

Branch uniform inverse scale.

branch KLN_VEC_CALL operator-(branch b) noexcept

Unary minus.

branch KLN_VEC_CALL operator~(branch b) noexcept

Reversion operator.

line() = default

line(float a,float b,float c,float d,float e,float f) noexcept

A line is specifed by 6 coordinates which correspond to the line's Plücker coordinates. The coordinates specified in this way correspond to the following multivector:

\[a\mathbf{e}_{01} + b\mathbf{e}_{02} + c\mathbf{e}_{03} +\ d\mathbf{e}_{23} + e\mathbf{e}_{31} + f\mathbf{e}_{12}\]

line(__m128 xmm1,__m128 xmm2) noexcept

line(ideal_line other) noexcept

line(branch other) noexcept

float norm() noexcept

Returns the square root of the quantity produced by squared_norm .

float squared_norm() noexcept

If a line is constructed as the regressive product (join) of two points, the squared norm provided here is the squared distance between the two points (provided the points are normalized). Returns \(d^2 + e^2 + f^2\).

void normalize() noexcept

Normalize a line such that \(\ell^2 = -1\).

line normalized() const noexcept

Return a normalized copy of this line.

void invert() noexcept

line inverse() const noexcept

bool KLN_VEC_CALL operator==(line other) const noexcept

Bitwise comparison.

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

line &KLN_VEC_CALL operator+=(line b) noexcept

Line addition.

line &KLN_VEC_CALL operator-=(line b) noexcept

Line subtraction.

line & operator*=(float s) noexcept

Line uniform scale.

line & operator*=(int s) noexcept

Line uniform scale.

line & operator/=(float s) noexcept

Line uniform inverse scale.

line & operator/=(int s) noexcept

Line uniform inverse scale.

float e12() const noexcept

float e21() const noexcept

float e31() const noexcept

float e13() const noexcept

float e23() const noexcept

float e32() const noexcept

float e01() const noexcept

float e10() const noexcept

float e02() const noexcept

float e20() const noexcept

float e03() const noexcept

float e30() const noexcept

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

Line addition.

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

Line subtraction.

line KLN_VEC_CALL operator*(line l,float s) noexcept

Line uniform scale.

line KLN_VEC_CALL operator*(line l,int s) noexcept

Line uniform scale.

line KLN_VEC_CALL operator*(float s,line l) noexcept

Line uniform scale.

line KLN_VEC_CALL operator*(int s,line l) noexcept

Line uniform scale.

line KLN_VEC_CALL operator/(line r,float s) noexcept

Line uniform inverse scale.

line KLN_VEC_CALL operator/(line r,int s) noexcept

Line uniform inverse scale.

line KLN_VEC_CALL operator-(line l) noexcept

Unary minus.

line KLN_VEC_CALL operator~(line l) noexcept

Reversion operator.