29 lines
535 B
C++
29 lines
535 B
C++
#pragma once
|
|
|
|
#include "Rectangle.h"
|
|
#include <vector>
|
|
|
|
template<typename T>
|
|
class Grid
|
|
{
|
|
public:
|
|
Grid(const ntk::Rectangle& bounds);
|
|
|
|
const ntk::Rectangle& getBounds() const;
|
|
|
|
double getXSpacing() const;
|
|
|
|
double getYSpacing() const;
|
|
|
|
const std::vector<T>& getValues() const;
|
|
|
|
void resetBounds(const ntk::Rectangle& bounds);
|
|
|
|
void setValues(const std::vector<std::size_t>& indices, T value);
|
|
|
|
private:
|
|
ntk::Rectangle mBounds;
|
|
std::vector<T> mValues;
|
|
unsigned mNumX{5};
|
|
unsigned mNumY{5};
|
|
};
|