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

SourceForge.net Logo
Project
Download
Mailing lists

 

         

hydroogmap::RayTracer< CellTracer > Class Template Reference

Traces paths through a discrete grid. More...

#include <raytracer.h>

List of all members.

Public Member Functions

bool trace (int x0, int y0, int x1, int y1)

Detailed Description

template<class CellTracer>
class hydroogmap::RayTracer< CellTracer >

Traces paths through a discrete grid.

Templated over the CellTracer so that the compiler can optimise fuck out of the thing. Needs to be supplied with the CellTracer class (see examples in this directory)

Author:
Alex Brooks

Member Function Documentation

template<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


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

Webmaster: Tobias Kaupp (tobasco at users.sourceforge.net)


Generated for Orca Robotics by  doxygen 1.4.5