public Rectangle3D GetBounds() { return (new Rectangle3D( new Point3D( Blocks.AsParallel().Min(o => o.X), Blocks.AsParallel().Min(o => o.Y), Blocks.AsParallel().Min(o => o.Z)), new Point3D( Blocks.AsParallel().Max(o => o.X), Blocks.AsParallel().Max(o => o.Y), Blocks.AsParallel().Max(o => o.Z + o.H)))); }
public bool Intersects(int x, int y, int z, int h) { return(Blocks.AsParallel().Any(b => b.Intersects(x, y, z, h))); }
public bool Intersects(IWireframe frame) { return(frame != null && Blocks.AsParallel().Any(b => frame.Intersects(b))); }
public IEnumerable <Block3D> Offset(int x = 0, int y = 0, int z = 0, int h = 0) { return(Blocks.AsParallel().Select(b => new Block3D(b.X + x, b.Y + y, b.Z + z, b.H + h))); }