This include file defines two macros which can be used to create a Rubik's Cube (3x3x3) and a Rubik's Revenge (4x4x4):
WRC_RubiksCube("...")
WRC_RubiksRevenge("...")
The parameter is a string containing rotations (an empty string is ok).
Uses actual measures of the real Rubik's cubes:
<0, 0, 0>.
Rotation syntax:
U, F, L,
R, B, D) rotates the correspondent
outermost slice clockwise (U=upper, F=front, L=left, R=right,
B=back, D=down).
') immediately following the character
rotates the slice counter-clockwise.
2' immediately following the character
rotates the slice twice.
Examples:
WRC_RubiksCube("F2 D L2 D R U R L' B' D U' B' R' F2 R' U2")
WRC_RubiksRevenge("U L' F f L2 F2 D")
The last rotation can be made incomplete by declaring the following float identifier before calling the macros:
WRC_LastMoveRotationFactor
The value should be a factor between 0 and 1, where 0 means that the last rotation is not made at all, and 1 means that it's done as normal. Values between 0 and 1 will rotate it by that relative amount. (Note that in the parameter string there must not be any whitespace after the last rotation for this to work.)