40 Node &operator=(
const Node &) =
delete;
70 Face &operator=(
const Face &) =
delete;
102 static_assert(N > 2u,
"Not enough nodes to make a cycle!");
103 for (
auto i = 2u; i < Cycle.size(); ++i) {
104 AddNode(Cycle[i], Nodes.back());
106 ConnectNodes(Nodes.front(), Nodes.back());
158 return HalfEdges.size();
214 check(halfEdge.
Source !=
nullptr);
220 check(halfEdge.
Source !=
nullptr);
226 check(halfEdge.
Target !=
nullptr);
232 check(halfEdge.
Target !=
nullptr);
238 check(halfEdge.
Pair !=
nullptr);
239 return *halfEdge.
Pair;
242 static const HalfEdge &
GetPair(
const HalfEdge &halfEdge)
244 check(halfEdge.
Pair !=
nullptr);
245 return *halfEdge.
Pair;
250 check(halfEdge.
Face !=
nullptr);
251 return *halfEdge.
Face;
256 check(halfEdge.
Face !=
nullptr);
257 return *halfEdge.
Face;
288 check(halfEdge.
Next !=
nullptr);
289 return *halfEdge.
Next;
294 check(halfEdge.
Next !=
nullptr);
295 return *halfEdge.
Next;
300 return GetNextInFace(GetPair(halfEdge));
305 return GetNextInFace(GetPair(halfEdge));
316 static float GetAngle(
const HalfEdge &halfEdge);
318 #ifdef CARLA_ROAD_GENERATOR_EXTRA_LOG 319 void PrintToLog()
const;
320 #endif // CARLA_ROAD_GENERATOR_EXTRA_LOG static Face & GetFace(HalfEdge &halfEdge)
typename FaceContainer::iterator FaceIterator
static HalfEdge & GetHalfEdge(Face &face)
Node(const Position &Pos)
size_t CountNodes() const
static const Node & GetSource(const HalfEdge &halfEdge)
std::list< Node > NodeContainer
typename NodeContainer::const_iterator ConstNodeIterator
DoublyConnectedEdgeList(const std::array< Position, N > &Cycle)
Create a DoublyConnectedEdgeList consisting of a cycle of N nodes.
Simple doubly-connected edge list structure.
ListView< NodeIterator > GetNodes()
static Node & GetSource(HalfEdge &halfEdge)
ListView< ConstHalfEdgeIterator > GetHalfEdges() const
static HalfEdge & GetPair(HalfEdge &halfEdge)
typename FaceContainer::const_iterator ConstFaceIterator
DoublyConnectedEdgeList::Position Position
std::list< Face > FaceContainer
HalfEdgeContainer HalfEdges
std::list< HalfEdge > HalfEdgeContainer
ListView< HalfEdgeIterator > GetHalfEdges()
static const HalfEdge & GetLeavingHalfEdge(const Node &node)
typename HalfEdgeContainer::const_iterator ConstHalfEdgeIterator
const DoublyConnectedEdgeList::Position & GetPosition() const
static const Face & GetFace(const HalfEdge &halfEdge)
static const HalfEdge & GetHalfEdge(const Face &face)
static HalfEdge & GetLeavingHalfEdge(Node &node)
friend DoublyConnectedEdgeList
ListView< ConstFaceIterator > GetFaces() const
size_t CountFaces() const
HalfEdge * LeavingHalfEdge
static HalfEdge & GetNextInFace(HalfEdge &halfEdge)
size_t CountHalfEdges() const
static const HalfEdge & GetPair(const HalfEdge &halfEdge)
static Node & GetTarget(HalfEdge &halfEdge)
static const Node & GetTarget(const HalfEdge &halfEdge)
static HalfEdge & GetNextInNode(HalfEdge &halfEdge)
typename NodeContainer::iterator NodeIterator
ListView< ConstNodeIterator > GetNodes() const
static const HalfEdge & GetNextInNode(const HalfEdge &halfEdge)
ListView< FaceIterator > GetFaces()
friend DoublyConnectedEdgeList
typename HalfEdgeContainer::iterator HalfEdgeIterator
friend DoublyConnectedEdgeList
static const HalfEdge & GetNextInFace(const HalfEdge &halfEdge)