private void SetMatrix(Grid grid) { Matrix2d matrix = new Matrix2d(grid.Size.NumX, grid.Size.NumY, ""); List <Ray> rays = EnvimetUtility.GetRayFromFacegroup(grid, Geometry); var intersection = EnvimetUtility.Raycasting(rays, Geometry, false, false); SetMatrix(intersection, grid, matrix, Material.IDs[0]); IDmatrix = matrix; }
private void SetMatrix(Grid grid) { Matrix2d topMatrix = new Matrix2d(grid.Size.NumX, grid.Size.NumY, "0"); Matrix2d bottomMatrix = new Matrix2d(grid.Size.NumX, grid.Size.NumY, "0"); Matrix2d idMatrix = new Matrix2d(grid.Size.NumX, grid.Size.NumY, "0"); List <Ray> rays = EnvimetUtility.GetRayFromFacegroup(grid, Geometry); IEnumerable <Vector> intersectionTop = EnvimetUtility.Raycasting(rays, Geometry, true, false); IEnumerable <Vector> intersectionBottom = EnvimetUtility.Raycasting(rays, Geometry, false, false); SetMatrix(intersectionTop, grid, topMatrix, ""); SetMatrix(intersectionBottom, grid, bottomMatrix, ""); SetMatrix(intersectionTop, grid, idMatrix, ID.ToString()); TopMatrix = topMatrix; BottomMatrix = bottomMatrix; IDmatrix = idMatrix; }