static public VoxelChannel AND(VoxelChannel a, VoxelChannel b, ReplaceMode rep) { int x, y, z; for (z = 0; z < a.ZScale; z++) { for (y = 0; y < a.YScale; y++) { for (x = 0; x < a.XScale; x++) { bool As = a.IsSolid(x, y, z); bool Bs = b.IsSolid(x, y, z); if (As && Bs) { a.SetVoxel(x, y, z, b.GetVoxel(x, y, z)); } } } } return(a); }
static public VoxelChannel AND(VoxelChannel a,VoxelChannel b,ReplaceMode rep) { int x,y,z; for(z=0;z<a.ZScale;z++) { for(y=0;y<a.YScale;y++) { for(x=0;x<a.XScale;x++) { bool As=a.IsSolid(x,y,z); bool Bs=b.IsSolid(x,y,z); if(As && Bs) { a.SetVoxel(x,y,z,b.GetVoxel(x,y,z)); } } } } return a; }