Ejemplo n.º 1
0
        public static bool IsCollidingWithVoxelMap(MyMwcVoxelFilesEnum voxelFileEnum, Vector3 voxelPosition)
        {
            MyVoxelFile voxelFile    = MyVoxelFiles.Get(voxelFileEnum);
            Vector3     sizeInMeters = MyVoxelMap.GetVoxelSizeInMetres(ref voxelFile.SizeInVoxels);

            BoundingBox newBoundingBox       = MyUtils.GetNewBoundingBox(voxelPosition, sizeInMeters);
            MyVoxelMap  intersectingVoxelMap = MyVoxelMaps.GetVoxelMapWhoseBoundingBoxIntersectsBox(ref newBoundingBox, null);

            if (intersectingVoxelMap != null)
            {
                return(true);
            }
            return(false);
        }
Ejemplo n.º 2
0
 static void Add(MyMwcVoxelFilesEnum voxelFileEnum, MyMwcVector3Int sizeInVoxels, string filename)
 {
     DefaultVoxelFiles[(int)voxelFileEnum] = new MyVoxelFile(voxelFileEnum, sizeInVoxels, filename);
 }
Ejemplo n.º 3
0
 static void Add(MyMwcVoxelFilesEnum voxelFileEnum, MyMwcVector3Int sizeInVoxels, string filename)
 {
     DefaultVoxelFiles[(int)voxelFileEnum] = new MyVoxelFile(voxelFileEnum, sizeInVoxels, filename);
 }