public static void CalculateFromMaptoGraphical(GeneralProgrammingStuff.Point2Int XYworld, GeneralProgrammingStuff.Point3Int XYZcube, ref float x, ref float y, ref float z)
        {
            x = XYworld.x * CubicalMemory.Chunk.Width + XYZcube.x;
            y = XYZcube.y;
            z = XYworld.z * CubicalMemory.Chunk.Length + XYZcube.z;

            x *= (CubicalMemory.Cube.rangeOfTheEdge);
            y *= (CubicalMemory.Cube.rangeOfTheEdge);
            z *= (CubicalMemory.Cube.rangeOfTheEdge);
        }
        public static List <List <List <CubicalMemory.Cube> > > TripleCubeIniter(int a, int b, int c, GeneralProgrammingStuff.Point2Int xz)
        {
            List <List <List <CubicalMemory.Cube> > > subject;

            subject = new List <List <List <CubicalMemory.Cube> > >();
            for (int i = 0; i < a; i++)
            {
                subject.Add(new List <List <CubicalMemory.Cube> >());
                for (int j = 0; j < b; j++)
                {
                    subject[i].Add(new List <CubicalMemory.Cube>());

                    for (int k = 0; k < c; k++)
                    {
                        subject[i][j].Add(new CubicalMemory.Cube(i, j, k, xz));
                    }
                }
            }
            return(subject);
        }
Exemple #3
0
 public Cube(int _x, int _y, int _z, GeneralProgrammingStuff.Point2Int _xz)
 {
     xyz.x = _x; xyz.y = _y; xyz.z = _z;
     xz    = _xz;
 }