36 lines
782 B
C++
36 lines
782 B
C++
#pragma once
|
|
|
|
#include "MaterialNode.h"
|
|
#include "Color.h"
|
|
|
|
class GridNode : public MaterialNode
|
|
{
|
|
|
|
public:
|
|
GridNode(const DiscretePoint& location);
|
|
|
|
void setNumX(unsigned numX);
|
|
|
|
void setNumY(unsigned numY);
|
|
|
|
void setData(const std::vector<Color>& colors);
|
|
|
|
SceneItem* getSceneItem(std::size_t idx) const override;
|
|
unsigned getNumSceneItems() const override;
|
|
|
|
void update(FontsManager* fontsManager) override;
|
|
|
|
void setWidth(unsigned width);
|
|
void setHeight(unsigned height);
|
|
|
|
private:
|
|
unsigned mNumberX{5};
|
|
unsigned mNumberY{5};
|
|
unsigned mWidth{1};
|
|
unsigned mHeight{1};
|
|
bool mDataDirty = true;
|
|
std::vector<Color> mData;
|
|
|
|
std::unique_ptr<SceneModel> mBackgroundModel;
|
|
std::unique_ptr<SceneModel> mOutlineModel;
|
|
};
|