diff options
author | sotech117 <michael_foiani@brown.edu> | 2023-12-12 22:57:38 -0500 |
---|---|---|
committer | sotech117 <michael_foiani@brown.edu> | 2023-12-12 22:57:38 -0500 |
commit | b4f50256edcbb66e831ee910c8f3af331457ceda (patch) | |
tree | 2ecb9f495ad31089ca76d7923f17dc7ff7130e8a /src/accelerate/myqtconcurrent.cpp | |
parent | 29785b8a928d464b46cb5c977adf100ee966be6b (diff) |
update aspect ratio to be 3 dimensional
Diffstat (limited to 'src/accelerate/myqtconcurrent.cpp')
-rw-r--r-- | src/accelerate/myqtconcurrent.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/accelerate/myqtconcurrent.cpp b/src/accelerate/myqtconcurrent.cpp index 211317b..686d28f 100644 --- a/src/accelerate/myqtconcurrent.cpp +++ b/src/accelerate/myqtconcurrent.cpp @@ -18,6 +18,7 @@ void RayTracer::renderParallel(RGBA *imageData, const RayTraceScene &scene) float cameraDepth = 1.f; float viewplaneHeight = 2.f*cameraDepth*std::tan(camera.getHeightAngle() / 2.f); float viewplaneWidth = cameraDepth*viewplaneHeight*((float)scene.width()/(float)scene.height()); + float viewplaneDepth = cameraDepth*viewplaneHeight * ((float)scene.depth() / (float)scene.height()); QList<pixelRoutineArgs> l{}; // for (int imageRow = 0; imageRow < scene.height(); imageRow++) { |