Beispiel #1
0
	/// <summary>
	/// Initializes a new instance of the <see cref="ISSCBGrid"/> class with specific size.
	/// </summary>
	/// <param name="size">Size.</param>
	public ISSCBGrid (ISSCBlockVector size)
	{
		if (!(size.x > 0))
			size.x = 1;
		if (!(size.y > 0))
			size.y = 1;
		if (!(size.z > 0))
			size.z = 1;

		gridSize = size;

		blocks = new int[gridSize.Length ()];
	}
Beispiel #2
0
	public ISSCBGrid (ISSCBGridDescriber describer)
	{
		if (!(describer.size.x > 0))
			describer.size.x = 1;
		if (!(describer.size.y > 0))
			describer.size.y = 1;
		if (!(describer.size.z > 0))
			describer.size.z = 1;

		gridSize = describer.size;
		
		blocks = new int[gridSize.Length ()];
		SetBlock (GetCenterBlock (), describer.centerBlock);
	}
Beispiel #3
0
    /// <summary>
    /// Initializes a new instance of the <see cref="ISSCBGrid"/> class with specific size.
    /// </summary>
    /// <param name="size">Size.</param>
    public ISSCBGrid(ISSCBlockVector size)
    {
        if (!(size.x > 0))
        {
            size.x = 1;
        }
        if (!(size.y > 0))
        {
            size.y = 1;
        }
        if (!(size.z > 0))
        {
            size.z = 1;
        }

        gridSize = size;

        blocks = new int[gridSize.Length()];
    }
Beispiel #4
0
    public ISSCBGrid(ISSCBGridDescriber describer)
    {
        if (!(describer.size.x > 0))
        {
            describer.size.x = 1;
        }
        if (!(describer.size.y > 0))
        {
            describer.size.y = 1;
        }
        if (!(describer.size.z > 0))
        {
            describer.size.z = 1;
        }

        gridSize = describer.size;

        blocks = new int[gridSize.Length()];
        SetBlock(GetCenterBlock(), describer.centerBlock);
    }