Method Bitmask
Bitmask(bool[])
Creates a new shape from a boolean mask where truth values denote points inside the resulting shape.
[Version(2, 3, 0)]
public static IExplicitShape<int> Bitmask(bool[] mask)
Parameters
mask
bool[]A mask representing a shape that has points where the values are true. The mask starts at the point 0, and extends in the positive direction.
Returns
Examples
If the mask is {false, true, false, true}, the resulting shape will have the points 1 and 3.
Bitmask(int[])
The same as Bitmask(bool[]) but where true is replaced with 1 and false with 0.
[Version(2, 3, 0)]
public static IExplicitShape<int> Bitmask(int[] mask)
Parameters
mask
int[]
Returns
Examples
If the mask is {0, 1, 0, 1}, the resulting shape will have the points 1 and 3.
Bitmask(string)
The same as Bitmask(bool[]) but where a true is replaced with a '1' character and a false with a '0' character.
[Version(2, 3, 0)]
public static IExplicitShape<int> Bitmask(string mask)
Parameters
mask
string
Returns
Examples
If the mask is "0101", the resulting shape will have the points 1 and 3.
Bitmask(bool[][])
Creates a new shape from a boolean mask where truth values denote points inside the resulting shape.
[Version(2, 3, 0)]
public static IExplicitShape<GridPoint2> Bitmask(bool[][] mask)
Parameters
mask
bool[][]
Returns
Bitmask(int[][])
The same as Bitmask(bool[][]) but where true is replaced with 1 and false with 0.
[Version(2, 3, 0)]
public static IExplicitShape<GridPoint2> Bitmask(int[][] mask)
Parameters
mask
int[][]
Returns
Bitmask(string[])
The same as Bitmask(bool[][]) but where a true is replaced with a '1' character and a false with a '0' character.
[Version(2, 3, 0)]
public static IExplicitShape<GridPoint2> Bitmask(string[] mask)
Parameters
mask
string[]
Returns
Bitmask(bool[][][])
Creates a new shape from a boolean mask where truth values denote points inside the resulting shape.
[Version(2, 3, 0)]
public static IExplicitShape<GridPoint3> Bitmask(bool[][][] mask)
Parameters
mask
bool[][][]
Returns
Bitmask(int[][][])
The same as Bitmask(bool[][][]) but where true is replaced with 1 and false with 0.
[Version(2, 3, 0)]
public static IExplicitShape<GridPoint3> Bitmask(int[][][] mask)
Parameters
mask
int[][][]
Returns
Bitmask(string[][])
The same as Bitmask(bool[][][]) but where a true is replaced with a '1' character and a false with a '0' character.
[Version(2, 3, 0)]
public static IExplicitShape<GridPoint3> Bitmask(string[][] mask)
Parameters
mask
string[][]