コード例 #1
0
        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");
        }
コード例 #2
0
ファイル: ConvoarTests.cs プロジェクト: Misterblue/convoar
        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");
        }