Example #1
0
        protected override void Split()
        {
            if (this.splitDepth <= maxSplit)
            {
                if (children == null)
                {
                    LatLon leftMidpoint = LatLon.Average(BL, TL);
                    LatLon rightMidpoint = LatLon.Average(BR, TR);
                    LatLon topMidpoint = LatLon.Average(TL, TR);
                    LatLon bottomMidpoint = LatLon.Average(BL, BR);

                    HemisphereTerrainNode bl = new HemisphereTerrainNode(this, Quadrant.BL, BL, leftMidpoint, center, bottomMidpoint);
                    HemisphereTerrainNode tl = new HemisphereTerrainNode(this, Quadrant.TL, leftMidpoint, TL, topMidpoint, center);
                    HemisphereTerrainNode tr = new HemisphereTerrainNode(this, Quadrant.TR, center, topMidpoint, TR, rightMidpoint);
                    HemisphereTerrainNode br = new HemisphereTerrainNode(this, Quadrant.BR, bottomMidpoint, center, rightMidpoint, BR);
                    children = new HemisphereTerrainNode[4]
                    {
                        bl, tl, tr, br
                    };

                    bl.splitDepth = this.splitDepth + 1;
                    tl.splitDepth = this.splitDepth + 1;
                    tr.splitDepth = this.splitDepth + 1;
                    br.splitDepth = this.splitDepth + 1;
                }

                IsSplit = true;
            }
        }
Example #2
0
        protected override void Split()
        {
            if (this.splitDepth <= maxSplit)
            {
                if (children == null)
                {
                    LatLon leftMidpoint   = LatLon.Average(BL, TL);
                    LatLon rightMidpoint  = LatLon.Average(BR, TR);
                    LatLon topMidpoint    = LatLon.Average(TL, TR);
                    LatLon bottomMidpoint = LatLon.Average(BL, BR);

                    HemisphereTerrainNode bl = new HemisphereTerrainNode(this, Quadrant.BL, BL, leftMidpoint, center, bottomMidpoint);
                    HemisphereTerrainNode tl = new HemisphereTerrainNode(this, Quadrant.TL, leftMidpoint, TL, topMidpoint, center);
                    HemisphereTerrainNode tr = new HemisphereTerrainNode(this, Quadrant.TR, center, topMidpoint, TR, rightMidpoint);
                    HemisphereTerrainNode br = new HemisphereTerrainNode(this, Quadrant.BR, bottomMidpoint, center, rightMidpoint, BR);
                    children = new HemisphereTerrainNode[4]
                    {
                        bl, tl, tr, br
                    };

                    bl.splitDepth = this.splitDepth + 1;
                    tl.splitDepth = this.splitDepth + 1;
                    tr.splitDepth = this.splitDepth + 1;
                    br.splitDepth = this.splitDepth + 1;
                }

                IsSplit = true;
            }
        }
Example #3
0
        public PlanetComponent()
        {
            Initialize();

            rootNodes = new HemisphereTerrainNode[2];
            rootNodes[0] = new HemisphereTerrainNode(null, Quadrant.BL, new GIS.LatLon(-90.0, -180.0), new GIS.LatLon(90.0, 0.0));
            rootNodes[1] = new HemisphereTerrainNode(null, Quadrant.BL, new GIS.LatLon(-90.0, 0.0), new GIS.LatLon(90.0, 180.0));

            resources = new Dictionary<string, GraphicsResource>();
        }
Example #4
0
        public PlanetComponent()
        {
            Initialize();

            rootNodes    = new HemisphereTerrainNode[2];
            rootNodes[0] = new HemisphereTerrainNode(null, Quadrant.BL, new GIS.LatLon(-90.0, -180.0), new GIS.LatLon(90.0, 0.0));
            rootNodes[1] = new HemisphereTerrainNode(null, Quadrant.BL, new GIS.LatLon(-90.0, 0.0), new GIS.LatLon(90.0, 180.0));

            resources = new Dictionary <string, GraphicsResource>();
        }
Example #5
0
 public HemisphereTerrainNode(HemisphereTerrainNode parent, Quadrant quad, LatLon bl, LatLon tr)
     : base(parent, quad, bl, tr)
 {
 }
Example #6
0
 public HemisphereTerrainNode(HemisphereTerrainNode parent, Quadrant quad, LatLon bl, LatLon tr)
     : base(parent, quad, bl, tr)
 {
 }