+namespace {
+
+const glm::mat4 block_transforms[Block::DIR_COUNT * Block::ROT_COUNT] = {
+ glm::mat4(1.0f),
+ glm::eulerAngleY(PI_0p5),
+ glm::eulerAngleY(PI),
+ glm::eulerAngleY(PI_1p5),
+ glm::eulerAngleX(PI),
+ glm::eulerAngleYX(PI_0p5, PI),
+ glm::eulerAngleYX(PI, PI),
+ glm::eulerAngleYX(PI_1p5, PI),
+ glm::eulerAngleZ(PI_0p5),
+ glm::eulerAngleYZ(PI_0p5, PI_0p5),
+ glm::eulerAngleYZ(PI, PI_0p5),
+ glm::eulerAngleYZ(PI_1p5, PI_0p5),
+ glm::eulerAngleZ(PI_1p5),
+ glm::eulerAngleYZ(PI_0p5, PI_1p5),
+ glm::eulerAngleYZ(PI, PI_1p5),
+ glm::eulerAngleYZ(PI_1p5, PI_1p5),
+ glm::eulerAngleX(PI_0p5),
+ glm::eulerAngleYX(PI_0p5, PI_0p5),
+ glm::eulerAngleYX(PI, PI_0p5),
+ glm::eulerAngleYX(PI_1p5, PI_0p5),
+ glm::eulerAngleX(PI_1p5),
+ glm::eulerAngleYX(PI_0p5, PI_1p5),
+ glm::eulerAngleYX(PI, PI_1p5),
+ glm::eulerAngleYX(PI_1p5, PI_1p5),
+};
+
+}
+
+const glm::mat4 &Block::Transform() const {
+ return block_transforms[orient];
+}
+
+