public void DrawMovingBlockSet(Camera camera, MovingBlockSet movingBlockSet)
 {
     if (m_vertices.Count <= 20000 && camera.ViewFrustum.Intersection(movingBlockSet.BoundingBox(extendToFillCells: false)))
     {
         GenerateGeometry(movingBlockSet);
         int      count = m_vertices.Count;
         ushort[] array = movingBlockSet.Indices.Array;
         _ = movingBlockSet.Indices.Count;
         Vector3         vector = movingBlockSet.Position + movingBlockSet.GeometryOffset;
         TerrainVertex[] array2 = movingBlockSet.Vertices.Array;
         int             count2 = movingBlockSet.Vertices.Count;
         for (int i = 0; i < count2; i++)
         {
             TerrainVertex item = array2[i];
             item.X += vector.X;
             item.Y += vector.Y;
             item.Z += vector.Z;
             m_vertices.Add(item);
         }
         for (int j = 0; j < movingBlockSet.Indices.Count; j++)
         {
             m_indices.Add((ushort)(array[j] + count));
         }
     }
 }
        public void MovingBlocksCollision(MovingBlockSet movingBlockSet)
        {
            BoundingBox boundingBox = movingBlockSet.BoundingBox(extendToFillCells: true);

            m_result.Clear();
            FindMovingBlocks(boundingBox, extendToFillCells: true, m_result);
            int num = 0;

            while (true)
            {
                if (num < m_result.Count)
                {
                    if (m_result.Array[num] != movingBlockSet)
                    {
                        break;
                    }
                    num++;
                    continue;
                }
                return;
            }
            movingBlockSet.Stop = true;
        }