Finally attained perspective correctness

This commit is contained in:
Michaël Lemaire 2013-06-13 17:45:26 +02:00
parent c4cc784003
commit 48d9c131ad

View file

@ -390,7 +390,7 @@ static void _scanInterpolate(CameraDefinition* camera, ScanPoint* v1, ScanPoint*
result->pixel.x = v1->pixel.x + diff->pixel.x * value;
result->pixel.y = v1->pixel.y + diff->pixel.y * value;
result->pixel.z = ((1.0 - value) * (v1->pixel.z / v1depth) + value * (v1->pixel.z + diff->pixel.z) / v2depth) / factor;
result->pixel.z = v1->pixel.z + diff->pixel.z * value;
result->location.x = ((1.0 - value) * (v1->location.x / v1depth) + value * (v1->location.x + diff->location.x) / v2depth) / factor;
result->location.y = ((1.0 - value) * (v1->location.y / v1depth) + value * (v1->location.y + diff->location.y) / v2depth) / factor;
result->location.z = ((1.0 - value) * (v1->location.z / v1depth) + value * (v1->location.z + diff->location.z) / v2depth) / factor;