INTRODUCTION Overview Download and Install Quick Start Documentation Publications NONFRAMEWORK CODE Driver Interfaces Drivers Libraries Utilities FRAMEWORK CODE Interfaces Components Libraries Utilities Full Software Listings DEVELOPER Tutorials Examples Dev Guide Dashboard PEOPLE Contributors Users Project Download Mailing lists
|
hydroogmap::RayTracer< CellTracer > Class Template ReferenceTraces paths through a discrete grid. More...
Detailed Descriptiontemplate<class CellTracer>
|
SOEXPORT bool hydroogmap::RayTracer< CellTracer >::trace | ( | int | x0, | |
int | y0, | |||
int | x1, | |||
int | y1 | |||
) | [inline] |
Trace from cell (x0,y0) to cell (x1,y1), inclusive. Sets the endpoints which were reached. CellTracer.traceCell(x,y) is applied to every cell along the trace. rayTrace is guaranteed to start tracing from the (x0,y0) end.
If traceCell ever returns false, tracing stops. If we trace right out to (x1,y1), we call cellTracer.traceSucceeded(x1,y1).
Uses Bresenham's Line Algorithm (so it's fast).
Returns: true: we traced out to (x1,y1) false: the trace was short-circuited
Webmaster: Tobias Kaupp (tobasco at users.sourceforge.net)