Line Iterator with Ray Tracing (subpixel accuracy) More...
#include <ray_trace.h>
Public Types | |
using | difference_type = int |
using | iterator_category = std::input_iterator_tag |
using | pointer = nav_grid::SignedIndex * |
using | reference = nav_grid::SignedIndex & |
using | self_type = RayTrace |
using | value_type = nav_grid::SignedIndex |
Public Member Functions | |
RayTrace | begin () const |
Helper function for range-style iteration. More... | |
RayTrace | end () const |
Helper function for range-style iteration. More... | |
nav_grid::SignedIndex | getFinalIndex () const override |
void | increment () override |
Increase the iterator to the next element. More... | |
bool | operator!= (const RayTrace &other) |
Test if two iterators are not equivalent - required for testing if iterator is at the end. More... | |
RayTrace & | operator++ () |
Increase the iterator to the next element. More... | |
bool | operator== (const RayTrace &other) |
Test if two iterators are equivalent. More... | |
RayTrace (double x0, double y0, double x1, double y1, bool include_last_index=true) | |
Public constructor. More... | |
Public Member Functions inherited from nav_grid_iterators::AbstractLineIterator | |
AbstractLineIterator () | |
Public Constructor. More... | |
bool | isFinished () |
const nav_grid::SignedIndex & | operator* () const |
Dereference the iterator. More... | |
Protected Member Functions | |
RayTrace (const nav_grid::SignedIndex &index, double x0, double y0, double x1, double y1, bool include_last_index, double dx, double dy, double initial_error, int loop_inc_x, int loop_inc_y) | |
Protected constructor that takes in an arbitrary index and other internal parameters. More... | |
Protected Member Functions inherited from nav_grid_iterators::AbstractLineIterator | |
AbstractLineIterator (nav_grid::SignedIndex index) | |
Protected Constructor - takes arbitrary index. More... | |
Protected Attributes | |
double | dx_ |
double | dy_ |
double | error_ |
bool | include_last_index_ |
double | initial_error_ |
int | loop_inc_x_ |
int | loop_inc_y_ |
double | x0_ |
double | x1_ |
double | y0_ |
double | y1_ |
Protected Attributes inherited from nav_grid_iterators::AbstractLineIterator | |
nav_grid::SignedIndex | index_ |
Line Iterator with Ray Tracing (subpixel accuracy)
Definition at line 46 of file ray_trace.h.
using nav_grid_iterators::RayTrace::difference_type = int |
Definition at line 102 of file ray_trace.h.
using nav_grid_iterators::RayTrace::iterator_category = std::input_iterator_tag |
Definition at line 101 of file ray_trace.h.
Definition at line 100 of file ray_trace.h.
Definition at line 99 of file ray_trace.h.
Definition at line 97 of file ray_trace.h.
Definition at line 98 of file ray_trace.h.
nav_grid_iterators::RayTrace::RayTrace | ( | double | x0, |
double | y0, | ||
double | x1, | ||
double | y1, | ||
bool | include_last_index = true |
||
) |
Public constructor.
x0 | Start x coordinate |
y0 | Start y coordinate |
x1 | End x coordinate |
y1 | End y coordinate |
include_last_index | If true, will include the end coordinates. |
Definition at line 41 of file ray_trace.cpp.
|
protected |
Protected constructor that takes in an arbitrary index and other internal parameters.
index | Initial index |
x0 | Start x coordinate |
y0 | Start y coordinate |
x1 | End x coordinate |
y1 | End y coordinate |
include_last_index | If true, will include the end coordinates. |
dx | |
dy | |
initial_error | |
loop_inc_x | |
loop_inc_y |
Definition at line 99 of file ray_trace.cpp.
RayTrace nav_grid_iterators::RayTrace::begin | ( | ) | const |
Helper function for range-style iteration.
Definition at line 108 of file ray_trace.cpp.
RayTrace nav_grid_iterators::RayTrace::end | ( | ) | const |
Helper function for range-style iteration.
Definition at line 114 of file ray_trace.cpp.
|
overridevirtual |
Implements nav_grid_iterators::AbstractLineIterator.
Definition at line 142 of file ray_trace.cpp.
|
overridevirtual |
Increase the iterator to the next element.
Implements nav_grid_iterators::AbstractLineIterator.
Definition at line 128 of file ray_trace.cpp.
|
inline |
Test if two iterators are not equivalent - required for testing if iterator is at the end.
Definition at line 70 of file ray_trace.h.
|
inline |
Increase the iterator to the next element.
Definition at line 91 of file ray_trace.h.
|
inline |
Test if two iterators are equivalent.
Definition at line 62 of file ray_trace.h.
|
protected |
Definition at line 126 of file ray_trace.h.
|
protected |
Definition at line 126 of file ray_trace.h.
|
protected |
Definition at line 126 of file ray_trace.h.
|
protected |
Definition at line 125 of file ray_trace.h.
|
protected |
Definition at line 126 of file ray_trace.h.
|
protected |
Definition at line 127 of file ray_trace.h.
|
protected |
Definition at line 127 of file ray_trace.h.
|
protected |
Definition at line 124 of file ray_trace.h.
|
protected |
Definition at line 124 of file ray_trace.h.
|
protected |
Definition at line 124 of file ray_trace.h.
|
protected |
Definition at line 124 of file ray_trace.h.