Clean up of scene nodes to support 2d and non int positioning.

This commit is contained in:
jmsgrogan 2023-01-11 10:21:18 +00:00
parent 1eeaebd0a9
commit 672b31b603
45 changed files with 341 additions and 200 deletions

View file

@ -0,0 +1,36 @@
#pragma once
#include "MaterialNode.h"
#include "Color.h"
class GridNode : public MaterialNode
{
public:
GridNode(const Point& location);
void setNumX(unsigned numX);
void setNumY(unsigned numY);
void setData(const std::vector<Color>& colors);
SceneItem* getSceneItem(std::size_t idx) const override;
std::size_t getNumSceneItems() const override;
void update(SceneInfo* sceneInfo) override;
void setWidth(double width);
void setHeight(double height);
private:
unsigned mNumberX{5};
unsigned mNumberY{5};
double mWidth{1};
double mHeight{1};
bool mDataDirty = true;
std::vector<Color> mData;
std::unique_ptr<SceneModel> mBackgroundModel;
std::unique_ptr<SceneModel> mOutlineModel;
};