#include <amanatidesWoo3DIterator.h>
Public Member Functions | |
AmanatidesWoo3DIterator (ARRAY3D &data, int U, int V, int W, int stepU, int stepV, int stepW, double tMaxU, double tMaxV, double tMaxW, double tDeltaU, double tDeltaV, double tDeltaW, double tStart) | |
The class constructor is initialized with all of the internal variables of the voxel traversal algorithm. | |
AmanatidesWoo3DIterator (const AmanatidesWoo3DIterator &source) | |
Copy constructor. | |
~AmanatidesWoo3DIterator () | |
Destructor. | |
double | tEntry () |
This method returns the ray parameter t at which the ray being followed passes into the current voxel. | |
double | tExit () |
This method returns the ray parameter t at which the ray being followed passes out of the current voxel. | |
int | U () |
This method returns the U coordinate of the current voxel. | |
int | V () |
This method returns the V coordinate of the current voxel. | |
int | W () |
This method returns the W coordinate of the current voxel. | |
ARRAY3D::value_type & | operator* () |
This operator returns a reference to the Array3D element at the current voxel. | |
ARRAY3D::value_type * | operator-> () |
This operator returns a pointer to the Array3D element at the current voxel. | |
AmanatidesWoo3DIterator & | operator++ () |
The pre-increment operator increments the iterator so that it points to the next voxel along the path. | |
AmanatidesWoo3DIterator | operator++ (int dummy) |
The post-increment operator increments the iterator so that it points to the next voxel along the path. | |
AmanatidesWoo3DIterator & | operator= (const AmanatidesWoo3DIterator &source) |
This is the assignment operator. | |
bool | operator== (const AmanatidesWoo3DIterator &other) |
The equality operator returns true if both the argument and *this currently reference a valid voxel, or if both the argument and *this currently reference an invalid voxel. | |
bool | operator!= (const AmanatidesWoo3DIterator &other) |
The equality operator returns false if both the argument and *this currently reference a valid voxel, or if both the argument and *this currently reference an invalid voxel. |
Typically, an AmanatidesWoo3DIterator instance will be created by an AmanatidesWoo3D object in order to access a line of voxels specified through the AmanatidesWoo3D class interface. The user will probably never need to directly construct an AmanatidesWoo3DIterator. For more information on the fast voxel traversal algorithm of Amanatides and Woo, please refer to [ref].
Definition at line 38 of file amanatidesWoo3DIterator.h.
dlr::numeric::AmanatidesWoo3DIterator< ARRAY3D >::AmanatidesWoo3DIterator | ( | ARRAY3D & | data, | |
int | U, | |||
int | V, | |||
int | W, | |||
int | stepU, | |||
int | stepV, | |||
int | stepW, | |||
double | tMaxU, | |||
double | tMaxV, | |||
double | tMaxW, | |||
double | tDeltaU, | |||
double | tDeltaV, | |||
double | tDeltaW, | |||
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 3D data over which to iterate. | |
U | This parameter specifies the starting U coordinate (column) in the voxel 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 voxel data. Its value must lie in the range [0..M), where M is the number of rows in parameter 'data'. | |
W | This parameter specifies the starting W coordinate (row) in the voxel 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. | |
stepW | This parameter specifies the increment by which the W 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 AmanatidesWoo3D. | |
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 AmanatidesWoo3D. | |
tMaxW | This parameter specifies the value of ray parameter 't' at which the ray passes from the current slice into the next slice. Parameter 't' is described in the documentation for class AmanatidesWoo3D. | |
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 AmanatidesWoo3D. | |
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 AmanatidesWoo3D. | |
tDeltaW | This parameter specifies the increment to ray parameter 't' which moves one exactly one slice width up or down, where up and down describe the directions of the negative and positive Z axis, respectively. Parameter 't' is described in the documentation for class AmanatidesWoo3D. | |
tStart | This parameter specifies the value of ray parameter 't' at the very beginning point of the iteration. |
Definition at line 321 of file amanatidesWoo3DIterator.h.
dlr::numeric::AmanatidesWoo3DIterator< ARRAY3D >::AmanatidesWoo3DIterator | ( | const AmanatidesWoo3DIterator< ARRAY3D > & | source | ) | [inline] |
Copy constructor.
source | This argument specifies the AmanatidesWoo3D instance to be copied. |
Definition at line 359 of file amanatidesWoo3DIterator.h.
dlr::numeric::AmanatidesWoo3DIterator< ARRAY3D >::~AmanatidesWoo3DIterator | ( | ) | [inline] |
bool dlr::numeric::AmanatidesWoo3DIterator< ARRAY3D >::operator!= | ( | const AmanatidesWoo3DIterator< ARRAY3D > & | other | ) | [inline] |
The equality operator returns false if both the argument and *this currently reference a valid voxel, or if both the argument and *this currently reference an invalid voxel.
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 voxel as the argument.
other | This argument is a second AmanatidesWoo3DIterator instance that is to be compared with *this. |
Definition at line 503 of file amanatidesWoo3DIterator.h.
References dlr::numeric::AmanatidesWoo3DIterator< ARRAY3D >::operator==().
ARRAY3D::value_type & dlr::numeric::AmanatidesWoo3DIterator< ARRAY3D >::operator* | ( | ) | [inline] |
This operator returns a reference to the Array3D element at the current voxel.
With each increment of the AmanatidesWoo3DIterator instance, this operator will return a reference to the next voxel along the ray.
Definition at line 387 of file amanatidesWoo3DIterator.h.
Referenced by dlr::numeric::AmanatidesWoo3DIterator< ARRAY3D >::operator->().
AmanatidesWoo3DIterator< ARRAY3D > dlr::numeric::AmanatidesWoo3DIterator< ARRAY3D >::operator++ | ( | int | dummy | ) | [inline] |
The post-increment operator increments the iterator so that it points to the next voxel 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 451 of file amanatidesWoo3DIterator.h.
AmanatidesWoo3DIterator< ARRAY3D > & dlr::numeric::AmanatidesWoo3DIterator< ARRAY3D >::operator++ | ( | ) | [inline] |
The pre-increment operator increments the iterator so that it points to the next voxel along the path.
Definition at line 407 of file amanatidesWoo3DIterator.h.
ARRAY3D::value_type * dlr::numeric::AmanatidesWoo3DIterator< ARRAY3D >::operator-> | ( | ) | [inline] |
This operator returns a pointer to the Array3D element at the current voxel.
With each increment of the AmanatidesWoo3DIterator instance, this operator will return a pointer to the next voxel along the ray.
Definition at line 397 of file amanatidesWoo3DIterator.h.
References dlr::numeric::AmanatidesWoo3DIterator< ARRAY3D >::operator*().
AmanatidesWoo3DIterator< ARRAY3D > & dlr::numeric::AmanatidesWoo3DIterator< ARRAY3D >::operator= | ( | const AmanatidesWoo3DIterator< ARRAY3D > & | source | ) | [inline] |
This is the assignment operator.
It copies the value of its argument into *this.
source | This argument specifies the AmanatidesWoo3DIterator instance to be copied. |
Definition at line 463 of file amanatidesWoo3DIterator.h.
References dlr::numeric::AmanatidesWoo3DIterator< ARRAY3D >::m_data, dlr::numeric::AmanatidesWoo3DIterator< ARRAY3D >::m_inBounds, dlr::numeric::AmanatidesWoo3DIterator< ARRAY3D >::m_stepU, dlr::numeric::AmanatidesWoo3DIterator< ARRAY3D >::m_stepV, dlr::numeric::AmanatidesWoo3DIterator< ARRAY3D >::m_stepW, dlr::numeric::AmanatidesWoo3DIterator< ARRAY3D >::m_tDeltaU, dlr::numeric::AmanatidesWoo3DIterator< ARRAY3D >::m_tDeltaV, dlr::numeric::AmanatidesWoo3DIterator< ARRAY3D >::m_tDeltaW, dlr::numeric::AmanatidesWoo3DIterator< ARRAY3D >::m_tEntry, dlr::numeric::AmanatidesWoo3DIterator< ARRAY3D >::m_tMaxU, dlr::numeric::AmanatidesWoo3DIterator< ARRAY3D >::m_tMaxV, dlr::numeric::AmanatidesWoo3DIterator< ARRAY3D >::m_tMaxW, dlr::numeric::AmanatidesWoo3DIterator< ARRAY3D >::m_U, dlr::numeric::AmanatidesWoo3DIterator< ARRAY3D >::m_uLimit, dlr::numeric::AmanatidesWoo3DIterator< ARRAY3D >::m_V, dlr::numeric::AmanatidesWoo3DIterator< ARRAY3D >::m_vLimit, dlr::numeric::AmanatidesWoo3DIterator< ARRAY3D >::m_W, and dlr::numeric::AmanatidesWoo3DIterator< ARRAY3D >::m_wLimit.
bool dlr::numeric::AmanatidesWoo3DIterator< ARRAY3D >::operator== | ( | const AmanatidesWoo3DIterator< ARRAY3D > & | other | ) | [inline] |
The equality operator returns true if both the argument and *this currently reference a valid voxel, or if both the argument and *this currently reference an invalid voxel.
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 voxel as the argument.
other | This argument is a second AmanatidesWoo3DIterator instance that is to be compared with *this. |
Definition at line 491 of file amanatidesWoo3DIterator.h.
References dlr::numeric::AmanatidesWoo3DIterator< ARRAY3D >::m_inBounds.
Referenced by dlr::numeric::AmanatidesWoo3DIterator< ARRAY3D >::operator!=().
double dlr::numeric::AmanatidesWoo3DIterator< ARRAY3D >::tEntry | ( | ) | [inline] |
This method returns the ray parameter t at which the ray being followed passes into the current voxel.
In other words, the value t such that (rayOrigin + t * rayDirection) is the point of entry into the current voxel.
Definition at line 127 of file amanatidesWoo3DIterator.h.
double dlr::numeric::AmanatidesWoo3DIterator< ARRAY3D >::tExit | ( | ) | [inline] |
This method returns the ray parameter t at which the ray being followed passes out of the current voxel.
In other words, the value t such that (rayOrigin + t * rayDirection) is the point of exit from the current voxel. Invoking this method carries a computational cost of 1 double precision float comparison.
Definition at line 140 of file amanatidesWoo3DIterator.h.
int dlr::numeric::AmanatidesWoo3DIterator< ARRAY3D >::U | ( | ) | [inline] |
This method returns the U coordinate of the current voxel.
The return value is int rather than size_t so that negative (out of bounds) coordinates can be returned.
Definition at line 151 of file amanatidesWoo3DIterator.h.
int dlr::numeric::AmanatidesWoo3DIterator< ARRAY3D >::V | ( | ) | [inline] |
This method returns the V coordinate of the current voxel.
The return value is int rather than size_t so that negative (out of bounds) coordinates can be returned.
Definition at line 162 of file amanatidesWoo3DIterator.h.
int dlr::numeric::AmanatidesWoo3DIterator< ARRAY3D >::W | ( | ) | [inline] |
This method returns the W coordinate of the current voxel.
The return value is int rather than size_t so that negative (out of bounds) coordinates can be returned.
Definition at line 173 of file amanatidesWoo3DIterator.h.