#pragma once

#include "AbstractVisualNode.h"

#include "Wire.h"

class LineNode;

class WireNode : public AbstractVisualNode
{
public:
	WireNode(const Transform& transform);

	void setContent(Wire* wire);

	void setInputLocation(const Point& point);

	void setOutputLocation(const Point& point);

	void update(SceneInfo* sceneInfo);
private:
	void createOrUpdateGeometry(SceneInfo* sceneInfo);
	Wire* mContent{ nullptr };
	bool mContentDirty{ true };

	Point mInputLocation;
	Point mOutputLocation;

	std::unique_ptr<LineNode> mLine;
};