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,49 @@
#pragma once
#include "MaterialNode.h"
class GeometryNode : public MaterialNode
{
public:
enum class Type
{
Path,
Rectangle,
Circle,
Arc,
Line,
Polyline
};
public:
GeometryNode(const Point& location);
virtual ~GeometryNode() = default;
virtual Type getType() = 0;
unsigned getStrokeThickness() const;
void setStrokeThickness(unsigned thickness);
protected:
unsigned mStrokeThickness{0};
Type mType;
bool mGeometryIsDirty{true};
};
class LineNode : public GeometryNode
{
public:
LineNode(const Point& location)
: GeometryNode(location)
{
}
Type getType()
{
return Type::Line;
}
};
using GeometryNodePtr = std::unique_ptr<GeometryNode>;