Cubios::Scramble
Constructors
Scramble
Summary
Creates an object that is used to describe the topology of the virtual cube and manipulate it.
Arguments
Synopsis
Public Methods
StartScramble
Summary
This function is used to rotate a virtual cube a specified number of times
Arguments
- twistsCount - number of virtual rotations
Synopsis
VirtualTwist
Summary
The function is used to perform a single twist in a given direction relative to a specific screen
Arguments
- scr - index of a screen relative to which rotation occurs
- dir - twist direction
Synopsis
Virtual Methods
on_Twist
Summary
A callback function called after performing a virtual twist. This function works similar to the function Applicaiton::on_Twist(const Cubios::TOPOLOGY_twistInfo_t &twist)
Arguments
- Cubios::TOPOLOGY_twistInfo_t twist - twist information
Synopsis
on_BeforeTwist
Summary
A callback function called before executing a virtual twist. In the body of this function, for example, saving the state of the topology of the virtual cube prior to the rotation can be performed.
Synopsis
on_MappingChanged
Summary
A callback function called when mapping values change after performing a virtual twist. The function allows you to understand the movement of screens and modules in connection with the rotation of the virtual cube.
Arguments
- moduleTo, screenTo - Module and screen indices to which you need to assign the values of the
moduleFormandscreenFromindexes of the mapping saved before the rotation is made - moduleFrom, screenFrom - Module and screen indices of the original mapping saved before the rotation was made
Description
In fact, this callback is called every time something changes in the mapping after a virtual twist. Despite the apparent complexity, in essence everything is quite simple: all you need to do when calling this callback is to copy the mapping values from moduleFrom/screenFrom to moduleTo/screenTo
Synopsis