mirror of
https://github.com/jhasse/poly2tri.git
synced 2024-11-30 01:03:30 +01:00
created vector for nodes
This commit is contained in:
parent
1bdb0893cd
commit
4ca5a5c8ca
@ -172,6 +172,8 @@ Node& Sweep::NewFrontTriangle(SweepContext& tcx, Point& point, Node& node)
|
||||
tcx.AddToMap(triangle);
|
||||
|
||||
Node* new_node = new Node(point);
|
||||
nodes_.push_back(new_node);
|
||||
|
||||
new_node->next = node.next;
|
||||
new_node->prev = &node;
|
||||
node.next->prev = new_node;
|
||||
@ -629,8 +631,6 @@ void Sweep::FillRightConcaveEdgeEvent(SweepContext& tcx, Edge* edge, Node& node)
|
||||
}
|
||||
}
|
||||
|
||||
delete &node.next;
|
||||
|
||||
}
|
||||
|
||||
void Sweep::FillRightConvexEdgeEvent(SweepContext& tcx, Edge* edge, Node& node)
|
||||
@ -712,8 +712,6 @@ void Sweep::FillLeftConcaveEdgeEvent(SweepContext& tcx, Edge* edge, Node& node)
|
||||
}
|
||||
}
|
||||
|
||||
delete &node.prev;
|
||||
|
||||
}
|
||||
|
||||
void Sweep::FlipEdgeEvent(SweepContext& tcx, Point& ep, Point& eq, Triangle* t, Point& p)
|
||||
|
@ -39,6 +39,8 @@
|
||||
#ifndef SWEEP_H
|
||||
#define SWEEP_H
|
||||
|
||||
#include <vector>
|
||||
|
||||
namespace p2t {
|
||||
|
||||
class SweepContext;
|
||||
@ -113,6 +115,9 @@ Point& NextFlipPoint(Point& ep, Point& eq, Triangle& ot, Point& op);
|
||||
void FlipScanEdgeEvent(SweepContext& tcx, Point& ep, Point& eq, Triangle& flip_triangle, Triangle& t, Point& p);
|
||||
|
||||
void FinalizationPolygon(SweepContext& tcx);
|
||||
|
||||
std::vector<Node*> nodes_;
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user