OppositeGroupPoint

Enum OppositeGroupPoint 

Source
#[repr(u8)]
pub enum OppositeGroupPoint {
Show 24 variants PosOnePosTwoNegThree = 1, PosOneNegTwoPosThree = 2, NegOnePosTwoPosThree = 4, NegOneNegTwoNegThree = 7, PosThreePosTwoPosOne = 8, PosThreeNegTwoNegOne = 11, NegThreePosTwoNegOne = 13, NegThreeNegTwoPosOne = 14, PosOnePosThreePosTwo = 16, PosOneNegThreeNegTwo = 19, NegOnePosThreeNegTwo = 21, NegOneNegThreePosTwo = 22, PosThreePosOneNegTwo = 25, PosThreeNegOnePosTwo = 26, NegThreePosOnePosTwo = 28, NegThreeNegOneNegTwo = 31, PosTwoPosOnePosThree = 32, PosTwoNegOneNegThree = 35, NegTwoPosOneNegThree = 37, NegTwoNegOnePosThree = 38, PosTwoPosThreeNegOne = 41, PosTwoNegThreePosOne = 42, NegTwoPosThreePosOne = 44, NegTwoNegThreeNegOne = 47,
}
Expand description

The set of CubeSurfacePoints that can be made to coincide with the Reference Point using just one improper rotation.

Not coincidentally, their binary representations all have an odd number of ones.

Variants§

§

PosOnePosTwoNegThree = 1

The point [1, 2, -3]. Divided by the Reference Point, it yields a reflection through the z = 0 plane. Its arithmetic representation is equal to 20, thus it is the zeroth Elementary Reflection.

§

PosOneNegTwoPosThree = 2

The point [1, -2, 3]. Divided by the Reference Point, it yields a reflection through the y = 0 plane. Its arithmetic representation is equal to 21, thus it is the first Elementary Reflection.

§

NegOnePosTwoPosThree = 4

The point [-1, 2, 3]. Divided by the Reference Point, it yields a reflection through the x = 0 plane. Its arithmetic representation is equal to 22, thus it is the second Elementary Reflection.

§

NegOneNegTwoNegThree = 7

The point [-1, -2, -3]. Divided by the Reference Point, it yields a complete central inversion, ie a negation of all coördinates.

§

PosThreePosTwoPosOne = 8

The point [3, 2, 1]. Divided by the Reference Point, it yields a reflection through the x = z plane. Its arithmetic representation is equal to 23, thus it is the third Elementary Reflection.

§

PosThreeNegTwoNegOne = 11

The point [3, -2, -1]. Divided by the Reference Point, it yields a rotoreflection of 90° with respect to the y axis.

§

NegThreePosTwoNegOne = 13

The point [-3, 2, -1]. Divided by the Reference Point, it yields a reflection through the z = -x plane.

§

NegThreeNegTwoPosOne = 14

The point [-3, -2, 1]. Divided by the Reference Point, it yields a rotoreflection of -90° with respect to the y axis.

§

PosOnePosThreePosTwo = 16

The point [1, 3, 2]. Divided by the Reference Point, it yields a reflection through the z = y plane. Its arithmetic representation is equal to 24, thus it is the fourth Elementary Reflection.

§

PosOneNegThreeNegTwo = 19

The point [1, -3, -2]. Divided by the Reference Point, it yields a reflection through the y = -z plane.

§

NegOnePosThreeNegTwo = 21

The point [-1, 3, -2]. Divided by the Reference Point, it yields a rotoreflection of -90° with respect to the x = y = z axis.

§

NegOneNegThreePosTwo = 22

The point [-1, -3, 2]. Divided by the Reference Point, it yields a rotoreflection of 90° with respect to the x axis.

§

PosThreePosOneNegTwo = 25

The point [3, 1, -2]. Divided by the Reference Point, it yields a rotoreflection of -60° with respect to the x = -y = -z axis.

§

PosThreeNegOnePosTwo = 26

The point [3, -1, 2]. Divided by the Reference Point, it yields a rotoreflection of 60° with respect to the x = y = -z axis.

§

