From 2f14e8a050fde97e4d1a33fca21c1b56e4bc6273 Mon Sep 17 00:00:00 2001 From: Andrew Copland Date: Sun, 17 Nov 2024 20:41:06 +0000 Subject: [PATCH] Keep using the m_clipCentroid for now --- src/GeoPatch.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/GeoPatch.cpp b/src/GeoPatch.cpp index b5dd7f804f..d6aea29d69 100644 --- a/src/GeoPatch.cpp +++ b/src/GeoPatch.cpp @@ -447,15 +447,15 @@ void GeoPatch::ReceiveJobHandle(Job::Handle job) bool GeoPatch::IsOverHorizon(const vector3d &camPos) { - const vector3d camDir(camPos - m_centroid); + const vector3d camDir(camPos - m_clipCentroid); const vector3d camDirNorm(camDir.Normalized()); - const vector3d cenDir(m_centroid.Normalized()); + const vector3d cenDir(m_clipCentroid.Normalized()); const double dotProd = camDirNorm.Dot(cenDir); if (dotProd < 0.25 && (camDir.LengthSqr() > (m_clipRadius * m_clipRadius))) { // return the result of the Horizon Culling test, inverted to match naming semantic // eg: HC returns true==visible, but this method returns true==hidden - return !s_sph.HorizonCulling(camPos, SSphere(m_centroid, m_clipRadius)); + return !s_sph.HorizonCulling(camPos, SSphere(m_clipCentroid, m_clipRadius)); } // not over the horizon