#include "AbstractGrid.h"

AbstractGrid::AbstractGrid(const Bounds& bounds, std::size_t numPointsX, std::size_t numPointsY, std::size_t numPointsZ)
    :   mBounds(bounds),
        mNumX(numPointsX),
        mNumY(numPointsY),
        mNumZ(numPointsZ)
{

}

AbstractGrid::~AbstractGrid()
{

}

const Bounds& AbstractGrid::getBounds() const
{
    return mBounds;
}

double AbstractGrid::getXSpacing() const
{
    const auto width = mBounds.mMaxX - mBounds.mMinX;
    return width / double(mNumX);
}

double AbstractGrid::getYSpacing() const
{
    const auto height = mBounds.mMaxY - mBounds.mMinY;
    return height / double(mNumY);
}

void AbstractGrid::resetBounds(const Bounds& bounds)
{
    mBounds = bounds;
}
