public void VerifyMeshCoversWholeRegion(int heightmapSize, int regionSize) { float[,] heightMap = CreateHeightmap(heightmapSize); PrimToMesh mesher = new PrimToMesh(); DisplayableRenderable dr = mesher.MeshFromHeightMap(heightMap, regionSize, regionSize, _assetFetcher, _defaultTexture); RenderableMeshGroup rmg = dr as RenderableMeshGroup; Assert.IsTrue(rmg != null, "MeshFromHeightMap did not return a RenderableMeshGroup"); Assert.AreEqual(rmg.meshes.Count, 1, "MeshFromHeightMap returned more than one mesh"); }
public async void VerifyMeshCoversWholeRegion(int heightmapSize, int regionSize) { float[,] heightMap = CreateHeightmap(heightmapSize); PrimToMesh mesher = new PrimToMesh(_log, new BConverterOSParams() { addTerrainMesh = false, displayTimeScaling = false, doubleSided = false, logBuilding = false, }); DisplayableRenderable dr = await mesher.MeshFromHeightMap(heightMap, regionSize, regionSize, _assetManager, _defaultTexture); RenderableMeshGroup rmg = dr as RenderableMeshGroup; Assert.IsTrue(rmg != null, "MeshFromHeightMap did not return a RenderableMeshGroup"); Assert.AreEqual(rmg.meshes.Count, 1, "MeshFromHeightMap returned more than one mesh"); }