index/sweepline/SweepLineEvent.h
/**********************************************************************
*
* GEOS - Geometry Engine Open Source
* http://geos.osgeo.org
*
* Copyright (C) 2006 Refractions Research Inc.
*
* This is free software; you can redistribute and/or modify it under
* the terms of the GNU Lesser General Public Licence as published
* by the Free Software Foundation.
* See the COPYING file for more information.
*
**********************************************************************/
#pragma once
#include <cstddef>
#include <geos/export.h>
// Forward declarations
namespace geos {
namespace index {
namespace sweepline {
class SweepLineInterval;
}
}
}
namespace geos {
namespace index { // geos.index
namespace sweepline { // geos:index:sweepline
class GEOS_DLL SweepLineEvent {
public:
enum {
INSERT_EVENT = 1,
DELETE_EVENT
};
SweepLineEvent(double x, SweepLineEvent* newInsertEvent,
SweepLineInterval* newSweepInt);
bool isInsert();
bool isDelete();
SweepLineEvent* getInsertEvent();
std::size_t getDeleteEventIndex();
void setDeleteEventIndex(std::size_t newDeleteEventIndex);
SweepLineInterval* getInterval();
int compareTo(const SweepLineEvent* pe) const;
//int compareTo(void *o) const;
private:
double xValue;
int eventType;
SweepLineEvent* insertEvent;
std::size_t deleteEventIndex;
SweepLineInterval* sweepInt;
};
// temp typedefs for backward compatibility
//typedef SweepLineEvent indexSweepLineEvent;
struct GEOS_DLL SweepLineEventLessThen {
bool operator()(const SweepLineEvent* first, const SweepLineEvent* second) const;
};
//bool isleLessThen(SweepLineEvent *first, SweepLineEvent *second);
} // namespace geos:index:sweepline
} // namespace geos:index
} // namespace geos
geos::index::sweepline
Contains classes which implement a sweepline algorithm for scanning geometric data structures.
Definition index/sweepline/SweepLineEvent.h:23
geos::index
Provides classes for various kinds of spatial indexes.
Definition CleanCoverage.h:39
geos
Basic namespace for all GEOS functionalities.
Definition geos.h:38