Esempio n. 1
0
        public void MakeMove(TMove move)
        {
            Select(move);
            var group = new TObject3D();
            var angle = (move.Angle + 1) * 90;

            if (move.Axis == 0)
            {
                group.RotateX(angle);
            }
            else if (move.Axis == 1)
            {
                group.RotateY(angle);
            }
            else
            {
                group.RotateZ(angle);
            }

            for (int i = 0; i < Selection.Count; i++)
            {
                var cubic = Selection[i];
                cubic.MultMatrix(group.Transform);
                Cubiks[cubic.Z, cubic.Y, cubic.X] = cubic;
                cubic.UpdateState();
            }
        }
Esempio n. 2
0
 public void Group()
 {
     Wall = new TObject3D();
     for (int i = 0; i < Selection.Count; i++)
     {
         Selection[i].Parent = Wall;
     }
     Wall.Parent = this;
 }