Struct Cube::RotationAxis

Nested Relationships

This struct is a nested type of Class Cube.

Struct Documentation

struct inexor::vulkan_renderer::world::Cube::RotationAxis

IDs of the children and edges which will be swapped to receive the rotation. To achieve a 90 degree rotation the 0th index have to be swapped with the 1st and the 1st with the 2nd, etc.

Public Types

using ChildType = std::array<std::array<std::size_t, 4>, 2>
using EdgeType = std::array<std::array<std::size_t, 4>, 3>
using Type = std::pair<ChildType, EdgeType>

Public Static Attributes

static constexpr Type X = {{{{0, 1, 3, 2}, {4, 5, 7, 6}}}, {{{2, 4, 11, 1}, {5, 7, 8, 10}, {0, 9, 6, 3}}}}

IDs of the children / edges which will be swapped to receive the rotation around X axis.

static constexpr Type Y = {{{{0, 4, 5, 1}, {2, 6, 7, 3}}}, {{{0, 5, 9, 2}, {3, 8, 6, 11}, {1, 10, 7, 4}}}}

IDs of the children / edges which will be swapped to receive the rotation around Y axis.

static constexpr Type Z = {{{{0, 2, 6, 4}, {1, 3, 7, 5}}}, {{{1, 3, 10, 0}, {4, 6, 7, 9}, {2, 11, 8, 5}}}}

IDs of the children / edges which will be swapped to receive the rotation around Z axis.