Logo Search packages:      
Sourcecode: inkscape version File versions

SweepEventQueue Class Reference

#include <sweep-event-queue.h>

List of all members.


Detailed Description

The structure to hold the intersections events encountered during the sweep. It's an array of SweepEvent (not allocated with "new SweepEvent[n]" but with a malloc). There's a list of indices because it's a binary heap: inds[i] tell that events[inds[i]] has position i in the heap. Each SweepEvent has a field to store its index in the heap, too.

Definition at line 18 of file sweep-event-queue.h.


Public Member Functions

SweepEventadd (SweepTree *iLeft, SweepTree *iRight, Geom::Point &iPt, double itl, double itr)
 Add one intersection in the binary heap.
bool extract (SweepTree *&iLeft, SweepTree *&iRight, Geom::Point &oPt, double &itl, double &itr)
 Extract the topmost intersection from the heap.
bool peek (SweepTree *&iLeft, SweepTree *&iRight, Geom::Point &oPt, double &itl, double &itr)
 Look for the topmost intersection in the heap.
void relocate (SweepEvent *e, int to)
void remove (SweepEvent *e)
int size () const
 SweepEventQueue (int s)

Private Attributes

SweepEventevents
 Sweep events.
int * inds
 Indices.
int maxEvt
 Allocated size of the heap.
int nbEvt
 Number of events currently in the heap.

The documentation for this class was generated from the following files:

Generated by  Doxygen 1.6.0   Back to index