pub struct Branch(_);
Expand description
The Branch
both a line through the origin and also the principal branch of
the logarithm of a rotor.
The rotor branch will be most commonly constructed by taking the logarithm of a normalized rotor. The branch may then be linearily scaled to adjust the “strength” of the rotor, and subsequently re-exponentiated to create the adjusted rotor.
Implementations§
source§impl Branch
impl Branch
sourcepub const fn new(a: f32, b: f32, c: f32) -> Branch
pub const fn new(a: f32, b: f32, c: f32) -> Branch
Construct the branch as the following multivector:
$$a \mathbf{e}{23} + b\mathbf{e}{31} + c\mathbf{e}_{12}$$
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.
sourcepub fn squared_norm(self) -> f32
pub fn squared_norm(self) -> f32
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$.
pub fn normalized(self) -> Branch
pub fn inverse(self) -> Branch
pub fn sqrt(self) -> Rotor
pub fn e12(&self) -> f32
pub fn e21(&self) -> f32
pub fn z(&self) -> f32
pub fn e31(&self) -> f32
pub fn e13(&self) -> f32
pub fn y(&self) -> f32
pub fn e23(&self) -> f32
pub fn e32(&self) -> f32
pub fn x(&self) -> f32
Trait Implementations§
source§impl AddAssign<Branch> for Branch
impl AddAssign<Branch> for Branch
source§fn add_assign(&mut self, b: Self)
fn add_assign(&mut self, b: Self)
+=
operation. Read moresource§impl DivAssign<f32> for Branch
impl DivAssign<f32> for Branch
source§fn div_assign(&mut self, s: f32)
fn div_assign(&mut self, s: f32)
/=
operation. Read moresource§impl MulAssign<f32> for Branch
impl MulAssign<f32> for Branch
source§fn mul_assign(&mut self, s: f32)
fn mul_assign(&mut self, s: f32)
*=
operation. Read moresource§impl PartialEq<Branch> for Branch
impl PartialEq<Branch> for Branch
source§impl SubAssign<Branch> for Branch
impl SubAssign<Branch> for Branch
source§fn sub_assign(&mut self, b: Self)
fn sub_assign(&mut self, b: Self)
-=
operation. Read more