diff options
Diffstat (limited to 'src/render/jobs/updatelevelofdetailjob.cpp')
-rw-r--r-- | src/render/jobs/updatelevelofdetailjob.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/render/jobs/updatelevelofdetailjob.cpp b/src/render/jobs/updatelevelofdetailjob.cpp index 940d26850..24891f9b8 100644 --- a/src/render/jobs/updatelevelofdetailjob.cpp +++ b/src/render/jobs/updatelevelofdetailjob.cpp @@ -135,10 +135,10 @@ void UpdateLevelOfDetailJob::updateEntityLod(Entity *entity) if (lod->isEnabled() && !lod->thresholds().isEmpty()) { switch (lod->thresholdType()) { - case QLevelOfDetail::DistanceToCamera: + case QLevelOfDetail::DistanceToCameraThreshold: updateEntityLodByDistance(entity, lod); break; - case QLevelOfDetail::ProjectedScreenPixelSize: + case QLevelOfDetail::ProjectedScreenPixelSizeThreshold: updateEntityLodByScreenArea(entity, lod); break; default: @@ -162,7 +162,7 @@ void UpdateLevelOfDetailJob::updateEntityLodByDistance(Entity *entity, LevelOfDe const QVector<qreal> thresholds = lod->thresholds(); QVector3D center = lod->center(); - if (lod->radius() > 0.f || entity->worldBoundingVolume() == nullptr) { + if (lod->hasBoundingVolumeOverride() || entity->worldBoundingVolume() == nullptr) { center = *entity->worldTransform() * center; } else { center = entity->worldBoundingVolume()->center(); @@ -198,7 +198,7 @@ void UpdateLevelOfDetailJob::updateEntityLodByScreenArea(Entity *entity, LevelOf const QVector<qreal> thresholds = lod->thresholds(); Sphere bv(lod->center(), lod->radius()); - if (lod->radius() <= 0.f && entity->worldBoundingVolume() != nullptr) { + if (!lod->hasBoundingVolumeOverride() && entity->worldBoundingVolume() != nullptr) { bv = *(entity->worldBoundingVolume()); } else { bv.transform(*entity->worldTransform()); |