diff options
Diffstat (limited to 'src/Runtime/ogl-runtime/src/runtimerender/rendererimpl/Qt3DSRendererImplLayerRenderHelper.h')
m--------- | src/Runtime/ogl-runtime | 0 | ||||
-rw-r--r-- | src/Runtime/ogl-runtime/src/runtimerender/rendererimpl/Qt3DSRendererImplLayerRenderHelper.h | 115 |
2 files changed, 0 insertions, 115 deletions
diff --git a/src/Runtime/ogl-runtime b/src/Runtime/ogl-runtime new file mode 160000 +Subproject 2025912174c4cf99270b7439ec3b021e1d089ae diff --git a/src/Runtime/ogl-runtime/src/runtimerender/rendererimpl/Qt3DSRendererImplLayerRenderHelper.h b/src/Runtime/ogl-runtime/src/runtimerender/rendererimpl/Qt3DSRendererImplLayerRenderHelper.h deleted file mode 100644 index 616ebe1a..00000000 --- a/src/Runtime/ogl-runtime/src/runtimerender/rendererimpl/Qt3DSRendererImplLayerRenderHelper.h +++ /dev/null @@ -1,115 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2008-2012 NVIDIA Corporation. -** Copyright (C) 2017 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of Qt 3D Studio. -** -** $QT_BEGIN_LICENSE:GPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3 or (at your option) any later version -** approved by the KDE Free Qt Foundation. The licenses are as published by -** the Free Software Foundation and appearing in the file LICENSE.GPL3 -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ -#pragma once -#include "Qt3DSRender.h" -#include "foundation/Qt3DSVec2.h" -#include "render/Qt3DSRenderBaseTypes.h" -#include "Qt3DSRenderCamera.h" -#include "Qt3DSRenderContextCore.h" - -namespace qt3ds { -namespace render { - - /** An independent, testable entity to encapsulate taking at least: - * layer, current viewport rect, current scissor rect, presentation design dimensions - * and producing a set of rectangles: - * layer viewport rect (inside viewport rect and calculated using outer viewport rect info) - * layer scissor rect (inside current scissor rect) - * layer camera rect (may be the viewport rect) - * - * In the case where we have to render offscreen for this layer then we need to handle produce - * a set of texture dimensions and the layer camera rect ends up being same size but with no - *offsets. - * - * This object should handle part of any translation from screenspace to global space. - * I am using language level access control on this object because it needs specific - * interface design that will enable future modifications. - */ - struct SLayerRenderHelper - { - private: - NVRenderRectF m_PresentationViewport; - NVRenderRectF m_PresentationScissor; - QT3DSVec2 m_PresentationDesignDimensions; - SLayer *m_Layer; - SCamera *m_Camera; - bool m_Offscreen; - - NVRenderRectF m_Viewport; - NVRenderRectF m_Scissor; - - ScaleModes::Enum m_ScaleMode; - QT3DSVec2 m_ScaleFactor; - - public: - SLayerRenderHelper(); - - SLayerRenderHelper(const NVRenderRectF &inPresentationViewport, - const NVRenderRectF &inPresentationScissor, - const QT3DSVec2 &inPresentationDesignDimensions, SLayer &inLayer, - bool inOffscreen, qt3ds::render::ScaleModes::Enum inScaleMode, - qt3ds::QT3DSVec2 inScaleFactor); - - NVRenderRectF GetPresentationViewport() const { return m_PresentationViewport; } - NVRenderRectF GetPresentationScissor() const { return m_PresentationScissor; } - QT3DSVec2 GetPresentationDesignDimensions() const { return m_PresentationDesignDimensions; } - SLayer *GetLayer() const { return m_Layer; } - SCamera *GetCamera() const { return m_Camera; } - bool IsOffscreen() const { return m_Offscreen; } - - // Does not differ whether offscreen or not, simply states how this layer maps to the - // presentation - NVRenderRectF GetLayerToPresentationViewport() const { return m_Viewport; } - // Does not differ whether offscreen or not, scissor rect of how this layer maps to - // presentation. - NVRenderRectF GetLayerToPresentationScissorRect() const { return m_Scissor; } - - QSize GetTextureDimensions() const; - - SCameraGlobalCalculationResult SetupCameraForRender(SCamera &inCamera); - - Option<QT3DSVec2> GetLayerMouseCoords(const QT3DSVec2 &inMouseCoords, - const QT3DSVec2 &inWindowDimensions, - bool inForceIntersect) const; - - Option<SRay> GetPickRay(const QT3DSVec2 &inMouseCoords, const QT3DSVec2 &inWindowDimensions, - bool inForceIntersect, bool sceneCameraView = false) const; - - // Checks the various viewports and determines if the layer is visible or not. - bool IsLayerVisible() const; - - private: - // Viewport used when actually rendering. In the case where this is an offscreen item then - // it may be - // different than the layer to presentation viewport. - NVRenderRectF GetLayerRenderViewport() const; - }; -} -} |