Clean up of scene nodes to support 2d and non int positioning.
This commit is contained in:
parent
1eeaebd0a9
commit
672b31b603
45 changed files with 341 additions and 200 deletions
|
@ -1,49 +0,0 @@
|
|||
#pragma once
|
||||
|
||||
#include "MaterialNode.h"
|
||||
|
||||
class GeometryNode : public MaterialNode
|
||||
{
|
||||
public:
|
||||
enum class Type
|
||||
{
|
||||
Path,
|
||||
Rectangle,
|
||||
Circle,
|
||||
Arc,
|
||||
Line,
|
||||
Polyline
|
||||
};
|
||||
|
||||
public:
|
||||
GeometryNode(const DiscretePoint& 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 DiscretePoint& location)
|
||||
: GeometryNode(location)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
Type getType()
|
||||
{
|
||||
return Type::Line;
|
||||
}
|
||||
};
|
||||
|
||||
using GeometryNodePtr = std::unique_ptr<GeometryNode>;
|
Loading…
Add table
Add a link
Reference in a new issue