diff options
Diffstat (limited to 'src/render/jobs/frustumcullingjob_p.h')
-rw-r--r-- | src/render/jobs/frustumcullingjob_p.h | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/src/render/jobs/frustumcullingjob_p.h b/src/render/jobs/frustumcullingjob_p.h index cddbbd409..636585c2f 100644 --- a/src/render/jobs/frustumcullingjob_p.h +++ b/src/render/jobs/frustumcullingjob_p.h @@ -42,7 +42,10 @@ #include <Qt3DCore/qaspectjob.h> #include <Qt3DCore/private/matrix4x4_p.h> +#include <Qt3DCore/private/vector3d_p.h> +#include <Qt3DCore/private/vector4d_p.h> #include <Qt3DRender/private/aligned_malloc_p.h> +#include <Qt3DRender/private/qt3drender_global_p.h> // // W A R N I N G @@ -66,7 +69,7 @@ class EntityManager; class NodeManagers; struct Plane; -class FrustumCullingJob : public Qt3DCore::QAspectJob +class Q_3DRENDERSHARED_PRIVATE_EXPORT FrustumCullingJob : public Qt3DCore::QAspectJob { public: FrustumCullingJob(); @@ -85,6 +88,19 @@ public: void run() final; private: + struct Q_AUTOTEST_EXPORT Plane + { + explicit Plane(const Vector4D &planeEquation) + : planeEquation(planeEquation) + , normal(Vector3D(planeEquation).normalized()) + , d(planeEquation.w() / Vector3D(planeEquation).length()) + {} + + const Vector4D planeEquation; + const Vector3D normal; + const float d; + }; + void cullScene(Entity *e, const Plane *planes); Matrix4x4 m_viewProjection; Entity *m_root; |