#pragma once

#include "AbstractFace.h"
#include "Vector.h"

class Edge;

class TriFace : public AbstractFace
{
public:
    TriFace(Edge* edge0, Edge* edge1, Edge* edge2, std::size_t id=0);

    ~TriFace();

    static std::unique_ptr<TriFace> Create(Edge* edge0, Edge* edge1, Edge* edge2, std::size_t id=0);

    void associateWidthEdges() override;

    std::vector<std::size_t> getNodeIds() const override;

    std::size_t getNumNodes() const override;

    void replaceEdge(Edge* original, Edge* replacement) override;

    std::size_t getEdge0Id () const;
    std::size_t getEdge1Id () const;
    std::size_t getEdge2Id () const;
    std::vector<std::size_t> getEdgeIds() const override;

    std::vector<Point> getNodeLocations(Orientation orientation = Orientation::CCW) const override;

    Vector getNormal() const;

    AbstractFace::Orientation getOrientation() const;

private:
    Edge* mEdge0{nullptr};
    Edge* mEdge1{nullptr};
    Edge* mEdge2{nullptr};
};
