LineSweep | 273
Computational
Geometry
segment in the left subtree and rightmost segment in the right subtree. The
ordering of segments within the tree is made based upon the sweep point, the
currentEventPoint being processed from the priority queue.
Solution
The solution described in Example 9-3 depends upon theEventPoint,EventQueue,
andLineState classes depicted in Figures 9-16 and 9-17.
Figure 9-16. EventPoint class
Algorithms in a Nutshell
Algorithms in a Nutshell By Gary Pollice, George T. Heineman, Stanley Selkow ISBN:
9780596516246 Publisher: O'Reilly Media, Inc.
Prepared for Ming Yi, Safari ID: [email protected]
Licensed by Ming Yi
Print Publication Date: 2008/10/21 User number: 594243
© 2009 Safari Books Online, LLC. This PDF is made available for personal use only during the relevant subscription term, subject to the Safari Terms of Service. Any other use