#include <BresenhamLineScan.h>
Collaboration diagram for BresenhamLineScan:
Public Member Functions | |
BresenhamLineScan (const Vector2< int > &start, const Vector2< int > &end) | |
Constructor: Computes parameters for a line. | |
BresenhamLineScan (const Vector2< double > &direction, const CameraInfo &cameraInfo) | |
Constructor: Computes parameters for a line. | |
BresenhamLineScan (const double &direction, const CameraInfo &cameraInfo) | |
Constructor: Computes parameters for a line. | |
BresenhamLineScan (const Vector2< int > &start, const double &direction, const CameraInfo &cameraInfo) | |
Constructor: Computes parameters for a line, numberOfPixels can be used as a termination condition to prevent scans outside of the image space. | |
void | init () |
initializes the error counter | |
void | getNext (Vector2< int > &pos) |
Increments the coordinates to the next point on the line. | |
Public Attributes | |
int | numberOfPixels |
The numberOfPixels, can be used as a termination condition for the scan, but only if the first constructor has been used (the other 2 constructors are in fact meant for infinite/unbounded scans, so it doesn't make sense). | |
Private Member Functions | |
void | setup (const Vector2< int > &start, const Vector2< int > &end) |
Computes the Bresenham parameters. | |
Private Attributes | |
bool | alongX |
Increase x-values, if true. | |
int | delta |
The error per step. | |
int | baseError |
The initial error value. | |
int | resetError |
Resets the error to a value less than zero. | |
Vector2< int > | standardOffset |
The standard offset per step. | |
Vector2< int > | correctionOffset |
The additional offset, if the error is above zero. | |
int | error |
The current error counter. |
|
Constructor: Computes parameters for a line.
Definition at line 45 of file BresenhamLineScan.cpp. References setup(). |
Here is the call graph for this function:
|
Constructor: Computes parameters for a line.
Definition at line 81 of file BresenhamLineScan.cpp. References Geometry::getIntersectionPointsOfLineAndRectangle(), CameraInfo::resolutionHeight, CameraInfo::resolutionWidth, and setup(). |
Here is the call graph for this function:
|
Constructor: Computes parameters for a line.
Definition at line 50 of file BresenhamLineScan.cpp. References Geometry::getIntersectionPointsOfLineAndRectangle(), CameraInfo::resolutionHeight, CameraInfo::resolutionWidth, and setup(). |
Here is the call graph for this function:
|
Constructor: Computes parameters for a line, numberOfPixels can be used as a termination condition to prevent scans outside of the image space.
Definition at line 63 of file BresenhamLineScan.cpp. References delta, Geometry::getIntersectionPointsOfLineAndRectangle(), CameraInfo::resolutionHeight, CameraInfo::resolutionWidth, and setup(). |
Here is the call graph for this function:
|
initializes the error counter
Definition at line 50 of file BresenhamLineScan.h. References baseError, and error. Referenced by GT2004BallSpecialist::addBallPercept(), GT2004BeaconDetector::scanForBeaconPart(), and GT2004BeaconDetector::scanForPink(). |
|
Increments the coordinates to the next point on the line.
Definition at line 59 of file BresenhamLineScan.h. References correctionOffset, delta, error, resetError, and standardOffset. Referenced by GT2004BallSpecialist::addBallPercept(), GT2004BeaconDetector::scanForBeaconPart(), and GT2004BeaconDetector::scanForPink(). |
|
Computes the Bresenham parameters.
Definition at line 13 of file BresenhamLineScan.cpp. References alongX, baseError, correctionOffset, delta, resetError, standardOffset, Vector2< int >::x, Vector2< V >::x, Vector2< int >::y, and Vector2< V >::y. Referenced by BresenhamLineScan(). |
|
The numberOfPixels, can be used as a termination condition for the scan, but only if the first constructor has been used (the other 2 constructors are in fact meant for infinite/unbounded scans, so it doesn't make sense).
Definition at line 74 of file BresenhamLineScan.h. Referenced by GT2004BallSpecialist::addBallPercept(), GT2004BeaconDetector::scanForBeaconPart(), and GT2004BeaconDetector::scanForPink(). |
|
Increase x-values, if true.
Definition at line 79 of file BresenhamLineScan.h. Referenced by setup(). |
|
The error per step.
Definition at line 81 of file BresenhamLineScan.h. Referenced by BresenhamLineScan(), getNext(), and setup(). |
|
The initial error value.
Definition at line 83 of file BresenhamLineScan.h. |
|
Resets the error to a value less than zero.
Definition at line 85 of file BresenhamLineScan.h. |
|
The standard offset per step.
Definition at line 87 of file BresenhamLineScan.h. |
|
The additional offset, if the error is above zero.
Definition at line 89 of file BresenhamLineScan.h. |
|
The current error counter.
Definition at line 91 of file BresenhamLineScan.h. |