ReferenceGroupPoint

Struct ReferenceGroupPoint 

Source
pub struct ReferenceGroupPoint(pub ReferenceGroupPoint);
Expand description

As per the basic ReferenceGroupPoint. Each LUT used is up to 576 bytes in length, and each operation is guaranteed to consist of a single look-up.

Tuple Fields§

§0: ReferenceGroupPoint

Implementations§

Source§

impl ReferenceGroupPoint

Source

pub const fn direction(self) -> Direction

Source

pub const fn beside(self) -> OppositeGroupPoint

Source

pub const fn opposite(self) -> OppositeGroupPoint

Source

pub const fn flip_sign_of_2(self) -> OppositeGroupPoint

Source

pub const fn opposite_then_beside(self) -> ReferenceGroupPoint

Source

pub const fn flip_2_and_3(self) -> ReferenceGroupPoint

Source

pub const fn one_right_angle_cw(self) -> ReferenceGroupPoint

Source

pub const fn one_right_angle_acw(self) -> ReferenceGroupPoint

Source

pub const fn n_right_angles_cw(self, angle: u8) -> Self

Source

pub const fn n_right_angles_acw(self, angle: u8) -> Self

Source

pub const fn div_prop(self, other: ReferenceGroupPoint) -> ProperRotation

Please refer to the function of the same name in the basic ReferenceGroupPoint.

Source

pub const fn div_improp(self, other: OppositeGroupPoint) -> ImproperRotation

Please refer to the function of the same name in the basic ReferenceGroupPoint.

Source

pub const fn mul_prop(self, other: ProperRotation) -> ReferenceGroupPoint

Please refer to the function of the same name in the basic ReferenceGroupPoint.

Source

pub const fn mul_improp(self, other: ImproperRotation) -> OppositeGroupPoint

Please refer to the function of the same name in the basic ReferenceGroupPoint.

Source

pub fn div_alt(self, x: Self) -> ProperRotation

An alternative implementation of division, that uses the same big LUT as multiplication does, but performs two look-ups instead of one.

Trait Implementations§

Source§

impl Clone for ReferenceGroupPoint

Source§

fn clone(&self) -> ReferenceGroupPoint

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for ReferenceGroupPoint

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Div<OppositeGroupPoint> for ReferenceGroupPoint

Extracts the improper rotation that must occur so that the divisorpoint ends up coinciding withself`, ie the dividend.

Source§

type Output = ImproperRotation

This operation needs an improper rotation.

Source§

fn div(self, x: OppositeGroupPoint) -> Self::Output

A look-up on a 2-D LUT produces the result directly.

Source§

impl Div<ReferenceGroupPoint> for OppositeGroupPoint

Extracts the improper rotation that must occur so that the divisorpoint ends up coinciding withself`, ie the dividend.

Source§

type Output = ImproperRotation

This operation needs an improper rotation.

Source§

fn div(self, x: ReferenceGroupPoint) -> Self::Output

A look-up on a 2-D LUT produces the result directly.

Source§

impl Div for ReferenceGroupPoint

