#include <glib.h>
#include "livarot/sweep-event-queue.h"
#include "livarot/sweep-tree.h"
#include "livarot/sweep-event.h"
{
/* FIXME: use new[] for this, but this causes problems when delete[]
** calls the SweepEvent destructors.
*/
}
{
delete []inds;
}
SweepEvent *SweepEventQueue::add(SweepTree *iLeft, SweepTree *iRight, Geom::Point &px, double itl, double itr)
{
return NULL;
}
int const n = nbEvt++;
for (int i = 0; i < 2; i++) {
}
inds[n] = n;
int curInd = n;
while (curInd > 0) {
{
} else {
break;
}
}
return events + n;
}
bool SweepEventQueue::peek(SweepTree * &iLeft, SweepTree * &iRight, Geom::Point &px, double &itl, double &itr)
{
if (nbEvt <= 0) {
return false;
}
return true;
}
bool SweepEventQueue::extract(SweepTree * &iLeft, SweepTree * &iRight, Geom::Point &px, double &itl, double &itr)
{
if (nbEvt <= 0) {
return false;
}
remove(&e);
return true;
}
{
if (nbEvt <= 1) {
e->MakeDelete ();
nbEvt = 0;
return;
}
int const n = e->ind;
e->MakeDelete();
if (moveInd == n) {
return;
}
int curInd = n;
bool didClimb = false;
while (curInd > 0) {
{
didClimb = true;
} else {
break;
}
}
if (didClimb) {
return;
}
{
{
} else {
}
} else {
{
} else {
break;
}
}
} else {
{
}
break;
}
}
}
{
return; // j'y suis deja
}
}
/*
* a simple binary heap
* it only contains intersection events
* the regular benley-ottman stuffs the segment ends in it too, but that not needed here since theses points
* are already sorted. and the binary heap is much faster with only intersections...
* the code sample on which this code is based comes from purists.org
*/
{
}
SweepEvent::~SweepEvent()
{
MakeDelete();
}
void SweepEvent::MakeNew(SweepTree *iLeft, SweepTree *iRight, Geom::Point const &px, double itl, double itr)
{
ind = -1;
}
{
for (int i = 0; i < 2; i++) {
if (sweep[i]) {
}
}
}
/*
Local Variables:
mode:c++
c-file-style:"stroustrup"
c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
indent-tabs-mode:nil
fill-column:99
End:
*/
// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:fileencoding=utf-8:textwidth=99 :