diff options
author | Mike Krus <mike.krus@kdab.com> | 2020-03-07 09:27:16 +0000 |
---|---|---|
committer | Mike Krus <mike.krus@kdab.com> | 2020-04-23 10:46:06 +0100 |
commit | 60f42119fe5c341880f4576e0c9ad8d99ee277d5 (patch) | |
tree | e3a4992e501593c64ad506c13c0ddae87e9f5018 /src/core | |
parent | ee476605629a74fb824d3f014deb6e6be9e40e9f (diff) |
Pull bounding volume info from front end
When an entity has a bounding QBoundingVolume component AND that has
a QGeometryView, the bounding volume can be computed by the core
aspect and the results get pulled to the render backend.
Otherwise, we use the old code which computes the bounding volume
in the render aspect.
This means we have 2 jobs to compute bounding volumes and that the core
version must complete before the render aspect runs.
Change-Id: I4de45e48fa0c4d40d3d5084f387abfed5ea1a2f8
Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/geometry/qgeometryview.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/core/geometry/qgeometryview.cpp b/src/core/geometry/qgeometryview.cpp index 258448ba4..44933914a 100644 --- a/src/core/geometry/qgeometryview.cpp +++ b/src/core/geometry/qgeometryview.cpp @@ -273,7 +273,7 @@ bool BoundingVolumeCalculator::apply(QAttribute *positionAttribute, const float radius = (center - maxDistantPointCenter.maxDistPt).length(); - if (center == Vector3D{} || radius < 0.f) + if (center == Vector3D{} && radius < 0.f) return false; m_radius = radius; |