Beispiel #1
0
        //---------------------------------------------------------------------------

        #endregion

        //---------------------------------------------------------------------------

        #region Private Member Functions

        //---------------------------------------------------------------------------

        private static bool IsFaceVisible(OpenCog.Map.OCMap map, Vector3i nearPos)
        {
            OCBlockData blockData = map.GetBlock(nearPos);

            if (blockData == null)
            {
                return(false);
            }
            OCBlock block = blockData.block;

            return(!(block is OCCubeBlock) || block.IsAlpha());
        }
Beispiel #2
0
 private static bool IsFaceVisible(OpenCog.Map.OCMap map, OpenCog.BlockSet.BaseBlockSet.OCCubeBlock.CubeFace face, Vector3i nearPos)
 {
     if (face == OpenCog.BlockSet.BaseBlockSet.OCCubeBlock.CubeFace.Bottom || face == OpenCog.BlockSet.BaseBlockSet.OCCubeBlock.CubeFace.Top)
     {
         OCBlock block = map.GetBlock(nearPos).block;
         if (block is OCCubeBlock && !block.IsAlpha())
         {
             return(false);
         }
         if (block is OCCactusBlock)
         {
             return(false);
         }
     }
     return(true);
 }
Beispiel #3
0
        //---------------------------------------------------------------------------

        #endregion

        //---------------------------------------------------------------------------

        #region Private Member Functions

        //---------------------------------------------------------------------------

        private static bool IsFaceVisible(OpenCog.Map.OCMap map, Vector3i nearPos)
        {
            OCBlock block = map.GetBlock(nearPos).block;

            return(!(block is OCCubeBlock) || block.IsAlpha());
        }