orca-robotics


INTRODUCTION
Overview
Download and Install
Documentation

REPOSITORY
Interfaces
Drivers
Libraries
Utilities
Software Map

DEVELOPER
Dashboard

PEOPLE
Contributors
Users

SourceForge.net Logo
Project
Download
Mailing lists

 

         

hydroogmap::OgRayTracer< CellTracer > Class Template Reference

#include <ograytracer.h>

List of all members.

Public Member Functions

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


Detailed Description

template<class CellTracer = SafeLosCellTracer>
class hydroogmap::OgRayTracer< CellTracer >

Author:
Alex Brooks
Templated over the CellTracer so that the compiler can optimise fuck out of the thing. Needs to be supplied with the CellTracer class, which matches the interface of SafeLosCellTracer above.


Member Function Documentation

template<class CellTracer>
SOEXPORT bool hydroogmap::OgRayTracer< CellTracer >::trace int  x0,
int  y0,
int  x1,
int  y1
 

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