public Matrix3(int ox, int oy, int oz, int sx, int sy, int sz, T[] array = null) { this.cube = new CoordCube(ox, oy, oz, sx, sy, sz); count = cube.size.x * cube.size.y * cube.size.z; if (array != null && array.Length < count) { Debug.LogError("Array length: " + array.Length + " is lower then matrix capacity: " + count); } if (array != null && array.Length >= count) { this.array = array; } else { this.array = new T[count]; } }
public Matrix3(CoordDir offset, CoordDir size, T[] array = null) { cube = new CoordCube(offset, size); count = cube.size.x * cube.size.y * cube.size.z; if (array != null && array.Length < count) { Debug.LogError("Array length: " + array.Length + " is lower then matrix capacity: " + count); } if (array != null && array.Length >= count) { this.array = array; } else { this.array = new T[count]; } }