NegThreePosOnePosTwo = 28

The point [-3, 1, 2]. Divided by the Reference Point, it yields a rotoreflection of 60° with respect to the x = -y = z axis.

§

NegThreeNegOneNegTwo = 31

The point [-3, -1, -2]. Divided by the Reference Point, it yields a rotoreflection of -60° with respect to the x = y = z axis.

§

PosTwoPosOnePosThree = 32

The point [2, 1, 3]. Divided by the Reference Point, it yields a reflection through the y = x plane. Its arithmetic representation is equal to 25, thus it is the fifth and final Elementary Reflection.

§

PosTwoNegOneNegThree = 35

The point [2, -1, -3]. Divided by the Reference Point, it yields a reflection through the x = -y plane.

§

NegTwoPosOneNegThree = 37

The point [-2, 1, -3]. Divided by the Reference Point, it yields a rotoreflection of 90° with respect to the z axis.

§

NegTwoNegOnePosThree = 38

The point [-2, -1, 3]. Divided by the Reference Point, it yields a rotoreflection of -90° with respect to the z axis.

§

PosTwoPosThreeNegOne = 41

The point [2, 3, -1]. Divided by the Reference Point, it yields a rotoreflection of -60° with respect to the x = -y = z axis.

§

PosTwoNegThreePosOne = 42

The point [2, -3, 1]. Divided by the Reference Point, it yields a rotoreflection of 60° with respect to the x = -y = -z axis.

§

NegTwoPosThreePosOne = 44

The point [-2, 3, 1]. Divided by the Reference Point, it yields a rotoreflection of -60° with respect to the x = y = -z axis.

§

NegTwoNegThreeNegOne = 47

The point [-2, -3, -1]. Divided by the Reference Point, it yields a rotoreflection of 60° with respect to the x = y = z axis.

Implementations§

Source§

impl OppositeGroupPoint

Source

pub const fn downcast(self) -> CubeSurfacePoint

Down-casts one OppositeGroupPoint to a CubeSurfacePoint.

Source

pub const fn beside(self) -> ReferenceGroupPoint

Source

pub const fn opposite(self) -> ReferenceGroupPoint

Source

pub const fn opposite_then_beside(self) -> Self

Source

pub const fn one_right_angle_cw(self) -> Self

Source

pub const fn one_right_angle_acw(self) -> Self

Source

pub const fn flip_sign_of_2(self) -> ReferenceGroupPoint

Source

pub const fn flip_2_and_3(self) -> Self

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 mul_prop(self, other: ProperRotation) -> OppositeGroupPoint

Multiplies one OppositeGroupPoint with one ProperRotation, producing one OppositeGroupPoint as a result. Useful for static confirmation of Geometric Groups.

Source

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

Multiplies one OppositeGroupPoint with one ImproperRotation, producing one ReferenceGroupPoint as a result. Useful for static confirmation of Geometric Groups.

Source

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

Divides one OppositeGroupPoint by one OppositeGroupPoint, producing one ProperRotation as a result. Useful for static confirmation of Geometric Group.

Source

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

Divides one OppositeGroupPoint by one ReferenceGroupPoint, producing one ImproperRotation as a result. Useful for static confirmation of Geometric Group.

Source

pub const fn direction(self) -> Direction

Trait Implementations§

Source§

impl Clone for OppositeGroupPoint

Source§

fn clone(&self) -> OppositeGroupPoint

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 OppositeGroupPoint

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 divisor point ends up coinciding with self, ie the dividend.

Source§

type Output = ImproperRotation

This operation needs an improper rotation.

Source§

fn div(self, other: OppositeGroupPoint) -> ImproperRotation

Divides one Self by one OppositeGroupPoint, producing one ImproperRotation as a result. Useful for static confirmation of Geometric Group.

Source§

impl Div<ReferenceGroupPoint> for OppositeGroupPoint

Extracts the improper rotation that must occur so that the divisor point ends up coinciding with self, ie the dividend.

Source§

type Output = ImproperRotation

This operation needs an improper rotation.

Source§

fn div(self, other: ReferenceGroupPoint) -> ImproperRotation

