//Methods//
        public void Build(IModule sourceModule)
        {
            Model.Cylinder cylinderModel = new Model.Cylinder(sourceModule);

            double angleExtent = UpperAngleBound - LowerAngleBound;
            double heightExtent = UpperHeightBound - LowerHeightBound;
            double xDelta = angleExtent / (double)Map.Width;
            double yDelta = heightExtent / (double)Map.Height;
            double curAngle = LowerAngleBound;
            double curHeight = LowerHeightBound;

            for (int y = 0; y < Map.Height; y++) {
                curAngle = LowerAngleBound;
                for (int x = 0; x < Map.Width; x++) {
                    float curValue = (float)cylinderModel.GetValue(curAngle, curHeight);
                    Map.SetValue(x, y, curValue);
                    curAngle += xDelta;
                }
                curHeight += yDelta;
            }
        }
Exemple #2
0
        //Methods//
        public void Build(IModule sourceModule)
        {
            Model.Cylinder cylinderModel = new Model.Cylinder(sourceModule);
            double         angleExtent   = UpperAngleBound - LowerAngleBound;
            double         heightExtent  = UpperHeightBound - LowerHeightBound;
            double         xDelta        = angleExtent / (double)Map.Width;
            double         yDelta        = heightExtent / (double)Map.Height;
            double         curAngle      = LowerAngleBound;
            double         curHeight     = LowerHeightBound;

            for (int y = 0; y < Map.Height; y++)
            {
                curAngle = LowerAngleBound;

                for (int x = 0; x < Map.Width; x++)
                {
                    float curValue = (float)cylinderModel.GetValue(curAngle, curHeight);
                    Map.SetValue(x, y, curValue);
                    curAngle += xDelta;
                }

                curHeight += yDelta;
            }
        }