#pragma once

#include "GeometryNode.h"
#include "SceneInfo.h"

#include "Line.h"
#include "LineEndNode.h"

#include <vector>

class LineNode : public GeometryNode
{
public:
    LineNode(const Transform& transform, const std::vector<Point>& points);

    Type getType() override;

    void setStartEndStyle(LineEndNode::Style style);

    void setEndEndStyle(LineEndNode::Style style);

private:
    void createOrUpdateGeometry(SceneInfo* sceneInfo) override;

    double mStartEndSize{ 5.0 };
    double mEndEndSize{ 5.0 };

    LineEndNode::Style mStartEndStyle{ LineEndNode::Style::NONE };
    LineEndNode::Style mEndEndStyle{ LineEndNode::Style::NONE };

    std::vector<Point> mPoints;

    std::unique_ptr<LineEndNode> mStartNode;
    std::unique_ptr<LineEndNode> mEndNode;
};
