#pragma once

#include "MaterialNode.h"
#include "Vector.h"

class GeometryNode;

class LineEndNode : public MaterialNode
{
public:
    enum class Style
    {
        NONE,
        CIRCLE,
        CLOSED_ARROW,
        OPEN_ARROW,
        CURVED_ARROW
    };

    LineEndNode(const Transform& t = {});

    void setStyle(LineEndNode::Style style);

    void setSize(double size);

    void update(SceneInfo* sceneInfo) override;

private:
    void createOrUpdateGeometry(SceneInfo* sceneInfo);

    std::unique_ptr<GeometryNode> mContentNode;

    Vector mDirection;

    bool mContentDirty{ true };
    double mSize{ 5.0 };
    Style mStyle{ Style::NONE };
};