/// <summary>
        /// Gets all active planes of the specified type(s).
        /// </summary>
        /// <param name="planeTypes">A flag which includes all plane type(s) that should be returned.</param>
        /// <returns>A collection of planes that match the expected type(s).</returns>
        public List <GameObject> GetActivePlanes(PlaneTypes planeTypes)
        {
            List <GameObject> typePlanes = new List <GameObject>();

            foreach (GameObject plane in ActivePlanes)
            {
                SurfacePlane surfacePlane = plane.GetComponent <SurfacePlane>();

                if (surfacePlane != null)
                {
                    if ((planeTypes & surfacePlane.PlaneType) == surfacePlane.PlaneType)
                    {
                        typePlanes.Add(plane);
                    }
                }
            }

            return(typePlanes);
        }
 /// <summary>
 /// Sets visibility of planes based on their type.
 /// </summary>
 /// <param name="surfacePlane"></param>
 private void SetPlaneVisibility(SurfacePlane surfacePlane)
 {
     surfacePlane.IsVisible = ((drawPlanesMask & surfacePlane.PlaneType) == surfacePlane.PlaneType);
 }