Divides one Self by one ReferenceGroupPoint, producing one ImproperRotation as a result. Useful for static confirmation of Geometric Group.

Source§

impl Div for OppositeGroupPoint

Extracts the proper rotation that must occur so that the divisor point ends up coinciding with self, ie the dividend.

Source§

type Output = ProperRotation

A proper rotation is enough for this operation.

Source§

fn div(self, other: Self) -> ProperRotation

Divides one Self by one Self, producing one ProperRotation as a result. Useful for static confirmation of Geometric Group.

Source§

impl From<ImproperRotation> for OppositeGroupPoint

Source§

fn from(x: ImproperRotation) -> Self

Converts to this type from the input type.
Source§

impl From<OppositeGroupPoint> for CubeSurfacePoint

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

Source§

fn from(x: OppositeGroupPoint) -> Self

Converts to this type from the input type.
Source§

impl From<OppositeGroupPoint> for ImproperRotation

Source§

fn from(corresponding_point: OppositeGroupPoint) -> Self

Converts to this type from the input type.
Source§

impl Mul<ImproperRotation> for OppositeGroupPoint

Rotates a copy of self in a way that switches its Geometric Group.

Source§

type Output = ReferenceGroupPoint

Output belongs to the other Geometric Group.

Source§

fn mul(self, other: ImproperRotation) -> ReferenceGroupPoint

Multiplies one OppositeGroupPoint with one ImproperRotation, producing one ReferenceGroupPoint as a result. Useful for static confirmation of Geometric Groups.

Source§

impl Mul<OppositeGroupPoint> for ImproperRotation

Rotates a copy the argument in a way that switches its Geometric Group.

Source§

type Output = ReferenceGroupPoint

Output belongs to the other Geometric Group.

Source§

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

Performs the * operation. Read more
Source§

impl Mul<OppositeGroupPoint> for ProperRotation

Rotates a copy the argument in a way that maintains its Geometric Group.

Source§

type Output = OppositeGroupPoint

Same Geometric Group, so same data-type.

Source§

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

Performs the * operation. Read more
Source§

impl Mul<ProperRotation> for OppositeGroupPoint

Rotates a copy of self in a way that maintains its Geometric Group.

Source§

type Output = OppositeGroupPoint

Same Geometric Group, so same data-type.

Source§

fn mul(self, other: ProperRotation) -> OppositeGroupPoint

Multiplies one OppositeGroupPoint with one ProperRotation, producing one OppositeGroupPoint as a result. Useful for static confirmation of Geometric Groups.

Source§

impl MulAssign<ProperRotation> for OppositeGroupPoint

Rotates self in a way that maintains its Geometric Group.

Source§

fn mul_assign(&mut self, x: ProperRotation)

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

Source§

impl OctahedrallySymmetricPoint for OppositeGroupPoint

Source§

fn beside(self) -> Self::OtherGroup

Source§

fn opposite(self) -> Self::OtherGroup

Source§

fn flip_sign_of_2(self) -> Self::OtherGroup

Source§

fn opposite_then_beside(self) -> Self

Source§

fn flip_2_and_3(self) -> Self

Source§

fn one_right_angle_cw(self) -> Self

Source§

fn one_right_angle_acw(self) -> Self

Source§

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

Source§

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

Source§

type OtherGroup = ReferenceGroupPoint

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

fn direction(self) -> Direction

Returns the spatial direction towards which self is oriented.
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 OppositeGroupPoint

Source§

fn cmp(&self, other: &OppositeGroupPoint) -> 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 OppositeGroupPoint

Source§

fn eq(&self, other: &OppositeGroupPoint) -> 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 OppositeGroupPoint

Source§

fn partial_cmp(&self, other: &OppositeGroupPoint) -> 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 OppositeGroupPoint

Source§

type Error = ReferenceGroupPoint

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

Source§

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

Performs the conversion.
Source§

impl Copy for OppositeGroupPoint

Source§

impl Eq for OppositeGroupPoint

Source§

impl StructuralPartialEq for OppositeGroupPoint

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.