Example #1
0
        public MarchingCubeNeighbour this[int i]
        {
            get
            {
                switch (i)
                {
                case 0:
                    return(rightNeighbourLod);

                case 1:
                    return(leftNeighbourLod);

                case 2:
                    return(upperNeighbourLod);

                case 3:
                    return(lowerNeighbourLod);

                case 4:
                    return(frontNeighbourLod);

                default:
                    return(backNeighbourLod);
                }
            }
            set
            {
                switch (i)
                {
                case 0:
                    rightNeighbourLod = value;
                    break;

                case 1:
                    leftNeighbourLod = value;
                    break;

                case 2:
                    upperNeighbourLod = value;
                    break;

                case 3:
                    lowerNeighbourLod = value;
                    break;

                case 4:
                    frontNeighbourLod = value;
                    break;

                default:
                    backNeighbourLod = value;
                    break;
                }
            }
        }
Example #2
0
 public MarchingCubeChunkNeighbourLODs(
     MarchingCubeNeighbour rightNeighbourLod, MarchingCubeNeighbour leftNeighbourLod,
     MarchingCubeNeighbour upperNeighbourLod, MarchingCubeNeighbour lowerNeighbourLod,
     MarchingCubeNeighbour frontNeighbourLod, MarchingCubeNeighbour backNeighbourLod)
 {
     this.rightNeighbourLod = rightNeighbourLod;
     this.leftNeighbourLod  = leftNeighbourLod;
     this.upperNeighbourLod = upperNeighbourLod;
     this.lowerNeighbourLod = lowerNeighbourLod;
     this.frontNeighbourLod = frontNeighbourLod;
     this.backNeighbourLod  = backNeighbourLod;
 }