public void Test2MaterialsUnion()
        {
            var mat1 = new DCVoxelMaterial()
            {
                Texture = DCFiles.UVCheckerMap10_512
            };
            var mat2 = new DCVoxelMaterial()
            {
                Texture = DCFiles.UVCheckerMap11_512
            };

            var mesh1 =
                new DensityFunctionHermiteGrid(
                    v => DensityHermiteGridTest.SphereDensityFunction(v, 2, new Vector3(2)), new Point3(20, 20, 20),
                    v => mat1);

            var mesh2 =
                new DensityFunctionHermiteGrid(
                    v => DensityHermiteGridTest.SphereDensityFunction(v, 2, new Vector3(2)), new Point3(10, 10, 10),
                    v => mat2);

            var grid = new UnionGrid(mesh1, mesh2, new Point3(1, 1, 1));



            surfaceRenderer.CreateSurface(grid, Matrix.Translation(0, 0, 0));
        }
Beispiel #2
0
 private void tryPlaceObject()
 {
     if (!TW.Graphics.Mouse.LeftMouseJustPressed)
     {
         return;
     }
     Grid = new UnionGrid(grid, HermiteDataGrid.FromIntersectableGeometry(10, 20, Matrix.Translation(RaycastedPoint), PlaceableObjectGrid));
     Grid = HermiteDataGrid.CopyGrid(grid);
 }