Class ExplicitShape
Class for creating and manipulating explicit shapes.
public static class ExplicitShape
- Inheritance
-
ExplicitShape
- Inherited Members
Methods
- Bitmask(bool[])
Creates a new shape from a boolean mask where truth values denote points inside the resulting shape.
- Bitmask(bool[][])
Creates a new shape from a boolean mask where truth values denote points inside the resulting shape.
- Bitmask(bool[][][])
Creates a new shape from a boolean mask where truth values denote points inside the resulting shape.
- Bitmask(int[])
The same as Bitmask(bool[]) but where true is replaced with 1 and false with 0.
- Bitmask(int[][])
The same as Bitmask(bool[][]) but where true is replaced with 1 and false with 0.
- Bitmask(int[][][])
The same as Bitmask(bool[][][]) but where true is replaced with 1 and false with 0.
- Bitmask(string)
The same as Bitmask(bool[]) but where a true is replaced with a '1' character and a false with a '0' character.
- Bitmask(string[])
The same as Bitmask(bool[][]) but where a true is replaced with a '1' character and a false with a '0' character.
- Bitmask(string[][])
The same as Bitmask(bool[][][]) but where a true is replaced with a '1' character and a false with a '0' character.
- CenterOnOrigin(IExplicitShape<GridPoint2>)
Gets a copy of the given shape translated so that the center of the shape (or the point closest to the center) falls on the origin.
- CenterOnOrigin(IExplicitShape<GridPoint3>)
Gets a copy of the given shape translated so that the center of the shape (or the point closest to the center) falls on the origin.
- CenterOnOrigin(IExplicitShape<int>)
Gets a copy of the given shape translated so that the center of the shape (or the point closest to the center) falls on the origin.
- Create(IEnumerable<GridPoint2>)
Creates a new shape that contains all the points in the given list.
- Create(IEnumerable<GridPoint3>)
Creates a new shape that contains all the points in the given list.
- Create(IEnumerable<int>)
Creates a new shape that contains all the points in the given list.
- Empty1()
Returns a new empty 1D shape.
- Empty2()
Returns a new empty 2D shape.
- Empty3()
Returns a new empty 3D shape.
- GetBounds(IEnumerable<GridPoint2>)
Gets the bounds of the given points.
- GetBounds(IEnumerable<GridPoint3>)
Gets the bounds of the given points.
- GetBounds(IEnumerable<int>)
Gets the bounds of the given points.
- Layer(IExplicitShape<GridPoint2>, int)
Makes a new 3D shape by stacking copies of a 2D along the z-axis.
- Parallelepiped(GridPoint3)
Makes a new axis aligned parallelepiped shape.
- Parallelogram(GridPoint2)
Creates a new axis-aligned parallelogram shape.
- ReflectXInBounds(IExplicitShape<GridPoint2>)
Returns a new shape with X reflected, but translated to keep it the same bounds as the original.
- ReflectXInBounds(IExplicitShape<GridPoint3>)
Returns a new shape with X reflected, but translated to keep it the same bounds as the original.
- ReflectXInBounds(IExplicitShape<int>)
Returns a new shape with X reflected, but translated to keep it the same bounds as the original.
- ReflectYInBounds(IExplicitShape<GridPoint2>)
Returns a new shape with Y reflected, but translated to keep it the same bounds as the original.
- ReflectYInBounds(IExplicitShape<GridPoint3>)
Returns a new shape with Y reflected, but translated to keep it the same bounds as the original.
- ReflectZInBounds(IExplicitShape<GridPoint3>)
Returns a new shape with Z reflected, but translated to keep it the same bounds as the original.
- Segment(int)
Makes a new shape that is a contiguous interval of the given size, starting at 0 and continuing in the positive direction.
- Select(IExplicitShape<GridPoint2>, Func<GridPoint2, bool>)
Returns a new shape that only contains points in this shape that satisfies the predicate.
- Select(IExplicitShape<GridPoint3>, Func<GridPoint3, bool>)
Returns a new shape that only contains points in this shape that satisfies the predicate.
- Select(IExplicitShape<int>, Func<int, bool>)
Returns a new shape that only contains points in this shape that satisfies the predicate.
- Single1()
Makes a new shape that contains the origin as its only point.
- Single2()
Makes a new shape that contains the origin as its only point.
- Single3()
Makes a new shape that contains the origin as its only point.
- SwapToXZY(IExplicitShape<GridPoint3>)
Constructs a new 2D shape from a given shape with the coordinates changed to the order XZY.
- SwapToYXZ(IExplicitShape<GridPoint3>)
Constructs a new 2D shape from a given shape with the coordinates changed to the order YXZ.
- SwapToYZX(IExplicitShape<GridPoint3>)
Constructs a new 2D shape from a given shape with the coordinates changed to the order YZX.
- SwapToZXY(IExplicitShape<GridPoint3>)
Constructs a new 2D shape from a given shape with the coordinates changed to the order ZXY.
- SwapToZYX(IExplicitShape<GridPoint3>)
Constructs a new 2D shape from a given shape with the coordinates changed to the order ZYX.
- SwapXY(IExplicitShape<GridPoint2>)
Constructs a new 2D shape from a given shape with the X and Y coordinates swapped.
- ToExplicit(IImplicitShape<GridPoint2>, AbstractBounds<GridPoint2>)
Creates a new explicit shape from the implicit shape that falls inside the bounds.
- ToExplicit(IImplicitShape<GridPoint3>, AbstractBounds<GridPoint3>)
Creates a new explicit shape from the implicit shape that falls inside the bounds.
- ToExplicit(IImplicitShape<int>, AbstractBounds<int>)
Creates a new explicit shape from the implicit shape that falls inside the bounds.
- Translate(IExplicitShape<GridPoint2>, GridPoint2)
Returns a translated copy of the given shape.
- Translate(IExplicitShape<GridPoint3>, GridPoint3)
Returns a translated copy of the given shape.
- Translate(IExplicitShape<int>, int)
Returns a translated copy of the given shape.
- Where(IExplicitShape<GridPoint2>, Func<GridPoint2, bool>)
Returns a new shape that only contains points in this shape that satisfies the predicate.
- Where(IExplicitShape<GridPoint3>, Func<GridPoint3, bool>)
Returns a new shape that only contains points in this shape that satisfies the predicate.
- Where(IExplicitShape<int>, Func<int, bool>)
Returns a new shape that only contains points in this shape that satisfies the predicate.