mirror of
https://github.com/jhasse/poly2tri.git
synced 2024-11-16 02:32:25 +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);
|
tcx.AddToMap(triangle);
|
||||||
|
|
||||||
Node* new_node = new Node(point);
|
Node* new_node = new Node(point);
|
||||||
|
nodes_.push_back(new_node);
|
||||||
|
|
||||||
new_node->next = node.next;
|
new_node->next = node.next;
|
||||||
new_node->prev = &node;
|
new_node->prev = &node;
|
||||||
node.next->prev = new_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)
|
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)
|
void Sweep::FlipEdgeEvent(SweepContext& tcx, Point& ep, Point& eq, Triangle* t, Point& p)
|
||||||
|
@ -39,6 +39,8 @@
|
|||||||
#ifndef SWEEP_H
|
#ifndef SWEEP_H
|
||||||
#define SWEEP_H
|
#define SWEEP_H
|
||||||
|
|
||||||
|
#include <vector>
|
||||||
|
|
||||||
namespace p2t {
|
namespace p2t {
|
||||||
|
|
||||||
class SweepContext;
|
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 FlipScanEdgeEvent(SweepContext& tcx, Point& ep, Point& eq, Triangle& flip_triangle, Triangle& t, Point& p);
|
||||||
|
|
||||||
void FinalizationPolygon(SweepContext& tcx);
|
void FinalizationPolygon(SweepContext& tcx);
|
||||||
|
|
||||||
|
std::vector<Node*> nodes_;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user