Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
qssgrenderableobjects.cpp
Go to the documentation of this file.
1// Copyright (C) 2008-2012 NVIDIA Corporation.
2// Copyright (C) 2019 The Qt Company Ltd.
3// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
4
6
7#include <QtQuick3DRuntimeRender/private/qssgrenderer_p.h>
8#include <QtQuick3DRuntimeRender/private/qssgrhicustommaterialsystem_p.h>
9#include <QtQuick3DRuntimeRender/private/qssgrenderlight_p.h>
10#include <QtQuick3DRuntimeRender/private/qssgrenderdefaultmaterialshadergenerator_p.h>
11
15
18 const QVector3D &inWorldCenterPt,
19 QSSGRenderer *rendr,
20 const QSSGRenderSubset &inSubset,
21 const QSSGModelContext &inModelContext,
22 float inOpacity,
23 quint32 inSubsetLevelOfDetail,
24 const QSSGRenderGraphObject &mat,
25 QSSGRenderableImage *inFirstImage,
27 const QSSGShaderLightListView &inLights)
29 inFlags,
30 inWorldCenterPt,
31 inModelContext.model.globalTransform,
32 inSubset.bounds,
33 inModelContext.model.m_depthBiasSq,
34 inModelContext.model.instancingLodMin,
35 inModelContext.model.instancingLodMax)
36 , subsetLevelOfDetail(inSubsetLevelOfDetail)
37 , renderer(rendr)
38 , modelContext(inModelContext)
39 , subset(inSubset)
40 , opacity(inOpacity)
41 , material(mat)
42 , firstImage(inFirstImage)
43 , shaderDescription(inShaderKey)
44 , lights(inLights)
45{
46 if (mat.type == QSSGRenderGraphObject::Type::CustomMaterial)
47 depthWriteMode = static_cast<const QSSGRenderCustomMaterial *>(&mat)->m_depthDrawMode;
48 else
49 depthWriteMode = static_cast<const QSSGRenderDefaultMaterial *>(&mat)->depthDrawMode;
50
51 const bool modelBlendParticle = (inModelContext.model.particleBuffer != nullptr
52 && inModelContext.model.particleBuffer->particleCount());
53 if (modelBlendParticle)
54 globalBounds = inModelContext.model.particleBuffer->bounds();
55 else
57}
58
60 const QVector3D &inWorldCenterPt,
61 QSSGRenderer *rendr,
62 const QSSGRenderParticles &inParticles,
63 QSSGRenderableImage *inFirstImage,
64 QSSGRenderableImage *inColorTable,
65 const QSSGShaderLightListView &inLights,
66 float inOpacity)
68 inFlags,
69 inWorldCenterPt,
70 inParticles.globalTransform,
71 inParticles.m_particleBuffer.bounds(),
72 inParticles.m_depthBiasSq)
73 , renderer(rendr)
74 , particles(inParticles)
75 , firstImage(inFirstImage)
76 , colorTable(inColorTable)
77 , lights(inLights)
78 , opacity(inOpacity)
79{
80 // Bounds are in global space for _model blend_ particles
81 globalBounds = inParticles.m_particleBuffer.bounds();
82 if (inParticles.type != QSSGRenderParticles::Type::ModelBlendParticle)
84}
85
static QSSGBounds3 transform(const QMatrix3x3 &matrix, const QSSGBounds3 &bounds)
gets the transformed bounds of the passed AABB (resulting in a bigger AABB).
The QVector3D class represents a vector or vertex in 3D space.
Definition qvectornd.h:171
Combined button and popup list for selecting options.
GLenum type
unsigned int quint32
Definition qtypes.h:50
QSqlQueryModel * model
[16]
QSvgRenderer * renderer
[0]
QSSGParticlesRenderable(QSSGRenderableObjectFlags inFlags, const QVector3D &inWorldCenterPt, QSSGRenderer *rendr, const QSSGRenderParticles &inParticles, QSSGRenderableImage *inFirstImage, QSSGRenderableImage *inColorTable, const QSSGShaderLightListView &inLights, float inOpacity)
const QMatrix4x4 & globalTransform
const QSSGShaderLightListView & lights
const QSSGRenderSubset & subset
QSSGShaderDefaultMaterialKey shaderDescription
QSSGRenderableImage * firstImage
QSSGSubsetRenderable(Type type, QSSGRenderableObjectFlags inFlags, const QVector3D &inWorldCenterPt, QSSGRenderer *rendr, const QSSGRenderSubset &inSubset, const QSSGModelContext &inModelContext, float inOpacity, quint32 inSubsetLevelOfDetail, const QSSGRenderGraphObject &mat, QSSGRenderableImage *inFirstImage, QSSGShaderDefaultMaterialKey inShaderKey, const QSSGShaderLightListView &inLights)
const QSSGModelContext & modelContext
const QSSGRenderGraphObject & material
Definition moc.h:23