private void HandleSplit(SgtDynamicPlanetChunk chunk)
        {
            var cubeH  = chunk.CubeH * 0.5;
            var cubeV  = chunk.CubeV * 0.5;
            var coordM = chunk.CoordM * 0.5;
            var coordH = new double2(coordM, 0.0);
            var coordV = new double2(0.0, coordM);

            chunk.Split       = true;
            chunk.Children[0] = SgtDynamicPlanetChunk.Create(chunk, chunk.Cube, cubeH, cubeV, chunk.Coord, coordM);
            chunk.Children[1] = SgtDynamicPlanetChunk.Create(chunk, chunk.Cube + cubeH, cubeH, cubeV, chunk.Coord + coordH, coordM);
            chunk.Children[2] = SgtDynamicPlanetChunk.Create(chunk, chunk.Cube + cubeV, cubeH, cubeV, chunk.Coord + coordV, coordM);
            chunk.Children[3] = SgtDynamicPlanetChunk.Create(chunk, chunk.Cube + cubeH + cubeV, cubeH, cubeV, chunk.Coord + coordH + coordV, coordM);

            Hide(chunk);

            for (var c = 0; c < 4; c++)
            {
                var child = chunk.Children[c];

                Generate(child);

                Show(child);
            }

            if (OnSplitChunk != null)
            {
                OnSplitChunk.Invoke(chunk);
            }
        }
        private SgtDynamicPlanetChunk BuildRootChunk(float3 cube, float3 cubeH, float3 cubeV)
        {
            var rotation = quaternion.Euler(math.atan(1.0f / math.sqrt(2.0f)), 0.0f, 0.785398f);

            cube  = math.mul(rotation, cube);
            cubeH = math.mul(rotation, cubeH);
            cubeV = math.mul(rotation, cubeV);

            return(SgtDynamicPlanetChunk.Create(null, cube, cubeH, cubeV, new double2(0.0, 0.0), 1.0));
        }