ZVISION: Remove extraneous TODO

After redoing the math, I now know that the algorithm requires for(x) { for(y) {}}
This commit is contained in:
richiesams 2013-08-30 17:09:46 -05:00 committed by Willem Jan Palenstijn
parent 21474d32ab
commit dfe143137a

View File

@ -163,7 +163,6 @@ void RenderTable::generatePanoramaLookupTable() {
float fovInRadians = (_panoramaOptions.fieldOfView * M_PI / 180.0f); float fovInRadians = (_panoramaOptions.fieldOfView * M_PI / 180.0f);
float cylinderRadius = halfHeight / tan(fovInRadians); float cylinderRadius = halfHeight / tan(fovInRadians);
// TODO: Change the algorithm to write a whole row at a time instead of a whole column at a time. AKA: for(y) { for(x) {}} instead of for(x) { for(y) {}}
for (uint x = 0; x < _numColumns; x++) { for (uint x = 0; x < _numColumns; x++) {
// Add an offset of 0.01 to overcome zero tan/atan issue (vertical line on half of screen) // Add an offset of 0.01 to overcome zero tan/atan issue (vertical line on half of screen)
// Alpha represents the horizontal angle between the viewer at the center of a cylinder and x // Alpha represents the horizontal angle between the viewer at the center of a cylinder and x
@ -173,7 +172,6 @@ void RenderTable::generatePanoramaLookupTable() {
// We also scale it by _panoramaOptions.linearScale // We also scale it by _panoramaOptions.linearScale
int32 xInCylinderCoords = int32(floor((cylinderRadius * _panoramaOptions.linearScale * alpha) + halfWidth)); int32 xInCylinderCoords = int32(floor((cylinderRadius * _panoramaOptions.linearScale * alpha) + halfWidth));
float cosAlpha = cos(alpha); float cosAlpha = cos(alpha);
for (uint y = 0; y < _numRows; y++) { for (uint y = 0; y < _numRows; y++) {