#include <amanatidesWoo2DIterator.h>
Public Member Functions | |
AmanatidesWoo2DIterator (ARRAY2D &data, int U, int V, int stepU, int stepV, double tMaxU, double tMaxV, double tDeltaU, double tDeltaV, double tStart) | |
The class constructor is initialized with all of the internal variables of the voxel traversal algorithm. | |
AmanatidesWoo2DIterator (const AmanatidesWoo2DIterator &source) | |
Copy constructor. | |
~AmanatidesWoo2DIterator () | |
Destructor. | |
double | tEntry () |
This method returns the ray parameter t at which the ray being followed passes into the current pixel. | |
double | tExit () |
This method returns the ray parameter t at which the ray being followed passes out of the current pixel. | |
int | U () |
This method returns the U coordinate of the current pixel. | |
int | V () |
This method returns the V coordinate of the current pixel. | |
ARRAY2D::value_type & | operator* () |
This operator returns a reference to the Array2D element at the current pixel. | |
ARRAY2D::value_type * | operator-> () |
This operator returns a pointer to the Array2D element at the current pixel. | |
AmanatidesWoo2DIterator & | operator++ () |
The pre-increment operator increments the iterator so that it points to the next pixel along the path. | |
AmanatidesWoo2DIterator | operator++ (int dummy) |
The post-increment operator increments the iterator so that it points to the next pixel along the path. | |
AmanatidesWoo2DIterator & | operator= (const AmanatidesWoo2DIterator &source) |
This is the assignment operator. | |
bool | operator== (const AmanatidesWoo2DIterator &other) |
The equality operator returns true if both the argument and *this currently reference a valid pixel, or if both the argument and *this currently reference an invalid pixel. | |
bool | operator!= (const AmanatidesWoo2DIterator &other) |
The equality operator returns false if both the argument and *this currently reference a valid pixel, or if both the argument and *this currently reference an invalid pixel. |
Typically, an AmanatidesWoo2DIterator instance will be created by an AmanatidesWoo2D object in order to access a line of pixels specified through the AmanatidesWoo2D class interface. The user will probably never need to directly construct an AmanatidesWoo2DIterator. For more information on the fast voxel traversal algorithm of Amanatides and Woo, please refer to [ref].
Definition at line 38 of file amanatidesWoo2DIterator.h.
dlr::numeric::AmanatidesWoo2DIterator< ARRAY2D >::AmanatidesWoo2DIterator | ( | ARRAY2D & | data, | |
int | U, | |||
int | V, | |||
int | stepU, | |||
int | stepV, | |||
double | tMaxU, | |||
double | tMaxV, | |||
double | tDeltaU, | |||
double | tDeltaV, | |||
double | tStart | |||
) | [inline] |
The class constructor is initialized with all of the internal variables of the voxel traversal algorithm.
data | This parameter is a reference to the 2D data over which to iterate. | |
U | This parameter specifies the starting U coordinate (column) in the pixel data. Its value must lie in the range [0..N), where N is the number of columns in parameter 'data'. | |
V | This parameter specifies the starting V coordinate (row) in the pixel data. Its value must lie in the range [0..M), where M is the number of rows in parameter 'data'. | |
stepU | This parameter specifies the increment by which the U coordinate changes as we move along the direction of the ray. It must be either 1 or -1. | |
stepV | This parameter specifies the increment by which the V coordinate changes as we move along the direction of the ray. It must be either 1 or -1. | |
tMaxU | This parameter specifies the value of ray parameter 't' at which the ray passes from the current column into the next column. Parameter 't' is described in the documentation for class AmanatidesWoo2D. | |
tMaxV | This parameter specifies the value of ray parameter 't' at which the ray passes from the current row into the next row. Parameter 't' is described in the documentation for class AmanatidesWoo2D. | |
tDeltaU | This parameter specifies the increment to ray parameter 't' which moves one exactly one column width to the left or right, where left and right describe the directions of the negative and positive U axis, respectively. Parameter 't' is described in the documentation for class AmanatidesWoo2D. | |
tDeltaV | This parameter specifies the increment to ray parameter 't' which moves one exactly one row width up or down, where up and down describe the directions of the negative and positive V axis, respectively. Parameter 't' is described in the documentation for class AmanatidesWoo2D. | |
tStart | This parameter specifies the value of ray parameter 't' at the very beginning point of the iteration. |
Definition at line 290 of file amanatidesWoo2DIterator.h.
dlr::numeric::AmanatidesWoo2DIterator< ARRAY2D >::AmanatidesWoo2DIterator | ( | const AmanatidesWoo2DIterator< ARRAY2D > & | source | ) | [inline] |
Copy constructor.
source | This argument specifies the AmanatidesWoo2D instance to be copied. |
Definition at line 321 of file amanatidesWoo2DIterator.h.
dlr::numeric::AmanatidesWoo2DIterator< ARRAY2D >::~AmanatidesWoo2DIterator | ( | ) | [inline] |
bool dlr::numeric::AmanatidesWoo2DIterator< ARRAY2D >::operator!= | ( | const AmanatidesWoo2DIterator< ARRAY2D > & | other | ) | [inline] |
The equality operator returns false if both the argument and *this currently reference a valid pixel, or if both the argument and *this currently reference an invalid pixel.
In all other cases the return is true.
NOTE: This behavior is not exactly what you'd expect for an equality operator. references the same pixel as the argument.
other | This argument is a second AmanatidesWoo2DIterator instance that is to be compared with *this. |
Definition at line 437 of file amanatidesWoo2DIterator.h.
References dlr::numeric::AmanatidesWoo2DIterator< ARRAY2D >::operator==().
ARRAY2D::value_type & dlr::numeric::AmanatidesWoo2DIterator< ARRAY2D >::operator* | ( | ) | [inline] |
This operator returns a reference to the Array2D element at the current pixel.
With each increment of the AmanatidesWoo2DIterator instance, this operator will return a reference to the next pixel along the ray.
Definition at line 344 of file amanatidesWoo2DIterator.h.
Referenced by dlr::numeric::AmanatidesWoo2DIterator< ARRAY2D >::operator->().
AmanatidesWoo2DIterator< ARRAY2D > dlr::numeric::AmanatidesWoo2DIterator< ARRAY2D >::operator++ | ( | int | dummy | ) | [inline] |
The post-increment operator increments the iterator so that it points to the next pixel along the path.
It differs from the pre-increment operator in its return value. Traditionally, post-increment is a little slower than pre-increment.
dummy | This parameter is a dummy which indicates to the compiler that this operation is post-increment (rather than pre-increment). |
Definition at line 390 of file amanatidesWoo2DIterator.h.
AmanatidesWoo2DIterator< ARRAY2D > & dlr::numeric::AmanatidesWoo2DIterator< ARRAY2D >::operator++ | ( | ) | [inline] |
The pre-increment operator increments the iterator so that it points to the next pixel along the path.
Definition at line 364 of file amanatidesWoo2DIterator.h.
ARRAY2D::value_type * dlr::numeric::AmanatidesWoo2DIterator< ARRAY2D >::operator-> | ( | ) | [inline] |
This operator returns a pointer to the Array2D element at the current pixel.
With each increment of the AmanatidesWoo2DIterator instance, this operator will return a pointer to the next pixel along the ray.
Definition at line 354 of file amanatidesWoo2DIterator.h.
References dlr::numeric::AmanatidesWoo2DIterator< ARRAY2D >::operator*().
AmanatidesWoo2DIterator< ARRAY2D > & dlr::numeric::AmanatidesWoo2DIterator< ARRAY2D >::operator= | ( | const AmanatidesWoo2DIterator< ARRAY2D > & | source | ) | [inline] |
This is the assignment operator.
It copies the value of its argument into *this.
source | This argument specifies the AmanatidesWoo2DIterator instance to be copied. |
Definition at line 402 of file amanatidesWoo2DIterator.h.
References dlr::numeric::AmanatidesWoo2DIterator< ARRAY2D >::m_data, dlr::numeric::AmanatidesWoo2DIterator< ARRAY2D >::m_inBounds, dlr::numeric::AmanatidesWoo2DIterator< ARRAY2D >::m_stepU, dlr::numeric::AmanatidesWoo2DIterator< ARRAY2D >::m_stepV, dlr::numeric::AmanatidesWoo2DIterator< ARRAY2D >::m_tDeltaU, dlr::numeric::AmanatidesWoo2DIterator< ARRAY2D >::m_tDeltaV, dlr::numeric::AmanatidesWoo2DIterator< ARRAY2D >::m_tEntry, dlr::numeric::AmanatidesWoo2DIterator< ARRAY2D >::m_tMaxU, dlr::numeric::AmanatidesWoo2DIterator< ARRAY2D >::m_tMaxV, dlr::numeric::AmanatidesWoo2DIterator< ARRAY2D >::m_U, dlr::numeric::AmanatidesWoo2DIterator< ARRAY2D >::m_uLimit, dlr::numeric::AmanatidesWoo2DIterator< ARRAY2D >::m_V, and dlr::numeric::AmanatidesWoo2DIterator< ARRAY2D >::m_vLimit.
bool dlr::numeric::AmanatidesWoo2DIterator< ARRAY2D >::operator== | ( | const AmanatidesWoo2DIterator< ARRAY2D > & | other | ) | [inline] |
The equality operator returns true if both the argument and *this currently reference a valid pixel, or if both the argument and *this currently reference an invalid pixel.
In all other cases the return is false.
NOTE: This behavior is not exactly what you'd expect for an equality operator. references the same pixel as the argument.
other | This argument is a second AmanatidesWoo2DIterator instance that is to be compared with *this. |
Definition at line 425 of file amanatidesWoo2DIterator.h.
References dlr::numeric::AmanatidesWoo2DIterator< ARRAY2D >::m_inBounds.
Referenced by dlr::numeric::AmanatidesWoo2DIterator< ARRAY2D >::operator!=().
double dlr::numeric::AmanatidesWoo2DIterator< ARRAY2D >::tEntry | ( | ) | [inline] |
This method returns the ray parameter t at which the ray being followed passes into the current pixel.
In other words, the value t such that (rayOrigin + t * rayDirection) is the point of entry into the current pixel.
Definition at line 112 of file amanatidesWoo2DIterator.h.
double dlr::numeric::AmanatidesWoo2DIterator< ARRAY2D >::tExit | ( | ) | [inline] |
This method returns the ray parameter t at which the ray being followed passes out of the current pixel.
In other words, the value t such that (rayOrigin + t * rayDirection) is the point of exit from the current pixel. Invoking this method carries a computational cost of 1 double precision float comparison.
Definition at line 125 of file amanatidesWoo2DIterator.h.
int dlr::numeric::AmanatidesWoo2DIterator< ARRAY2D >::U | ( | ) | [inline] |
This method returns the U coordinate of the current pixel.
The return value is int rather than size_t so that negative (out of bounds) coordinates can be returned.
Definition at line 136 of file amanatidesWoo2DIterator.h.
int dlr::numeric::AmanatidesWoo2DIterator< ARRAY2D >::V | ( | ) | [inline] |
This method returns the V coordinate of the current pixel.
The return value is int rather than size_t so that negative (out of bounds) coordinates can be returned.
Definition at line 147 of file amanatidesWoo2DIterator.h.