30 lines
716 B
C++
30 lines
716 B
C++
#pragma once
|
|
|
|
#include <memory>
|
|
#include <vector>
|
|
#include <unordered_map>
|
|
#include <string>
|
|
|
|
class Edge;
|
|
|
|
class TriFace
|
|
{
|
|
public:
|
|
TriFace(Edge* edge0, Edge* edge1, Edge* edge2, unsigned id=0);
|
|
~TriFace();
|
|
|
|
static std::unique_ptr<TriFace> Create(Edge* edge0, Edge* edge1, Edge* edge2, unsigned id=0);
|
|
|
|
std::vector<unsigned> getNodeIds() const;
|
|
|
|
void addVectorAttribute(const std::string& tag, const std::vector<double>& values);
|
|
|
|
std::vector<double> getVectorAttribute(const std::string& tag) const;
|
|
|
|
private:
|
|
unsigned mId{0};
|
|
std::unordered_map<std::string, std::vector<double> > mVectorAttributes;
|
|
Edge* mEdge0{nullptr};
|
|
Edge* mEdge1{nullptr};
|
|
Edge* mEdge2{nullptr};
|
|
};
|