Extracts the proper rotation that must occur so that the divisorpoint ends up coinciding withself`, ie the dividend.

Source§

type Output = ProperRotation

A proper rotation is enough for this operation.

Source§

fn div(self, x: Self) -> Self::Output

A look-up on a 2-D LUT produces the result directly.

Source§

impl From<ProperRotation> for ReferenceGroupPoint

Source§

fn from(x: ProperRotation) -> Self

Converts to this type from the input type.
Source§

impl From<ReferenceGroupPoint> for CratePt

Discards any knowledge of Geometric Group, producing a general crate::CubeSurfacePoint.

Source§

fn from(x: ReferenceGroupPoint) -> CratePt

Converts to this type from the input type.
Source§

impl From<ReferenceGroupPoint> for ProperRotation

Source§

fn from(corresponding_point: ReferenceGroupPoint) -> Self

Converts to this type from the input type.
Source§

impl Mul<ImproperRotation> for ReferenceGroupPoint

Rotates a copy of self according to an ImproperRotation. Switches Geometric Group.

Source§

type Output = OppositeGroupPoint

Output belongs to the other Geometric Group.

Source§

fn mul(self, x: ImproperRotation) -> Self::Output

The ImproperRotation is not examined bit-by-bit. Instead, a look-up on a 2-D LUT produces the result directly.

Source§

impl Mul<ProperRotation> for ReferenceGroupPoint

Rotates a copy of self according to a ProperRotation. Maintains Geometric Group.

Source§

type Output = ReferenceGroupPoint

Output belongs to the same Geometric Group.

Source§

fn mul(self, x: ProperRotation) -> Self::Output

The ProperRotation is not examined bit-by-bit. Instead, a look-up on a 2-D LUT produces the result directly.

Source§

impl Mul<ReferenceGroupPoint> for ImproperRotation

Source§

type Output = OppositeGroupPoint

Output belongs to the other Geometric Group.

Source§

fn mul(self, x: ReferenceGroupPoint) -> Self::Output

The ImproperRotation is not examined bit-by-bit. Instead, a look-up on a 2-D LUT produces the result directly.

Source§

impl Mul<ReferenceGroupPoint> for ProperRotation

Source§

type Output = ReferenceGroupPoint

Output belongs to the same Geometric Group.

Source§

fn mul(self, x: ReferenceGroupPoint) -> Self::Output

The ProperRotation is not examined bit-by-bit. Instead, a look-up on a 2-D LUT produces the result directly.

Source§

impl MulAssign<ProperRotation> for ReferenceGroupPoint

Rotates self according to a ProperRotation. Maintains Geometric Group.

Source§

fn mul_assign(&mut self, x: ProperRotation)

The data-type doesn’t change, so the result can be directly assigned.

The ProperRotation is not examined bit-by-bit. Instead, a look-up on a 2-D LUT produces the result directly.

Source§

impl OctahedrallySymmetricPoint for ReferenceGroupPoint

Source§

type OtherGroup = OppositeGroupPoint

The geometric group mirror to the one to which self belongs.
Source§

fn beside(self) -> Self::OtherGroup

Returns the other point found in the same edge of the same face of the cube.
Source§

fn opposite(self) -> Self::OtherGroup

Returns the point in the corresponding position of the opposite face of the cube.
Source§

fn opposite_then_beside(self) -> Self

Functionally identical to self.opposite().beside(). Also available with the words swapped, as the order doesn’t matter. Read more
Source§

fn one_right_angle_cw(self) -> Self

Returns the point which is positioned 90° clockwise from self, as viewed from the face on which both are located.
Source§

fn one_right_angle_acw(self) -> Self

Returns the point which is positioned 90° anti-clockwise from self, as viewed from the face on which both are located.
Source§

fn flip_sign_of_2(self) -> Self::OtherGroup

Flips the sign of the coördinate whose absolute value is 2.
Source§

fn flip_2_and_3(self) -> Self

Flips the sign of the coördinates whose absolute values are 2 and 3. Read more
Source§

fn direction(self) -> Direction

Returns the spatial direction towards which self is oriented.
Source§

fn n_right_angles_cw(self, angle: u8) -> Self

Returns the point which is positioned (n * 90)° clockwise from self, as viewed from the face on which both are located.
Source§

fn n_right_angles_acw(self, angle: u8) -> Self

Returns the point which is positioned (n * 90)° anti-clockwise from self, as viewed from the face on which both are located.
Source§

fn odd_ones(self) -> bool

Counts how many ones there are in the binary representation of a certain point, so it can be judged in which geometric group it belongs.
Source§

fn even_ones(self) -> bool

Equal to the negation of Self::odd_ones by definition.
Source§

fn n_right_angles<const CLOCKWISE: bool>(self, angle: u8) -> Self

Returns the point which is positioned (n * 90)° from self, as viewed from the face on which both are located.
Source§

fn beside_then_opposite(self) -> Self

Source§

fn flip_1_and_3(self) -> Self

Source§

fn flip_sign_of_1(self) -> Self::OtherGroup

Different name for CubeSurfacePoint::beside
Source§

fn flip_sign_of_3(self) -> Self::OtherGroup

Different name for CubeSurfacePoint::opposite
Source§

fn flip_1_and_2(self) -> Self

Flips the sign of the coördinates whose absolute values are 1 and 2. Read more
Source§

impl Ord for ReferenceGroupPoint

Source§

fn cmp(&self, other: &ReferenceGroupPoint) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · Source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · Source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · Source§

fn clamp(self, min: Self, max: Self) -> Self
where Self: Sized,

Restrict a value to a certain interval. Read more
Source§

impl PartialEq for ReferenceGroupPoint

Source§

fn eq(&self, other: &ReferenceGroupPoint) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl PartialOrd for ReferenceGroupPoint

Source§

fn partial_cmp(&self, other: &ReferenceGroupPoint) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · Source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · Source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · Source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · Source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl TryFrom<CubeSurfacePoint> for ReferenceGroupPoint

Source§

type Error = OppositeGroupPoint

If a certain CubeSurfacePoint does not belong to the ReferenceGroupPoints, it must by necessity belong to the OppositeGroupPoints.

Source§

fn try_from(x: CratePt) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl Copy for ReferenceGroupPoint

Source§

impl Eq for ReferenceGroupPoint

Source§

impl StructuralPartialEq for ReferenceGroupPoint

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.