mirror of https://github.com/qt/qt3d.git
Move defaults and geometries out of Qt3DRender and into Qt3DExtras
QBoundingVolumeDebug has been disabled for now. Will be re-enabled later on. Change-Id: Id6b0abab2ec2aa697330bd20d782f9d104d25d50 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
This commit is contained in:
parent
8677f62fa6
commit
0542f1614a
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
SOURCE += main.cpp
|
||||
|
||||
QT += qml quick 3dcore 3drender 3dinput 3dquick
|
||||
QT += qml quick 3dcore 3drender 3dinput 3dquick 3dextras
|
||||
|
||||
OTHER_FILES += *.qml
|
||||
|
||||
|
|
|
|||
|
|
@ -51,6 +51,7 @@
|
|||
import QtQuick 2.4 as QQ2
|
||||
import Qt3D.Core 2.0
|
||||
import Qt3D.Render 2.0
|
||||
import Qt3D.Extras 2.0
|
||||
|
||||
Entity {
|
||||
id: root
|
||||
|
|
|
|||
|
|
@ -6,6 +6,6 @@ android|ios|tvos|winrt {
|
|||
error( "Couldn't find the examples.pri file!" )
|
||||
}
|
||||
|
||||
QT += widgets 3dcore 3drender 3dinput
|
||||
QT += widgets 3dcore 3drender 3dinput 3dextras
|
||||
|
||||
SOURCES += main.cpp
|
||||
|
|
|
|||
|
|
@ -57,7 +57,7 @@
|
|||
#include <Qt3DInput/QInputAspect>
|
||||
#include <Qt3DRender/QSceneLoader>
|
||||
#include <Qt3DRender/QRenderAspect>
|
||||
#include <Qt3DRender/QForwardRenderer>
|
||||
#include <Qt3DExtras/QForwardRenderer>
|
||||
#include "qt3dwindow.h"
|
||||
#include "qfirstpersoncameracontroller.h"
|
||||
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
SOURCE += main.cpp
|
||||
|
||||
QT += qml quick 3dcore 3drender 3dinput 3dquick
|
||||
QT += qml quick 3dcore 3drender 3dinput 3dquick 3dextras
|
||||
|
||||
OTHER_FILES += main.qml
|
||||
|
||||
|
|
|
|||
|
|
@ -53,6 +53,7 @@ import Qt3D.Core 2.0
|
|||
import Qt3D.Render 2.0
|
||||
import Qt3D.Examples 2.0
|
||||
import Qt3D.Input 2.0
|
||||
import Qt3D.Extras 2.0
|
||||
|
||||
Entity
|
||||
{
|
||||
|
|
|
|||
|
|
@ -65,7 +65,7 @@
|
|||
|
||||
#include <Qt3DInput/QInputAspect>
|
||||
|
||||
#include <Qt3DRender/qtorusmesh.h>
|
||||
#include <Qt3DExtras/qtorusmesh.h>
|
||||
#include <Qt3DRender/qmesh.h>
|
||||
#include <Qt3DRender/qtechnique.h>
|
||||
#include <Qt3DRender/qmaterial.h>
|
||||
|
|
@ -78,7 +78,7 @@
|
|||
#include <Qt3DCore/qaspectengine.h>
|
||||
|
||||
#include <Qt3DRender/qrenderaspect.h>
|
||||
#include <Qt3DRender/qforwardrenderer.h>
|
||||
#include <Qt3DExtras/qforwardrenderer.h>
|
||||
|
||||
#include "qt3dwindow.h"
|
||||
#include "qfirstpersoncameracontroller.h"
|
||||
|
|
|
|||
|
|
@ -58,7 +58,7 @@ SceneModifier::SceneModifier(Qt3DCore::QEntity *rootEntity)
|
|||
|
||||
// Torus shape data
|
||||
//! [0]
|
||||
m_torus = new Qt3DRender::QTorusMesh();
|
||||
m_torus = new Qt3DExtras::QTorusMesh();
|
||||
m_torus->setRadius(1.0f);
|
||||
m_torus->setMinorRadius(0.4f);
|
||||
m_torus->setRings(100);
|
||||
|
|
@ -74,7 +74,7 @@ SceneModifier::SceneModifier(Qt3DCore::QEntity *rootEntity)
|
|||
//! [1]
|
||||
|
||||
//! [2]
|
||||
Qt3DRender::QPhongMaterial *torusMaterial = new Qt3DRender::QPhongMaterial();
|
||||
Qt3DExtras::QPhongMaterial *torusMaterial = new Qt3DExtras::QPhongMaterial();
|
||||
torusMaterial->setDiffuse(QColor(QRgb(0xbeb32b)));
|
||||
//! [2]
|
||||
|
||||
|
|
@ -87,7 +87,7 @@ SceneModifier::SceneModifier(Qt3DCore::QEntity *rootEntity)
|
|||
//! [3]
|
||||
|
||||
// Cone shape data
|
||||
Qt3DRender::QConeMesh *cone = new Qt3DRender::QConeMesh();
|
||||
Qt3DExtras::QConeMesh *cone = new Qt3DExtras::QConeMesh();
|
||||
cone->setTopRadius(0.5);
|
||||
cone->setBottomRadius(1);
|
||||
cone->setLength(3);
|
||||
|
|
@ -100,7 +100,7 @@ SceneModifier::SceneModifier(Qt3DCore::QEntity *rootEntity)
|
|||
coneTransform->setRotation(QQuaternion::fromAxisAndAngle(QVector3D(1.0f, 0.0f, 0.0f), 45.0f));
|
||||
coneTransform->setTranslation(QVector3D(0.0f, 4.0f, -1.5));
|
||||
|
||||
Qt3DRender::QPhongMaterial *coneMaterial = new Qt3DRender::QPhongMaterial();
|
||||
Qt3DExtras::QPhongMaterial *coneMaterial = new Qt3DExtras::QPhongMaterial();
|
||||
coneMaterial->setDiffuse(QColor(QRgb(0x928327)));
|
||||
|
||||
// Cone
|
||||
|
|
@ -110,7 +110,7 @@ SceneModifier::SceneModifier(Qt3DCore::QEntity *rootEntity)
|
|||
m_coneEntity->addComponent(coneTransform);
|
||||
|
||||
// Cylinder shape data
|
||||
Qt3DRender::QCylinderMesh *cylinder = new Qt3DRender::QCylinderMesh();
|
||||
Qt3DExtras::QCylinderMesh *cylinder = new Qt3DExtras::QCylinderMesh();
|
||||
cylinder->setRadius(1);
|
||||
cylinder->setLength(3);
|
||||
cylinder->setRings(100);
|
||||
|
|
@ -122,7 +122,7 @@ SceneModifier::SceneModifier(Qt3DCore::QEntity *rootEntity)
|
|||
cylinderTransform->setRotation(QQuaternion::fromAxisAndAngle(QVector3D(1.0f, 0.0f, 0.0f), 45.0f));
|
||||
cylinderTransform->setTranslation(QVector3D(-5.0f, 4.0f, -1.5));
|
||||
|
||||
Qt3DRender::QPhongMaterial *cylinderMaterial = new Qt3DRender::QPhongMaterial();
|
||||
Qt3DExtras::QPhongMaterial *cylinderMaterial = new Qt3DExtras::QPhongMaterial();
|
||||
cylinderMaterial->setDiffuse(QColor(QRgb(0x928327)));
|
||||
|
||||
// Cylinder
|
||||
|
|
@ -132,14 +132,14 @@ SceneModifier::SceneModifier(Qt3DCore::QEntity *rootEntity)
|
|||
m_cylinderEntity->addComponent(cylinderTransform);
|
||||
|
||||
// Cuboid shape data
|
||||
Qt3DRender::QCuboidMesh *cuboid = new Qt3DRender::QCuboidMesh();
|
||||
Qt3DExtras::QCuboidMesh *cuboid = new Qt3DExtras::QCuboidMesh();
|
||||
|
||||
// CuboidMesh Transform
|
||||
Qt3DCore::QTransform *cuboidTransform = new Qt3DCore::QTransform();
|
||||
cuboidTransform->setScale(4.0f);
|
||||
cuboidTransform->setTranslation(QVector3D(5.0f, -4.0f, 0.0f));
|
||||
|
||||
Qt3DRender::QPhongMaterial *cuboidMaterial = new Qt3DRender::QPhongMaterial();
|
||||
Qt3DExtras::QPhongMaterial *cuboidMaterial = new Qt3DExtras::QPhongMaterial();
|
||||
cuboidMaterial->setDiffuse(QColor(QRgb(0x665423)));
|
||||
|
||||
//Cuboid
|
||||
|
|
@ -149,7 +149,7 @@ SceneModifier::SceneModifier(Qt3DCore::QEntity *rootEntity)
|
|||
m_cuboidEntity->addComponent(cuboidTransform);
|
||||
|
||||
// Plane shape data
|
||||
Qt3DRender::QPlaneMesh *planeMesh = new Qt3DRender::QPlaneMesh();
|
||||
Qt3DExtras::QPlaneMesh *planeMesh = new Qt3DExtras::QPlaneMesh();
|
||||
planeMesh->setWidth(2);
|
||||
planeMesh->setHeight(2);
|
||||
|
||||
|
|
@ -159,7 +159,7 @@ SceneModifier::SceneModifier(Qt3DCore::QEntity *rootEntity)
|
|||
planeTransform->setRotation(QQuaternion::fromAxisAndAngle(QVector3D(1.0f, 0.0f, 0.0f), 45.0f));
|
||||
planeTransform->setTranslation(QVector3D(0.0f, -4.0f, 0.0f));
|
||||
|
||||
Qt3DRender::QPhongMaterial *planeMaterial = new Qt3DRender::QPhongMaterial();
|
||||
Qt3DExtras::QPhongMaterial *planeMaterial = new Qt3DExtras::QPhongMaterial();
|
||||
planeMaterial->setDiffuse(QColor(QRgb(0xa69929)));
|
||||
|
||||
// Plane
|
||||
|
|
@ -169,7 +169,7 @@ SceneModifier::SceneModifier(Qt3DCore::QEntity *rootEntity)
|
|||
m_planeEntity->addComponent(planeTransform);
|
||||
|
||||
// Sphere shape data
|
||||
Qt3DRender::QSphereMesh *sphereMesh = new Qt3DRender::QSphereMesh();
|
||||
Qt3DExtras::QSphereMesh *sphereMesh = new Qt3DExtras::QSphereMesh();
|
||||
sphereMesh->setRings(20);
|
||||
sphereMesh->setSlices(20);
|
||||
sphereMesh->setRadius(2);
|
||||
|
|
@ -180,7 +180,7 @@ SceneModifier::SceneModifier(Qt3DCore::QEntity *rootEntity)
|
|||
sphereTransform->setScale(1.3f);
|
||||
sphereTransform->setTranslation(QVector3D(-5.0f, -4.0f, 0.0f));
|
||||
|
||||
Qt3DRender::QPhongMaterial *sphereMaterial = new Qt3DRender::QPhongMaterial();
|
||||
Qt3DExtras::QPhongMaterial *sphereMaterial = new Qt3DExtras::QPhongMaterial();
|
||||
sphereMaterial->setDiffuse(QColor(QRgb(0xa69929)));
|
||||
|
||||
// Sphere
|
||||
|
|
|
|||
|
|
@ -56,13 +56,13 @@
|
|||
#include <Qt3DCore/qentity.h>
|
||||
#include <Qt3DCore/qtransform.h>
|
||||
|
||||
#include <Qt3DRender/QTorusMesh>
|
||||
#include <Qt3DRender/QConeMesh>
|
||||
#include <Qt3DRender/QCylinderMesh>
|
||||
#include <Qt3DRender/QCuboidMesh>
|
||||
#include <Qt3DRender/QPlaneMesh>
|
||||
#include <Qt3DRender/QSphereMesh>
|
||||
#include <Qt3DRender/QPhongMaterial>
|
||||
#include <Qt3DExtras/QTorusMesh>
|
||||
#include <Qt3DExtras/QConeMesh>
|
||||
#include <Qt3DExtras/QCylinderMesh>
|
||||
#include <Qt3DExtras/QCuboidMesh>
|
||||
#include <Qt3DExtras/QPlaneMesh>
|
||||
#include <Qt3DExtras/QSphereMesh>
|
||||
#include <Qt3DExtras/QPhongMaterial>
|
||||
|
||||
class SceneModifier : public QObject
|
||||
{
|
||||
|
|
@ -82,7 +82,7 @@ public slots:
|
|||
|
||||
private:
|
||||
Qt3DCore::QEntity *m_rootEntity;
|
||||
Qt3DRender::QTorusMesh *m_torus;
|
||||
Qt3DExtras::QTorusMesh *m_torus;
|
||||
Qt3DCore::QEntity *m_coneEntity;
|
||||
Qt3DCore::QEntity *m_cylinderEntity;
|
||||
Qt3DCore::QEntity *m_torusEntity;
|
||||
|
|
|
|||
|
|
@ -51,6 +51,7 @@
|
|||
import Qt3D.Core 2.0
|
||||
import Qt3D.Render 2.0
|
||||
import Qt3D.Input 2.0
|
||||
import Qt3D.Extras 2.0
|
||||
|
||||
Entity {
|
||||
id: root
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
error( "Couldn't find the examples.pri file!" )
|
||||
}
|
||||
|
||||
QT += 3dcore 3drender 3dinput 3dquick qml quick
|
||||
QT += 3dcore 3drender 3dinput 3dquick qml quick 3dextras
|
||||
|
||||
SOURCES += \
|
||||
main.cpp
|
||||
|
|
|
|||
|
|
@ -51,6 +51,7 @@
|
|||
import Qt3D.Core 2.0
|
||||
import Qt3D.Render 2.0
|
||||
import Qt3D.Input 2.0
|
||||
import Qt3D.Extras 2.0
|
||||
import QtQuick 2.2 as QQ2
|
||||
|
||||
Entity {
|
||||
|
|
|
|||
|
|
@ -50,16 +50,16 @@
|
|||
|
||||
#include "entity.h"
|
||||
|
||||
#include <Qt3DRender/QCylinderMesh>
|
||||
#include <Qt3DRender/QPhongMaterial>
|
||||
#include <Qt3DExtras/QCylinderMesh>
|
||||
#include <Qt3DExtras/QPhongMaterial>
|
||||
#include <Qt3DCore/QTransform>
|
||||
#include <QMatrix4x4>
|
||||
|
||||
Entity::Entity(Qt3DCore::QNode *parent)
|
||||
: QEntity(parent)
|
||||
, m_transform(new Qt3DCore::QTransform())
|
||||
, m_mesh(new Qt3DRender::QCylinderMesh())
|
||||
, m_material(new Qt3DRender::QPhongMaterial())
|
||||
, m_mesh(new Qt3DExtras::QCylinderMesh())
|
||||
, m_material(new Qt3DExtras::QPhongMaterial())
|
||||
{
|
||||
m_mesh->setRings(50.0f);
|
||||
m_mesh->setSlices(30.0f);
|
||||
|
|
|
|||
|
|
@ -61,7 +61,7 @@ namespace Qt3DCore {
|
|||
class QTransform;
|
||||
}
|
||||
|
||||
namespace Qt3DRender {
|
||||
namespace Qt3DExtras {
|
||||
class QCylinderMesh;
|
||||
class QPhongMaterial;
|
||||
}
|
||||
|
|
@ -101,8 +101,8 @@ private:
|
|||
|
||||
private:
|
||||
Qt3DCore::QTransform *m_transform;
|
||||
Qt3DRender::QCylinderMesh *m_mesh;
|
||||
Qt3DRender::QPhongMaterial *m_material;
|
||||
Qt3DExtras::QCylinderMesh *m_mesh;
|
||||
Qt3DExtras::QPhongMaterial *m_material;
|
||||
float m_theta;
|
||||
float m_phi;
|
||||
QVector3D m_position;
|
||||
|
|
|
|||
|
|
@ -61,11 +61,11 @@
|
|||
#include <Qt3DCore/qaspectengine.h>
|
||||
#include <Qt3DInput/QInputAspect>
|
||||
#include <Qt3DRender/QParameter>
|
||||
#include <Qt3DRender/QCylinderMesh>
|
||||
#include <Qt3DExtras//QCylinderMesh>
|
||||
#include <Qt3DRender/QRenderAspect>
|
||||
#include <Qt3DRender/QCameraSelector>
|
||||
#include <Qt3DRender/QPhongMaterial>
|
||||
#include <Qt3DRender/QForwardRenderer>
|
||||
#include <Qt3DExtras/QPhongMaterial>
|
||||
#include <Qt3DExtras/QForwardRenderer>
|
||||
#include <qmath.h>
|
||||
#include "qt3dwindow.h"
|
||||
#include "qfirstpersoncameracontroller.h"
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
error( "Couldn't find the examples.pri file!" )
|
||||
}
|
||||
|
||||
QT += qml quick 3dcore 3drender 3dinput 3dquick
|
||||
QT += qml quick 3dcore 3drender 3dinput 3dquick 3dextras
|
||||
|
||||
SOURCES += \
|
||||
main.cpp
|
||||
|
|
|
|||
|
|
@ -52,6 +52,7 @@ import Qt3D.Core 2.0
|
|||
import Qt3D.Render 2.0
|
||||
import QtQuick 2.2 as QQ2
|
||||
import Qt3D.Input 2.0
|
||||
import Qt3D.Extras 2.0
|
||||
|
||||
Entity {
|
||||
id: sceneRoot
|
||||
|
|
|
|||
|
|
@ -54,6 +54,7 @@ import Qt3D.Render 2.0
|
|||
Viewport {
|
||||
property alias camera: cameraSelector.camera
|
||||
property alias window: surfaceSelector.surface
|
||||
property alias clearColor: clearBuffer.clearColor
|
||||
|
||||
RenderSurfaceSelector {
|
||||
id: surfaceSelector
|
||||
|
|
@ -76,6 +77,7 @@ Viewport {
|
|||
// Fills depth buffer for entities that are clipped
|
||||
layers: ["content", "visualization"]
|
||||
ClearBuffers {
|
||||
id: clearBuffer
|
||||
buffers: ClearBuffers.ColorDepthBuffer
|
||||
RenderPassFilter {
|
||||
matchAny: FilterKey { name: "pass"; value: "material" }
|
||||
|
|
|
|||
|
|
@ -50,6 +50,7 @@
|
|||
|
||||
import Qt3D.Core 2.0
|
||||
import Qt3D.Render 2.0
|
||||
import Qt3D.Extras 2.0
|
||||
|
||||
Entity {
|
||||
id: root
|
||||
|
|
|
|||
|
|
@ -51,6 +51,7 @@
|
|||
import QtQuick 2.4 as QQ2
|
||||
import Qt3D.Core 2.0
|
||||
import Qt3D.Render 2.0
|
||||
import Qt3D.Extras 2.0
|
||||
|
||||
Entity {
|
||||
id: root
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
error( "Couldn't find the examples.pri file!" )
|
||||
}
|
||||
|
||||
QT += qml quick 3dcore 3drender 3dinput 3dquick
|
||||
QT += qml quick 3dcore 3drender 3dinput 3dquick 3dextras
|
||||
|
||||
SOURCES += main.cpp
|
||||
|
||||
|
|
|
|||
|
|
@ -51,9 +51,9 @@
|
|||
#include <QGuiApplication>
|
||||
|
||||
#include <Qt3DRender/qcamera.h>
|
||||
#include <Qt3DRender/qcylindermesh.h>
|
||||
#include <Qt3DRender/qspheremesh.h>
|
||||
#include <Qt3DRender/qphongmaterial.h>
|
||||
#include <Qt3DExtras/qcylindermesh.h>
|
||||
#include <Qt3DExtras/qspheremesh.h>
|
||||
#include <Qt3DExtras/qphongmaterial.h>
|
||||
|
||||
#include <Qt3DCore/qentity.h>
|
||||
#include <Qt3DCore/qtransform.h>
|
||||
|
|
@ -121,14 +121,14 @@ int main(int argc, char **argv)
|
|||
cameraController->setCamera(camera);
|
||||
|
||||
// Cylinder mesh data
|
||||
Qt3DRender::QCylinderMesh *cylinderMesh = new Qt3DRender::QCylinderMesh();
|
||||
Qt3DExtras::QCylinderMesh *cylinderMesh = new Qt3DExtras::QCylinderMesh();
|
||||
cylinderMesh->setRadius(1);
|
||||
cylinderMesh->setLength(3);
|
||||
cylinderMesh->setRings(5);
|
||||
cylinderMesh->setSlices(40);
|
||||
|
||||
// Sphere mesh data
|
||||
Qt3DRender::QSphereMesh *sphereMesh = new Qt3DRender::QSphereMesh();
|
||||
Qt3DExtras::QSphereMesh *sphereMesh = new Qt3DExtras::QSphereMesh();
|
||||
sphereMesh->setRings(20);
|
||||
sphereMesh->setSlices(40);
|
||||
|
||||
|
|
@ -138,7 +138,7 @@ int main(int argc, char **argv)
|
|||
transform->setRotation(QQuaternion::fromAxisAndAngle(QVector3D(1, 0, 0), 45.0f));
|
||||
|
||||
// Material
|
||||
Qt3DRender::QPhongMaterial *material = new Qt3DRender::QPhongMaterial(rootEntity);
|
||||
Qt3DExtras::QPhongMaterial *material = new Qt3DExtras::QPhongMaterial(rootEntity);
|
||||
material->setDiffuse(Qt::red);
|
||||
|
||||
// Cylinder
|
||||
|
|
|
|||
|
|
@ -50,6 +50,7 @@
|
|||
|
||||
import Qt3D.Core 2.0
|
||||
import Qt3D.Render 2.0
|
||||
import Qt3D.Extras 2.0
|
||||
|
||||
Entity {
|
||||
property alias particleStep: computeMaterial.particleStep
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
error( "Couldn't find the examples.pri file!" )
|
||||
}
|
||||
|
||||
QT += 3dcore 3drender 3dquick 3dinput quick qml
|
||||
QT += 3dcore 3drender 3dquick 3dinput quick qml 3dextras
|
||||
|
||||
HEADERS += \
|
||||
|
||||
|
|
|
|||
|
|
@ -51,6 +51,7 @@
|
|||
import Qt3D.Core 2.0
|
||||
import Qt3D.Render 2.0
|
||||
import QtQuick 2.0
|
||||
import Qt3D.Extras 2.0
|
||||
|
||||
Entity {
|
||||
id: sceneRoot
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
error( "Couldn't find the examples.pri file!" )
|
||||
}
|
||||
|
||||
QT += 3dcore 3drender 3dinput
|
||||
QT += 3dcore 3drender 3dinput 3dextras
|
||||
|
||||
SOURCES += main.cpp
|
||||
|
||||
|
|
|
|||
|
|
@ -58,7 +58,7 @@
|
|||
|
||||
#include <Qt3DInput/QInputAspect>
|
||||
|
||||
#include <Qt3DRender/qtorusmesh.h>
|
||||
#include <Qt3DExtras//qtorusmesh.h>
|
||||
#include <Qt3DRender/qmesh.h>
|
||||
#include <Qt3DRender/qtechnique.h>
|
||||
#include <Qt3DRender/qmaterial.h>
|
||||
|
|
@ -88,7 +88,7 @@ int main(int ac, char **av)
|
|||
Qt3DCore::QEntity *torusEntity = new Qt3DCore::QEntity(rootEntity);
|
||||
|
||||
// Torus shape data
|
||||
Qt3DRender::QTorusMesh *torus = new Qt3DRender::QTorusMesh();
|
||||
Qt3DExtras::QTorusMesh *torus = new Qt3DExtras::QTorusMesh();
|
||||
torus->setRadius(40);
|
||||
torus->setMinorRadius(15);
|
||||
|
||||
|
|
|
|||
|
|
@ -60,8 +60,8 @@
|
|||
|
||||
#include <Qt3DRender/QRenderStateSet>
|
||||
#include <Qt3DRender/QRenderAspect>
|
||||
#include <Qt3DRender/QForwardRenderer>
|
||||
#include <Qt3DRender/QPerVertexColorMaterial>
|
||||
#include <Qt3DExtras/QForwardRenderer>
|
||||
#include <Qt3DExtras/QPerVertexColorMaterial>
|
||||
|
||||
#include <Qt3DRender/QGeometryRenderer>
|
||||
#include <Qt3DRender/QGeometry>
|
||||
|
|
@ -94,7 +94,7 @@ int main(int argc, char* argv[])
|
|||
camController->setCamera(cameraEntity);
|
||||
|
||||
// Material
|
||||
Qt3DRender::QMaterial *material = new Qt3DRender::QPerVertexColorMaterial(rootEntity);
|
||||
Qt3DRender::QMaterial *material = new Qt3DExtras::QPerVertexColorMaterial(rootEntity);
|
||||
|
||||
// Torus
|
||||
Qt3DCore::QEntity *customMeshEntity = new Qt3DCore::QEntity(rootEntity);
|
||||
|
|
|
|||
|
|
@ -52,6 +52,7 @@ import QtQuick 2.2 as QQ2
|
|||
import Qt3D.Core 2.0
|
||||
import Qt3D.Render 2.0
|
||||
import Qt3D.Input 2.0
|
||||
import Qt3D.Extras 2.0
|
||||
|
||||
Entity {
|
||||
id: sceneRoot
|
||||
|
|
|
|||
|
|
@ -54,15 +54,15 @@
|
|||
|
||||
#include <Qt3DRender/qcamera.h>
|
||||
#include <Qt3DRender/qcameralens.h>
|
||||
#include <Qt3DRender/qcylindermesh.h>
|
||||
#include <Qt3DExtras/qcylindermesh.h>
|
||||
#include <Qt3DRender/qmesh.h>
|
||||
#include <Qt3DRender/qtechnique.h>
|
||||
#include <Qt3DRender/qphongmaterial.h>
|
||||
#include <Qt3DExtras/qphongmaterial.h>
|
||||
#include <Qt3DRender/qeffect.h>
|
||||
#include <Qt3DRender/qtexture.h>
|
||||
#include <Qt3DRender/qrenderpass.h>
|
||||
#include <Qt3DRender/qrenderaspect.h>
|
||||
#include <Qt3DRender/qforwardrenderer.h>
|
||||
#include <Qt3DExtras/qforwardrenderer.h>
|
||||
|
||||
#include <Qt3DCore/qentity.h>
|
||||
#include <Qt3DCore/qtransform.h>
|
||||
|
|
@ -91,7 +91,7 @@ int main(int argc, char **argv)
|
|||
cameraController->setCamera(camera);
|
||||
|
||||
// Cylinder shape data
|
||||
Qt3DRender::QCylinderMesh *mesh = new Qt3DRender::QCylinderMesh();
|
||||
Qt3DExtras::QCylinderMesh *mesh = new Qt3DExtras::QCylinderMesh();
|
||||
mesh->setRadius(1);
|
||||
mesh->setLength(3);
|
||||
mesh->setRings(100);
|
||||
|
|
@ -103,7 +103,7 @@ int main(int argc, char **argv)
|
|||
transform->setRotation(QQuaternion::fromAxisAndAngle(QVector3D(1, 0, 0), 45.0f));
|
||||
|
||||
// Material
|
||||
Qt3DRender::QPhongMaterial *material = new Qt3DRender::QPhongMaterial(rootEntity);
|
||||
Qt3DExtras::QPhongMaterial *material = new Qt3DExtras::QPhongMaterial(rootEntity);
|
||||
material->setDiffuse(Qt::red);
|
||||
|
||||
// Cylinder
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
error( "Couldn't find the examples.pri file!" )
|
||||
}
|
||||
|
||||
QT += 3dcore 3drender 3dinput 3dquick qml quick
|
||||
QT += 3dcore 3drender 3dinput 3dquick qml quick 3dextras
|
||||
|
||||
SOURCES += \
|
||||
main.cpp
|
||||
|
|
|
|||
|
|
@ -51,6 +51,7 @@
|
|||
import Qt3D.Core 2.0
|
||||
import Qt3D.Render 2.0
|
||||
import Qt3D.Input 2.0
|
||||
import Qt3D.Extras 2.0
|
||||
|
||||
Entity {
|
||||
id: sceneRoot
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
error( "Couldn't find the examples.pri file!" )
|
||||
}
|
||||
|
||||
QT += 3dcore 3drender 3dinput
|
||||
QT += 3dcore 3drender 3dinput 3dextras
|
||||
|
||||
HEADERS += \
|
||||
gbuffer.h \
|
||||
|
|
|
|||
|
|
@ -51,8 +51,8 @@
|
|||
#include <Qt3DCore/QEntity>
|
||||
|
||||
#include <Qt3DRender/QMaterial>
|
||||
#include <Qt3DRender/QSphereMesh>
|
||||
#include <Qt3DRender/QPlaneMesh>
|
||||
#include <Qt3DExtras//QSphereMesh>
|
||||
#include <Qt3DExtras//QPlaneMesh>
|
||||
#include <Qt3DRender/QLayer>
|
||||
#include <Qt3DRender/QParameter>
|
||||
#include <Qt3DRender/QCamera>
|
||||
|
|
@ -87,7 +87,7 @@ int main(int ac, char **av)
|
|||
FinalEffect *finalEffect = new FinalEffect();
|
||||
SceneEffect *sceneEffect = new SceneEffect();
|
||||
|
||||
Qt3DRender::QSphereMesh *sphereMesh = new Qt3DRender::QSphereMesh();
|
||||
Qt3DExtras::QSphereMesh *sphereMesh = new Qt3DExtras::QSphereMesh();
|
||||
sphereMesh->setRings(50);
|
||||
sphereMesh->setSlices(100);
|
||||
|
||||
|
|
@ -97,7 +97,7 @@ int main(int ac, char **av)
|
|||
Qt3DRender::QLayer *quadLayer = new Qt3DRender::QLayer();
|
||||
quadLayer->setNames(QStringList("screenQuad"));
|
||||
|
||||
Qt3DRender::QPlaneMesh *planeMesh = new Qt3DRender::QPlaneMesh();
|
||||
Qt3DExtras::QPlaneMesh *planeMesh = new Qt3DExtras::QPlaneMesh();
|
||||
planeMesh->setMeshResolution(QSize(2, 2));
|
||||
planeMesh->setWidth(2.0f);
|
||||
planeMesh->setHeight(2.0f);
|
||||
|
|
|
|||
|
|
@ -52,6 +52,7 @@ import QtQuick 2.0 as QQ2
|
|||
import Qt3D.Core 2.0
|
||||
import Qt3D.Render 2.0
|
||||
import Qt3D.Input 2.0
|
||||
import Qt3D.Extras 2.0
|
||||
|
||||
Entity {
|
||||
id : root
|
||||
|
|
|
|||
|
|
@ -55,8 +55,8 @@
|
|||
BoxEntity::BoxEntity(QNode *parent)
|
||||
: Qt3DCore::QEntity(parent)
|
||||
, m_transform(new Qt3DCore::QTransform())
|
||||
, m_mesh(new Qt3DRender::QCuboidMesh())
|
||||
, m_material(new Qt3DRender::QPhongMaterial())
|
||||
, m_mesh(new Qt3DExtras::QCuboidMesh())
|
||||
, m_material(new Qt3DExtras::QPhongMaterial())
|
||||
, m_angle(0.0f)
|
||||
, m_radius(1.0f)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -53,8 +53,8 @@
|
|||
|
||||
#include <Qt3DCore/QEntity>
|
||||
#include <Qt3DCore/QTransform>
|
||||
#include <Qt3DRender/QCuboidMesh>
|
||||
#include <Qt3DRender/QPhongMaterial>
|
||||
#include <Qt3DExtras/QCuboidMesh>
|
||||
#include <Qt3DExtras/QPhongMaterial>
|
||||
|
||||
class BoxEntity : public Qt3DCore::QEntity
|
||||
{
|
||||
|
|
@ -85,8 +85,8 @@ private:
|
|||
void updateTransformation();
|
||||
|
||||
Qt3DCore::QTransform *m_transform;
|
||||
Qt3DRender::QCuboidMesh *m_mesh;
|
||||
Qt3DRender::QPhongMaterial *m_material;
|
||||
Qt3DExtras::QCuboidMesh *m_mesh;
|
||||
Qt3DExtras::QPhongMaterial *m_material;
|
||||
float m_angle;
|
||||
float m_radius;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@
|
|||
#include <Qt3DInput/QInputAspect>
|
||||
|
||||
#include <Qt3DRender/QRenderAspect>
|
||||
#include <Qt3DRender/QForwardRenderer>
|
||||
#include <Qt3DExtras/QForwardRenderer>
|
||||
|
||||
#include "examplescene.h"
|
||||
#include "qt3dwindow.h"
|
||||
|
|
|
|||
|
|
@ -50,6 +50,7 @@
|
|||
|
||||
import Qt3D.Core 2.0
|
||||
import Qt3D.Render 2.0
|
||||
import Qt3D.Extras 2.0
|
||||
import QtQuick 2.0 as QQ2
|
||||
|
||||
Entity {
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
QT += 3dcore 3drender 3dinput 3dlogic qml
|
||||
QT += 3dcore 3drender 3dinput 3dlogic qml 3dextras
|
||||
|
||||
INCLUDEPATH += $$PWD
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
TEMPLATE = lib
|
||||
CONFIG += staticlib
|
||||
TARGET = examples-common
|
||||
QT += core-private 3dcore 3dcore-private 3drender 3dinput 3dlogic qml quick
|
||||
QT += core-private 3dcore 3dcore-private 3drender 3dinput 3dlogic qml quick 3dextras
|
||||
|
||||
SOURCES += \
|
||||
qfirstpersoncameracontroller.cpp \
|
||||
|
|
@ -9,6 +9,7 @@ SOURCES += \
|
|||
qt3dwindow.cpp \
|
||||
qt3dquickwindow.cpp
|
||||
|
||||
|
||||
HEADERS += \
|
||||
qfirstpersoncameracontroller.h \
|
||||
qfirstpersoncameracontroller_p.h \
|
||||
|
|
@ -17,7 +18,6 @@ HEADERS += \
|
|||
qt3dwindow.h \
|
||||
qt3dquickwindow.h
|
||||
|
||||
|
||||
QML_FILES = \
|
||||
$$PWD/OrbitController.qml \
|
||||
$$PWD/FirstPersonCameraController.qml
|
||||
|
|
|
|||
|
|
@ -50,7 +50,7 @@
|
|||
|
||||
#include "qt3dwindow.h"
|
||||
|
||||
#include <Qt3DRender/qforwardrenderer.h>
|
||||
#include <Qt3DExtras/qforwardrenderer.h>
|
||||
#include <Qt3DRender/qrendersettings.h>
|
||||
#include <Qt3DRender/qrenderaspect.h>
|
||||
#include <Qt3DInput/qinputaspect.h>
|
||||
|
|
@ -72,7 +72,7 @@ Qt3DWindow::Qt3DWindow(QScreen *screen)
|
|||
, m_inputAspect(new Qt3DInput::QInputAspect)
|
||||
, m_logicAspect(new Qt3DLogic::QLogicAspect)
|
||||
, m_renderSettings(new Qt3DRender::QRenderSettings)
|
||||
, m_forwardRenderer(new Qt3DRender::QForwardRenderer)
|
||||
, m_forwardRenderer(new Qt3DExtras::QForwardRenderer)
|
||||
, m_defaultCamera(new Qt3DRender::QCamera)
|
||||
, m_inputSettings(new Qt3DInput::QInputSettings)
|
||||
, m_root(new Qt3DCore::QEntity)
|
||||
|
|
@ -141,7 +141,7 @@ Qt3DRender::QFrameGraphNode *Qt3DWindow::activeFrameGraph() const
|
|||
return m_renderSettings->activeFrameGraph();
|
||||
}
|
||||
|
||||
Qt3DRender::QForwardRenderer *Qt3DWindow::defaultFramegraph() const
|
||||
Qt3DExtras::QForwardRenderer *Qt3DWindow::defaultFramegraph() const
|
||||
{
|
||||
return m_forwardRenderer;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -64,11 +64,14 @@ class QEntity;
|
|||
namespace Qt3DRender {
|
||||
class QCamera;
|
||||
class QFrameGraphNode;
|
||||
class QForwardRenderer;
|
||||
class QRenderAspect;
|
||||
class QRenderSettings;
|
||||
}
|
||||
|
||||
namespace Qt3DExtras {
|
||||
class QForwardRenderer;
|
||||
}
|
||||
|
||||
namespace Qt3DInput {
|
||||
class QInputAspect;
|
||||
class QInputSettings;
|
||||
|
|
@ -92,7 +95,7 @@ public:
|
|||
|
||||
void setActiveFrameGraph(Qt3DRender::QFrameGraphNode *activeFrameGraph);
|
||||
Qt3DRender::QFrameGraphNode *activeFrameGraph() const;
|
||||
Qt3DRender::QForwardRenderer *defaultFramegraph() const;
|
||||
Qt3DExtras::QForwardRenderer *defaultFramegraph() const;
|
||||
|
||||
Qt3DRender::QCamera *camera() const;
|
||||
|
||||
|
|
@ -114,7 +117,7 @@ private:
|
|||
|
||||
// Renderer configuration
|
||||
Qt3DRender::QRenderSettings *m_renderSettings;
|
||||
Qt3DRender::QForwardRenderer *m_forwardRenderer;
|
||||
Qt3DExtras::QForwardRenderer *m_forwardRenderer;
|
||||
Qt3DRender::QCamera *m_defaultCamera;
|
||||
|
||||
// Input configuration
|
||||
|
|
|
|||
|
|
@ -50,6 +50,7 @@
|
|||
|
||||
import Qt3D.Core 2.0
|
||||
import Qt3D.Render 2.0
|
||||
import Qt3D.Extras 2.0
|
||||
|
||||
Entity {
|
||||
id: root
|
||||
|
|
|
|||
|
|
@ -51,6 +51,7 @@
|
|||
import Qt3D.Core 2.0
|
||||
import Qt3D.Render 2.0
|
||||
import Qt3D.Input 2.0
|
||||
import Qt3D.Extras 2.0
|
||||
import QtQuick 2.2 as QQ2
|
||||
|
||||
Entity {
|
||||
|
|
|
|||
|
|
@ -57,7 +57,7 @@ static const int colCount = 20;
|
|||
static const int maxInstanceCount = rowCount * colCount;
|
||||
|
||||
InstanceBuffer::InstanceBuffer(Qt3DCore::QNode *parent)
|
||||
: Qt3DRender::QBuffer(QBuffer::VertexBuffer, parent)
|
||||
: Qt3DRender::QBuffer(Qt3DRender::QBuffer::VertexBuffer, parent)
|
||||
, m_instanceCount(maxInstanceCount)
|
||||
{
|
||||
// Create some per instance data - position of each instance
|
||||
|
|
|
|||
|
|
@ -51,6 +51,7 @@
|
|||
import Qt3D.Core 2.0
|
||||
import Qt3D.Render 2.0
|
||||
import Qt3D.Input 2.0
|
||||
import Qt3D.Extras 2.0
|
||||
import QtQuick 2.2 as QQ2
|
||||
|
||||
Entity {
|
||||
|
|
|
|||
|
|
@ -52,6 +52,7 @@ import Qt3D.Core 2.0
|
|||
import Qt3D.Render 2.0
|
||||
import Qt3D.Input 2.0
|
||||
import QtQuick 2.3 as QQ2
|
||||
import Qt3D.Extras 2.0
|
||||
|
||||
Entity {
|
||||
id: root
|
||||
|
|
|
|||
|
|
@ -51,6 +51,7 @@
|
|||
import Qt3D.Core 2.0
|
||||
import Qt3D.Render 2.0
|
||||
import Qt3D.Input 2.0
|
||||
import Qt3D.Extras 2.0
|
||||
|
||||
Entity {
|
||||
id: root
|
||||
|
|
|
|||
|
|
@ -50,6 +50,7 @@
|
|||
|
||||
import Qt3D.Core 2.0
|
||||
import Qt3D.Render 2.0
|
||||
import Qt3D.Extras 2.0
|
||||
|
||||
Entity {
|
||||
id: root
|
||||
|
|
|
|||
|
|
@ -51,6 +51,7 @@
|
|||
import QtQuick 2.0 as Quick
|
||||
import Qt3D.Core 2.0
|
||||
import Qt3D.Render 2.0
|
||||
import Qt3D.Extras 2.0
|
||||
|
||||
Entity
|
||||
{
|
||||
|
|
|
|||
|
|
@ -51,6 +51,7 @@
|
|||
import QtQuick 2.4 as QQ2
|
||||
import Qt3D.Core 2.0
|
||||
import Qt3D.Render 2.0
|
||||
import Qt3D.Extras 2.0
|
||||
|
||||
Entity {
|
||||
components: [ mesh, phongMaterial, transform ]
|
||||
|
|
|
|||
|
|
@ -51,6 +51,7 @@
|
|||
import QtQuick 2.4 as QQ2
|
||||
import Qt3D.Core 2.0
|
||||
import Qt3D.Render 2.0
|
||||
import Qt3D.Extras 2.0
|
||||
|
||||
Entity {
|
||||
components: [ mesh, material, transform ]
|
||||
|
|
|
|||
|
|
@ -52,6 +52,7 @@ import QtQuick 2.2 as QQ2
|
|||
import Qt3D.Core 2.0
|
||||
import Qt3D.Render 2.0
|
||||
import Qt3D.Input 2.0
|
||||
import Qt3D.Extras 2.0
|
||||
|
||||
Entity {
|
||||
id: sceneRoot
|
||||
|
|
|
|||
|
|
@ -76,7 +76,7 @@ Barrel::Barrel(Qt3DCore::QNode *parent)
|
|||
, m_bumps(NoBumps)
|
||||
, m_diffuseColor(Red)
|
||||
, m_specularColor(None)
|
||||
, m_material(new Qt3DRender::QNormalDiffuseSpecularMapMaterial())
|
||||
, m_material(new Qt3DExtras::QNormalDiffuseSpecularMapMaterial())
|
||||
, m_diffuseTexture(m_material->diffuse())
|
||||
, m_normalTexture(m_material->normal())
|
||||
, m_specularTexture(m_material->specular())
|
||||
|
|
|
|||
|
|
@ -51,7 +51,7 @@
|
|||
#ifndef BARREL_H
|
||||
#define BARREL_H
|
||||
|
||||
#include <Qt3DRender/QNormalDiffuseSpecularMapMaterial>
|
||||
#include <Qt3DExtras/QNormalDiffuseSpecularMapMaterial>
|
||||
#include <Qt3DRender/qtexture.h>
|
||||
#include "renderableentity.h"
|
||||
|
||||
|
|
@ -96,7 +96,7 @@ private:
|
|||
Bumps m_bumps;
|
||||
DiffuseColor m_diffuseColor;
|
||||
SpecularColor m_specularColor;
|
||||
Qt3DRender::QNormalDiffuseSpecularMapMaterial *m_material;
|
||||
Qt3DExtras::QNormalDiffuseSpecularMapMaterial *m_material;
|
||||
Qt3DRender::QAbstractTexture *m_diffuseTexture;
|
||||
Qt3DRender::QAbstractTexture *m_normalTexture;
|
||||
Qt3DRender::QAbstractTexture *m_specularTexture;
|
||||
|
|
|
|||
|
|
@ -72,9 +72,9 @@ HousePlant::HousePlant(Qt3DCore::QNode *parent)
|
|||
, m_pot(new RenderableEntity(this))
|
||||
, m_plant(new RenderableEntity(m_pot))
|
||||
, m_cover(new RenderableEntity(m_pot))
|
||||
, m_potMaterial(new Qt3DRender::QNormalDiffuseMapMaterial())
|
||||
, m_plantMaterial(new Qt3DRender::QNormalDiffuseMapAlphaMaterial())
|
||||
, m_coverMaterial(new Qt3DRender::QNormalDiffuseMapMaterial())
|
||||
, m_potMaterial(new Qt3DExtras::QNormalDiffuseMapMaterial())
|
||||
, m_plantMaterial(new Qt3DExtras::QNormalDiffuseMapAlphaMaterial())
|
||||
, m_coverMaterial(new Qt3DExtras::QNormalDiffuseMapMaterial())
|
||||
, m_potImage(new Qt3DRender::QTextureImage())
|
||||
, m_potNormalImage(new Qt3DRender::QTextureImage())
|
||||
, m_plantImage(new Qt3DRender::QTextureImage())
|
||||
|
|
|
|||
|
|
@ -53,8 +53,8 @@
|
|||
|
||||
#include "renderableentity.h"
|
||||
#include <QEntity>
|
||||
#include <QNormalDiffuseMapAlphaMaterial>
|
||||
#include <QNormalDiffuseMapMaterial>
|
||||
#include <Qt3DExtras/QNormalDiffuseMapAlphaMaterial>
|
||||
#include <Qt3DExtras/QNormalDiffuseMapMaterial>
|
||||
#include <QTextureImage>
|
||||
|
||||
class HousePlant : public Qt3DCore::QEntity
|
||||
|
|
@ -96,9 +96,9 @@ private:
|
|||
RenderableEntity *m_plant;
|
||||
RenderableEntity *m_cover;
|
||||
|
||||
Qt3DRender::QNormalDiffuseMapMaterial *m_potMaterial;
|
||||
Qt3DRender::QNormalDiffuseMapAlphaMaterial *m_plantMaterial;
|
||||
Qt3DRender::QNormalDiffuseMapMaterial *m_coverMaterial;
|
||||
Qt3DExtras::QNormalDiffuseMapMaterial *m_potMaterial;
|
||||
Qt3DExtras::QNormalDiffuseMapAlphaMaterial *m_plantMaterial;
|
||||
Qt3DExtras::QNormalDiffuseMapMaterial *m_coverMaterial;
|
||||
|
||||
Qt3DRender::QTextureImage *m_potImage;
|
||||
Qt3DRender::QTextureImage *m_potNormalImage;
|
||||
|
|
|
|||
|
|
@ -57,9 +57,9 @@
|
|||
#include <Qt3DInput/QInputAspect>
|
||||
|
||||
#include <Qt3DRender/QRenderAspect>
|
||||
#include <Qt3DRender/QPhongMaterial>
|
||||
#include <Qt3DRender/QDiffuseMapMaterial>
|
||||
#include <Qt3DRender/QForwardRenderer>
|
||||
#include <Qt3DExtras/QPhongMaterial>
|
||||
#include <Qt3DExtras/QDiffuseMapMaterial>
|
||||
#include <Qt3DExtras/QForwardRenderer>
|
||||
#include <Qt3DRender/QTextureImage>
|
||||
|
||||
#include "planeentity.h"
|
||||
|
|
@ -95,7 +95,7 @@ int main(int argc, char* argv[])
|
|||
planeEntity->mesh()->setWidth(100.0f);
|
||||
planeEntity->mesh()->setMeshResolution(QSize(20, 20));
|
||||
|
||||
Qt3DRender::QNormalDiffuseSpecularMapMaterial *normalDiffuseSpecularMapMaterial = new Qt3DRender::QNormalDiffuseSpecularMapMaterial();
|
||||
Qt3DExtras::QNormalDiffuseSpecularMapMaterial *normalDiffuseSpecularMapMaterial = new Qt3DExtras::QNormalDiffuseSpecularMapMaterial();
|
||||
normalDiffuseSpecularMapMaterial->setTextureScale(10.0f);
|
||||
normalDiffuseSpecularMapMaterial->setShininess(80.0f);
|
||||
normalDiffuseSpecularMapMaterial->setAmbient(QColor::fromRgbF(0.2f, 0.2f, 0.2f, 1.0f));
|
||||
|
|
@ -118,7 +118,7 @@ int main(int argc, char* argv[])
|
|||
RenderableEntity *chest = new RenderableEntity(sceneRoot);
|
||||
chest->transform()->setScale(0.03f);
|
||||
chest->mesh()->setSource(QUrl(QStringLiteral("qrc:/assets/chest/Chest.obj")));
|
||||
Qt3DRender::QDiffuseMapMaterial *diffuseMapMaterial = new Qt3DRender::QDiffuseMapMaterial();
|
||||
Qt3DExtras::QDiffuseMapMaterial *diffuseMapMaterial = new Qt3DExtras::QDiffuseMapMaterial();
|
||||
diffuseMapMaterial->setSpecular(QColor::fromRgbF(0.2f, 0.2f, 0.2f, 1.0f));
|
||||
diffuseMapMaterial->setShininess(2.0f);
|
||||
|
||||
|
|
@ -133,7 +133,7 @@ int main(int argc, char* argv[])
|
|||
RotatingTrefoilKnot *trefoil = new RotatingTrefoilKnot(sceneRoot);
|
||||
trefoil->setPosition(QVector3D(0.0f, 3.5f, 0.0f));
|
||||
trefoil->setScale(0.5f);
|
||||
Qt3DRender::QPhongMaterial *phongMaterial = new Qt3DRender::QPhongMaterial();
|
||||
Qt3DExtras::QPhongMaterial *phongMaterial = new Qt3DExtras::QPhongMaterial();
|
||||
phongMaterial->setDiffuse(QColor(204, 205, 75)); // Safari Yellow #cccd4b
|
||||
phongMaterial->setSpecular(Qt::white);
|
||||
trefoil->addComponent(phongMaterial);
|
||||
|
|
|
|||
|
|
@ -50,12 +50,12 @@
|
|||
|
||||
#include "planeentity.h"
|
||||
|
||||
#include <Qt3DRender/QPlaneMesh>
|
||||
#include <Qt3DExtras/QPlaneMesh>
|
||||
#include <Qt3DCore/QTransform>
|
||||
|
||||
PlaneEntity::PlaneEntity(Qt3DCore::QNode *parent)
|
||||
: Qt3DCore::QEntity(new Qt3DCore::QEntity(parent))
|
||||
, m_mesh(new Qt3DRender::QPlaneMesh())
|
||||
, m_mesh(new Qt3DExtras::QPlaneMesh())
|
||||
, m_transform(new Qt3DCore::QTransform())
|
||||
{
|
||||
addComponent(m_mesh);
|
||||
|
|
@ -66,7 +66,7 @@ PlaneEntity::~PlaneEntity()
|
|||
{
|
||||
}
|
||||
|
||||
Qt3DRender::QPlaneMesh *PlaneEntity::mesh() const
|
||||
Qt3DExtras::QPlaneMesh *PlaneEntity::mesh() const
|
||||
{
|
||||
return m_mesh;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@
|
|||
|
||||
#include <Qt3DCore/QEntity>
|
||||
#include <Qt3DCore/QTransform>
|
||||
#include <Qt3DRender/QPlaneMesh>
|
||||
#include <Qt3DExtras/QPlaneMesh>
|
||||
|
||||
class PlaneEntity : public Qt3DCore::QEntity
|
||||
{
|
||||
|
|
@ -61,10 +61,10 @@ public:
|
|||
PlaneEntity(Qt3DCore::QNode *parent = 0);
|
||||
~PlaneEntity();
|
||||
|
||||
Qt3DRender::QPlaneMesh *mesh() const;
|
||||
Qt3DExtras::QPlaneMesh *mesh() const;
|
||||
|
||||
private:
|
||||
Qt3DRender::QPlaneMesh *m_mesh;
|
||||
Qt3DExtras::QPlaneMesh *m_mesh;
|
||||
Qt3DCore::QTransform *m_transform;
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -50,6 +50,7 @@
|
|||
|
||||
import Qt3D.Core 2.0
|
||||
import Qt3D.Render 2.0
|
||||
import Qt3D.Extras 2.0
|
||||
|
||||
Entity {
|
||||
id: root
|
||||
|
|
|
|||
|
|
@ -50,6 +50,7 @@
|
|||
|
||||
import Qt3D.Core 2.0
|
||||
import Qt3D.Render 2.0
|
||||
import Qt3D.Extras 2.0
|
||||
|
||||
Entity {
|
||||
id: root
|
||||
|
|
|
|||
|
|
@ -50,6 +50,7 @@
|
|||
|
||||
import Qt3D.Core 2.0
|
||||
import Qt3D.Render 2.0
|
||||
import Qt3D.Extras 2.0
|
||||
|
||||
Entity {
|
||||
id: root
|
||||
|
|
|
|||
|
|
@ -50,6 +50,7 @@
|
|||
|
||||
import Qt3D.Core 2.0
|
||||
import Qt3D.Render 2.0
|
||||
import Qt3D.Extras 2.0
|
||||
|
||||
Entity {
|
||||
id: root
|
||||
|
|
|
|||
|
|
@ -52,6 +52,7 @@ import QtQuick 2.1 as QQ2
|
|||
import Qt3D.Core 2.0
|
||||
import Qt3D.Render 2.0
|
||||
import Qt3D.Input 2.0
|
||||
import Qt3D.Extras 2.0
|
||||
|
||||
Entity {
|
||||
id: root
|
||||
|
|
|
|||
|
|
@ -51,6 +51,7 @@
|
|||
import Qt3D.Core 2.0
|
||||
import Qt3D.Render 2.0
|
||||
import Qt3D.Input 2.0
|
||||
import Qt3D.Extras 2.0
|
||||
|
||||
Entity {
|
||||
id: sceneRoot
|
||||
|
|
|
|||
|
|
@ -52,6 +52,7 @@ import QtQuick 2.0
|
|||
import Qt3D.Core 2.0
|
||||
import Qt3D.Render 2.0
|
||||
import Qt3D.Input 2.0
|
||||
import Qt3D.Extras 2.0
|
||||
|
||||
Entity {
|
||||
id: rootNode
|
||||
|
|
|
|||
|
|
@ -51,6 +51,7 @@
|
|||
import Qt3D.Core 2.0
|
||||
import Qt3D.Render 2.0
|
||||
import Qt3D.Input 2.0
|
||||
import Qt3D.Extras 2.0
|
||||
|
||||
import QtQuick 2.0 as QQ2
|
||||
import QtQuick.Window 2.2 as W
|
||||
|
|
|
|||
|
|
@ -50,6 +50,7 @@
|
|||
|
||||
import Qt3D.Core 2.0
|
||||
import Qt3D.Render 2.0
|
||||
import Qt3D.Extras 2.0
|
||||
|
||||
Entity {
|
||||
components: RenderSettings {
|
||||
|
|
|
|||
|
|
@ -50,6 +50,7 @@
|
|||
|
||||
import Qt3D.Core 2.0
|
||||
import Qt3D.Render 2.0
|
||||
import Qt3D.Extras 2.0
|
||||
|
||||
import QtQuick 2.0 as QQ2
|
||||
|
||||
|
|
|
|||
|
|
@ -52,6 +52,7 @@ import QtQuick 2.0
|
|||
import QtQuick.Scene3D 2.0
|
||||
import Qt3D.Core 2.0
|
||||
import Qt3D.Render 2.0
|
||||
import Qt3D.Extras 2.0
|
||||
|
||||
Scene3D {
|
||||
focus: true
|
||||
|
|
|
|||
|
|
@ -50,6 +50,7 @@
|
|||
|
||||
import Qt3D.Core 2.0
|
||||
import Qt3D.Render 2.0
|
||||
import Qt3D.Extras 2.0
|
||||
|
||||
import QtQuick 2.0 as QQ2
|
||||
|
||||
|
|
|
|||
|
|
@ -50,6 +50,7 @@
|
|||
|
||||
import Qt3D.Core 2.0
|
||||
import Qt3D.Render 2.0
|
||||
import Qt3D.Extras 2.0
|
||||
|
||||
Entity {
|
||||
id: root
|
||||
|
|
|
|||
|
|
@ -59,11 +59,11 @@
|
|||
#include <Qt3DInput/QInputAspect>
|
||||
|
||||
#include <Qt3DRender/QRenderAspect>
|
||||
#include <Qt3DRender/QForwardRenderer>
|
||||
#include <Qt3DRender/QPhongMaterial>
|
||||
#include <Qt3DRender/QCylinderMesh>
|
||||
#include <Qt3DRender/QSphereMesh>
|
||||
#include <Qt3DRender/QTorusMesh>
|
||||
#include <Qt3DExtras//QForwardRenderer>
|
||||
#include <Qt3DExtras//QPhongMaterial>
|
||||
#include <Qt3DExtras/QCylinderMesh>
|
||||
#include <Qt3DExtras/QSphereMesh>
|
||||
#include <Qt3DExtras/QTorusMesh>
|
||||
|
||||
#include <QPropertyAnimation>
|
||||
|
||||
|
|
@ -77,11 +77,11 @@ Qt3DCore::QEntity *createScene()
|
|||
Qt3DCore::QEntity *rootEntity = new Qt3DCore::QEntity;
|
||||
|
||||
// Material
|
||||
Qt3DRender::QMaterial *material = new Qt3DRender::QPhongMaterial(rootEntity);
|
||||
Qt3DRender::QMaterial *material = new Qt3DExtras::QPhongMaterial(rootEntity);
|
||||
|
||||
// Torus
|
||||
Qt3DCore::QEntity *torusEntity = new Qt3DCore::QEntity(rootEntity);
|
||||
Qt3DRender::QTorusMesh *torusMesh = new Qt3DRender::QTorusMesh;
|
||||
Qt3DExtras::QTorusMesh *torusMesh = new Qt3DExtras::QTorusMesh;
|
||||
torusMesh->setRadius(5);
|
||||
torusMesh->setMinorRadius(1);
|
||||
torusMesh->setRings(100);
|
||||
|
|
@ -97,7 +97,7 @@ Qt3DCore::QEntity *createScene()
|
|||
|
||||
// Sphere
|
||||
Qt3DCore::QEntity *sphereEntity = new Qt3DCore::QEntity(rootEntity);
|
||||
Qt3DRender::QSphereMesh *sphereMesh = new Qt3DRender::QSphereMesh;
|
||||
Qt3DExtras::QSphereMesh *sphereMesh = new Qt3DExtras::QSphereMesh;
|
||||
sphereMesh->setRadius(3);
|
||||
|
||||
Qt3DCore::QTransform *sphereTransform = new Qt3DCore::QTransform;
|
||||
|
|
|
|||
|
|
@ -52,6 +52,7 @@ import QtQuick 2.2 as QQ2
|
|||
import Qt3D.Core 2.0
|
||||
import Qt3D.Render 2.0
|
||||
import Qt3D.Input 2.0
|
||||
import Qt3D.Extras 2.0
|
||||
|
||||
Entity {
|
||||
id: sceneRoot
|
||||
|
|
|
|||
|
|
@ -52,6 +52,7 @@ import QtQuick 2.2 as QQ2
|
|||
import Qt3D.Core 2.0
|
||||
import Qt3D.Render 2.0
|
||||
import Qt3D.Input 2.0
|
||||
import Qt3D.Extras 2.0
|
||||
|
||||
Entity {
|
||||
id: sceneRoot
|
||||
|
|
|
|||
|
|
@ -50,6 +50,7 @@
|
|||
|
||||
import Qt3D.Core 2.0
|
||||
import Qt3D.Render 2.0
|
||||
import Qt3D.Extras 2.0
|
||||
|
||||
Entity {
|
||||
|
||||
|
|
|
|||
|
|
@ -51,6 +51,7 @@
|
|||
import Qt3D.Core 2.0
|
||||
import Qt3D.Render 2.0
|
||||
import Qt3D.Input 2.0
|
||||
import Qt3D.Extras 2.0
|
||||
|
||||
Entity {
|
||||
id: root
|
||||
|
|
|
|||
|
|
@ -52,6 +52,7 @@ import QtQuick 2.1 as QQ2
|
|||
import Qt3D.Core 2.0
|
||||
import Qt3D.Render 2.0
|
||||
import Qt3D.Input 2.0
|
||||
import Qt3D.Extras 2.0
|
||||
|
||||
Entity {
|
||||
id: root
|
||||
|
|
|
|||
|
|
@ -51,6 +51,7 @@
|
|||
import Qt3D.Core 2.0
|
||||
import Qt3D.Render 2.0
|
||||
import Qt3D.Input 2.0
|
||||
import Qt3D.Extras 2.0
|
||||
|
||||
Entity {
|
||||
id: sceneRoot
|
||||
|
|
|
|||
|
|
@ -50,6 +50,7 @@
|
|||
|
||||
import Qt3D.Core 2.0
|
||||
import Qt3D.Render 2.0
|
||||
import Qt3D.Extras 2.0
|
||||
|
||||
Entity {
|
||||
id: sceneRoot
|
||||
|
|
|
|||
|
|
@ -50,6 +50,7 @@
|
|||
|
||||
import Qt3D.Core 2.0
|
||||
import Qt3D.Render 2.0
|
||||
import Qt3D.Extras 2.0
|
||||
import QtQuick 2.2 as QQ2
|
||||
|
||||
Entity {
|
||||
|
|
|
|||
|
|
@ -51,6 +51,7 @@
|
|||
import Qt3D.Core 2.0
|
||||
import Qt3D.Render 2.0
|
||||
import Qt3D.Input 2.0
|
||||
import Qt3D.Extras 2.0
|
||||
import QtQuick 2.4 as QQ2
|
||||
|
||||
Entity {
|
||||
|
|
|
|||
|
|
@ -50,6 +50,7 @@
|
|||
|
||||
import Qt3D.Core 2.0
|
||||
import Qt3D.Render 2.0
|
||||
import Qt3D.Extras 2.0
|
||||
|
||||
Entity {
|
||||
id: root
|
||||
|
|
|
|||
|
|
@ -52,6 +52,7 @@ import QtQuick 2.1 as QQ2
|
|||
import Qt3D.Core 2.0
|
||||
import Qt3D.Render 2.0
|
||||
import Qt3D.Input 2.0
|
||||
import Qt3D.Extras 2.0
|
||||
|
||||
Entity {
|
||||
id: root
|
||||
|
|
|
|||
|
|
@ -54,7 +54,9 @@
|
|||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
namespace Qt3DRender {
|
||||
using namespace Qt3DRender;
|
||||
|
||||
namespace Qt3DExtras {
|
||||
|
||||
QDiffuseMapMaterialPrivate::QDiffuseMapMaterialPrivate()
|
||||
: QMaterialPrivate()
|
||||
|
|
@ -309,6 +311,6 @@ void QDiffuseMapMaterial::setTextureScale(float textureScale)
|
|||
d->m_textureScaleParameter->setValue(textureScale);
|
||||
}
|
||||
|
||||
} // namespace Qt3DRender
|
||||
} // namespace Qt3DExtras
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
|
@ -37,9 +37,10 @@
|
|||
**
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef QT3DRENDER_RENDER_QDIFFUSEMAPMATERIAL_H
|
||||
#define QT3DRENDER_RENDER_QDIFFUSEMAPMATERIAL_H
|
||||
#ifndef QT3DEXTRAS_QDIFFUSEMAPMATERIAL_H
|
||||
#define QT3DEXTRAS_QDIFFUSEMAPMATERIAL_H
|
||||
|
||||
#include <Qt3DExtras/qt3dextras_global.h>
|
||||
#include <Qt3DRender/qmaterial.h>
|
||||
#include <QColor>
|
||||
|
||||
|
|
@ -47,10 +48,15 @@ QT_BEGIN_NAMESPACE
|
|||
|
||||
namespace Qt3DRender {
|
||||
|
||||
class QDiffuseMapMaterialPrivate;
|
||||
class QAbstractTexture;
|
||||
|
||||
class QT3DRENDERSHARED_EXPORT QDiffuseMapMaterial : public QMaterial
|
||||
} // namespace Qt3DRender
|
||||
|
||||
namespace Qt3DExtras {
|
||||
|
||||
class QDiffuseMapMaterialPrivate;
|
||||
|
||||
class QT3DEXTRASSHARED_EXPORT QDiffuseMapMaterial : public Qt3DRender::QMaterial
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_PROPERTY(QColor ambient READ ambient WRITE setAmbient NOTIFY ambientChanged)
|
||||
|
|
@ -66,19 +72,19 @@ public:
|
|||
QColor ambient() const;
|
||||
QColor specular() const;
|
||||
float shininess() const;
|
||||
QAbstractTexture *diffuse() const;
|
||||
Qt3DRender::QAbstractTexture *diffuse() const;
|
||||
float textureScale() const;
|
||||
|
||||
public Q_SLOTS:
|
||||
void setAmbient(const QColor &color);
|
||||
void setSpecular(const QColor &specular);
|
||||
void setShininess(float shininess);
|
||||
void setDiffuse(QAbstractTexture *diffuse);
|
||||
void setDiffuse(Qt3DRender::QAbstractTexture *diffuse);
|
||||
void setTextureScale(float textureScale);
|
||||
|
||||
Q_SIGNALS:
|
||||
void ambientChanged(const QColor &ambient);
|
||||
void diffuseChanged(QAbstractTexture *diffuse);
|
||||
void diffuseChanged(Qt3DRender::QAbstractTexture *diffuse);
|
||||
void specularChanged(const QColor &specular);
|
||||
void shininessChanged(float shininess);
|
||||
void textureScaleChanged(float textureScale);
|
||||
|
|
@ -87,8 +93,8 @@ private:
|
|||
Q_DECLARE_PRIVATE(QDiffuseMapMaterial)
|
||||
};
|
||||
|
||||
} // namespace Qt3DRender
|
||||
} // Qt3DExtras
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif // QT3DRENDER_RENDER_QDIFFUSEMAPMATERIAL_H
|
||||
#endif // QT3DEXTRASQDIFFUSEMAPMATERIAL_H
|
||||
|
|
@ -37,8 +37,8 @@
|
|||
**
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef QT3DRENDER_RENDER_QDIFFUSEMAPMATERIAL_P_H
|
||||
#define QT3DRENDER_RENDER_QDIFFUSEMAPMATERIAL_P_H
|
||||
#ifndef QT3DEXTRAS_QDIFFUSEMAPMATERIAL_P_H
|
||||
#define QT3DEXTRAS_QDIFFUSEMAPMATERIAL_P_H
|
||||
|
||||
//
|
||||
// W A R N I N G
|
||||
|
|
@ -65,9 +65,13 @@ class QParameter;
|
|||
class QShaderProgram;
|
||||
class QRenderPass;
|
||||
|
||||
} // namespace Qt3DRender
|
||||
|
||||
namespace Qt3DExtras {
|
||||
|
||||
class QDiffuseMapMaterial;
|
||||
|
||||
class QDiffuseMapMaterialPrivate : public QMaterialPrivate
|
||||
class QDiffuseMapMaterialPrivate : public Qt3DRender::QMaterialPrivate
|
||||
{
|
||||
QDiffuseMapMaterialPrivate();
|
||||
|
||||
|
|
@ -79,29 +83,29 @@ class QDiffuseMapMaterialPrivate : public QMaterialPrivate
|
|||
void handleShininessChanged(const QVariant &var);
|
||||
void handleTextureScaleChanged(const QVariant &var);
|
||||
|
||||
QEffect *m_diffuseMapEffect;
|
||||
QAbstractTexture *m_diffuseTexture;
|
||||
QParameter *m_ambientParameter;
|
||||
QParameter *m_diffuseParameter;
|
||||
QParameter *m_specularParameter;
|
||||
QParameter *m_shininessParameter;
|
||||
QParameter *m_textureScaleParameter;
|
||||
QTechnique *m_diffuseMapGL3Technique;
|
||||
QTechnique *m_diffuseMapGL2Technique;
|
||||
QTechnique *m_diffuseMapES2Technique;
|
||||
QRenderPass *m_diffuseMapGL3RenderPass;
|
||||
QRenderPass *m_diffuseMapGL2RenderPass;
|
||||
QRenderPass *m_diffuseMapES2RenderPass;
|
||||
QShaderProgram *m_diffuseMapGL3Shader;
|
||||
QShaderProgram *m_diffuseMapGL2ES2Shader;
|
||||
QFilterKey *m_filterKey;
|
||||
Qt3DRender::QEffect *m_diffuseMapEffect;
|
||||
Qt3DRender::QAbstractTexture *m_diffuseTexture;
|
||||
Qt3DRender::QParameter *m_ambientParameter;
|
||||
Qt3DRender::QParameter *m_diffuseParameter;
|
||||
Qt3DRender::QParameter *m_specularParameter;
|
||||
Qt3DRender::QParameter *m_shininessParameter;
|
||||
Qt3DRender::QParameter *m_textureScaleParameter;
|
||||
Qt3DRender::QTechnique *m_diffuseMapGL3Technique;
|
||||
Qt3DRender::QTechnique *m_diffuseMapGL2Technique;
|
||||
Qt3DRender::QTechnique *m_diffuseMapES2Technique;
|
||||
Qt3DRender::QRenderPass *m_diffuseMapGL3RenderPass;
|
||||
Qt3DRender::QRenderPass *m_diffuseMapGL2RenderPass;
|
||||
Qt3DRender::QRenderPass *m_diffuseMapES2RenderPass;
|
||||
Qt3DRender::QShaderProgram *m_diffuseMapGL3Shader;
|
||||
Qt3DRender::QShaderProgram *m_diffuseMapGL2ES2Shader;
|
||||
Qt3DRender::QFilterKey *m_filterKey;
|
||||
|
||||
Q_DECLARE_PUBLIC(QDiffuseMapMaterial)
|
||||
};
|
||||
|
||||
} // namespace Qt3DRender
|
||||
} // Qt3DExtras
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif // QT3DRENDER_RENDER_QDIFFUSEAPMATERIAL_P_H
|
||||
#endif // QT3DEXTRAS_QDIFFUSEAPMATERIAL_P_H
|
||||
|
||||
|
|
@ -54,7 +54,9 @@
|
|||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
namespace Qt3DRender {
|
||||
using namespace Qt3DRender;
|
||||
|
||||
namespace Qt3DExtras {
|
||||
|
||||
QDiffuseSpecularMapMaterialPrivate::QDiffuseSpecularMapMaterialPrivate()
|
||||
: QMaterialPrivate()
|
||||
|
|
@ -323,6 +325,6 @@ void QDiffuseSpecularMapMaterial::setTextureScale(float textureScale)
|
|||
d->m_textureScaleParameter->setValue(textureScale);
|
||||
}
|
||||
|
||||
} // namespace Qt3DRender
|
||||
} // namespace Qt3DExtras
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
|
@ -37,9 +37,10 @@
|
|||
**
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef QT3DRENDER_RENDER_QDIFFUSESPECULARMAPMATERIAL_H
|
||||
#define QT3DRENDER_RENDER_QDIFFUSESPECULARMAPMATERIAL_H
|
||||
#ifndef QT3DEXTRAS_QDIFFUSESPECULARMAPMATERIAL_H
|
||||
#define QT3DEXTRAS_QDIFFUSESPECULARMAPMATERIAL_H
|
||||
|
||||
#include <Qt3DExtras/qt3dextras_global.h>
|
||||
#include <Qt3DRender/qmaterial.h>
|
||||
#include <QColor>
|
||||
|
||||
|
|
@ -48,9 +49,13 @@ QT_BEGIN_NAMESPACE
|
|||
namespace Qt3DRender {
|
||||
|
||||
class QAbstractTexture;
|
||||
} // namespace Qt3DRender
|
||||
|
||||
namespace Qt3DExtras {
|
||||
|
||||
class QDiffuseSpecularMapMaterialPrivate;
|
||||
|
||||
class QT3DRENDERSHARED_EXPORT QDiffuseSpecularMapMaterial : public QMaterial
|
||||
class QT3DEXTRASSHARED_EXPORT QDiffuseSpecularMapMaterial : public Qt3DRender::QMaterial
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_PROPERTY(QColor ambient READ ambient WRITE setAmbient NOTIFY ambientChanged)
|
||||
|
|
@ -64,22 +69,22 @@ public:
|
|||
~QDiffuseSpecularMapMaterial();
|
||||
|
||||
QColor ambient() const;
|
||||
QAbstractTexture *diffuse() const;
|
||||
QAbstractTexture *specular() const;
|
||||
Qt3DRender::QAbstractTexture *diffuse() const;
|
||||
Qt3DRender::QAbstractTexture *specular() const;
|
||||
float shininess() const;
|
||||
float textureScale() const;
|
||||
|
||||
public Q_SLOTS:
|
||||
void setAmbient(const QColor &ambient);
|
||||
void setDiffuse(QAbstractTexture *diffuse);
|
||||
void setSpecular(QAbstractTexture *specular);
|
||||
void setDiffuse(Qt3DRender::QAbstractTexture *diffuse);
|
||||
void setSpecular(Qt3DRender::QAbstractTexture *specular);
|
||||
void setShininess(float shininess);
|
||||
void setTextureScale(float textureScale);
|
||||
|
||||
Q_SIGNALS:
|
||||
void ambientChanged(const QColor &ambient);
|
||||
void diffuseChanged(QAbstractTexture *diffuse);
|
||||
void specularChanged(QAbstractTexture *specular);
|
||||
void diffuseChanged(Qt3DRender::QAbstractTexture *diffuse);
|
||||
void specularChanged(Qt3DRender::QAbstractTexture *specular);
|
||||
void shininessChanged(float shininess);
|
||||
void textureScaleChanged(float textureScale);
|
||||
|
||||
|
|
@ -87,8 +92,8 @@ private:
|
|||
Q_DECLARE_PRIVATE(QDiffuseSpecularMapMaterial)
|
||||
};
|
||||
|
||||
} // namespace Qt3DRender
|
||||
} // Qt3DExtras
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif // QT3DRENDER_RENDER_QDIFFUSESPECULARMAPMATERIAL_H
|
||||
#endif // QT3DEXTRAS_QDIFFUSESPECULARMAPMATERIAL_H
|
||||
|
|
@ -37,8 +37,8 @@
|
|||
**
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef QT3DRENDER_RENDER_QDIFFUSESPECULARMAPMATERIAL_P_H
|
||||
#define QT3DRENDER_RENDER_QDIFFUSESPECULARMAPMATERIAL_P_H
|
||||
#ifndef QT3DEXTRAS_QDIFFUSESPECULARMAPMATERIAL_P_H
|
||||
#define QT3DEXTRAS_QDIFFUSESPECULARMAPMATERIAL_P_H
|
||||
|
||||
//
|
||||
// W A R N I N G
|
||||
|
|
@ -65,9 +65,13 @@ class QParameter;
|
|||
class QShaderProgram;
|
||||
class QRenderPass;
|
||||
|
||||
} // namespace Qt3DRender
|
||||
|
||||
namespace Qt3DExtras {
|
||||
|
||||
class QDiffuseSpecularMapMaterial;
|
||||
|
||||
class QDiffuseSpecularMapMaterialPrivate : public QMaterialPrivate
|
||||
class QDiffuseSpecularMapMaterialPrivate : public Qt3DRender::QMaterialPrivate
|
||||
{
|
||||
public:
|
||||
QDiffuseSpecularMapMaterialPrivate();
|
||||
|
|
@ -80,30 +84,31 @@ public:
|
|||
void handleShininessChanged(const QVariant &var);
|
||||
void handleTextureScaleChanged(const QVariant &var);
|
||||
|
||||
QEffect *m_diffuseSpecularMapEffect;
|
||||
QAbstractTexture *m_diffuseTexture;
|
||||
QAbstractTexture *m_specularTexture;
|
||||
QParameter *m_ambientParameter;
|
||||
QParameter *m_diffuseParameter;
|
||||
QParameter *m_specularParameter;
|
||||
QParameter *m_shininessParameter;
|
||||
QParameter *m_textureScaleParameter;
|
||||
QTechnique *m_diffuseSpecularMapGL3Technique;
|
||||
QTechnique *m_diffuseSpecularMapGL2Technique;
|
||||
QTechnique *m_diffuseSpecularMapES2Technique;
|
||||
QRenderPass *m_diffuseSpecularMapGL3RenderPass;
|
||||
QRenderPass *m_diffuseSpecularMapGL2RenderPass;
|
||||
QRenderPass *m_diffuseSpecularMapES2RenderPass;
|
||||
QShaderProgram *m_diffuseSpecularMapGL3Shader;
|
||||
QShaderProgram *m_diffuseSpecularMapGL2ES2Shader;
|
||||
QFilterKey *m_filterKey;
|
||||
Qt3DRender::QEffect *m_diffuseSpecularMapEffect;
|
||||
Qt3DRender::QAbstractTexture *m_diffuseTexture;
|
||||
Qt3DRender::QAbstractTexture *m_specularTexture;
|
||||
Qt3DRender::QParameter *m_ambientParameter;
|
||||
Qt3DRender::QParameter *m_diffuseParameter;
|
||||
Qt3DRender::QParameter *m_specularParameter;
|
||||
Qt3DRender::QParameter *m_shininessParameter;
|
||||
Qt3DRender::QParameter *m_textureScaleParameter;
|
||||
Qt3DRender::QTechnique *m_diffuseSpecularMapGL3Technique;
|
||||
Qt3DRender::QTechnique *m_diffuseSpecularMapGL2Technique;
|
||||
Qt3DRender::QTechnique *m_diffuseSpecularMapES2Technique;
|
||||
Qt3DRender::QRenderPass *m_diffuseSpecularMapGL3RenderPass;
|
||||
Qt3DRender::QRenderPass *m_diffuseSpecularMapGL2RenderPass;
|
||||
Qt3DRender::QRenderPass *m_diffuseSpecularMapES2RenderPass;
|
||||
Qt3DRender::QShaderProgram *m_diffuseSpecularMapGL3Shader;
|
||||
Qt3DRender::QShaderProgram *m_diffuseSpecularMapGL2ES2Shader;
|
||||
Qt3DRender::QFilterKey *m_filterKey;
|
||||
|
||||
Q_DECLARE_PUBLIC(QDiffuseSpecularMapMaterial)
|
||||
};
|
||||
|
||||
} // namespace Qt3DRender
|
||||
} // Qt3DExtras
|
||||
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif // QT3DRENDER_RENDER_QDIFFUSESPECULARMAPMATERIAL_P_H
|
||||
#endif // QT3DEXTRAS_QDIFFUSESPECULARMAPMATERIAL_P_H
|
||||
|
||||
|
|
@ -49,7 +49,9 @@
|
|||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
namespace Qt3DRender {
|
||||
using namespace Qt3DRender;
|
||||
|
||||
namespace Qt3DExtras {
|
||||
|
||||
QForwardRendererPrivate::QForwardRendererPrivate()
|
||||
: QTechniqueFilterPrivate()
|
||||
|
|
@ -190,6 +192,6 @@ QObject *QForwardRenderer::surface() const
|
|||
return d->m_surfaceSelector->surface();
|
||||
}
|
||||
|
||||
} // namespace Qt3DRender
|
||||
} // namespace Qt3DExtras
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
|
@ -37,9 +37,10 @@
|
|||
**
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef QT3DRENDER_RENDER_QFORWARDRENDERER_H
|
||||
#define QT3DRENDER_RENDER_QFORWARDRENDERER_H
|
||||
#ifndef QT3DEXTRAS_QFORWARDRENDERER_H
|
||||
#define QT3DEXTRAS_QFORWARDRENDERER_H
|
||||
|
||||
#include <Qt3DExtras/qt3dextras_global.h>
|
||||
#include <Qt3DRender/qtechniquefilter.h>
|
||||
#include <QRectF>
|
||||
#include <QColor>
|
||||
|
|
@ -48,11 +49,11 @@ QT_BEGIN_NAMESPACE
|
|||
|
||||
class QSurface;
|
||||
|
||||
namespace Qt3DRender {
|
||||
namespace Qt3DExtras {
|
||||
|
||||
class QForwardRendererPrivate;
|
||||
|
||||
class QT3DRENDERSHARED_EXPORT QForwardRenderer : public QTechniqueFilter
|
||||
class QT3DEXTRASSHARED_EXPORT QForwardRenderer : public Qt3DRender::QTechniqueFilter
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_PROPERTY(QObject *surface READ surface WRITE setSurface NOTIFY surfaceChanged)
|
||||
|
|
@ -84,8 +85,8 @@ private:
|
|||
Q_DECLARE_PRIVATE(QForwardRenderer)
|
||||
};
|
||||
|
||||
} // namespace Qt3DRender
|
||||
} // namespace Qt3DExtras
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif // QT3DRENDER_RENDERER_QFORWARDRENDERER_H
|
||||
#endif // QT3DEXTRAS_QFORWARDRENDERER_H
|
||||
|
|
@ -37,8 +37,8 @@
|
|||
**
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef QT3DRENDER_RENDER_QFORWARDRENDERER_P_H
|
||||
#define QT3DRENDER_RENDER_QFORWARDRENDERER_P_H
|
||||
#ifndef QT3DEXTRAS_QFORWARDRENDERER_P_H
|
||||
#define QT3DEXTRAS_QFORWARDRENDERER_P_H
|
||||
|
||||
//
|
||||
// W A R N I N G
|
||||
|
|
@ -64,25 +64,29 @@ class QCameraSelector;
|
|||
class QFrustumCulling;
|
||||
class QRenderSurfaceSelector;
|
||||
|
||||
class QForwardRendererPrivate: public QTechniqueFilterPrivate
|
||||
} // namespace Qt3DRender
|
||||
|
||||
namespace Qt3DExtras {
|
||||
|
||||
class QForwardRendererPrivate: public Qt3DRender::QTechniqueFilterPrivate
|
||||
{
|
||||
public:
|
||||
QForwardRendererPrivate();
|
||||
|
||||
QRenderSurfaceSelector *m_surfaceSelector;
|
||||
QViewport *m_viewport;
|
||||
QCameraSelector *m_cameraSelector;
|
||||
QClearBuffers *m_clearBuffer;
|
||||
QFrustumCulling *m_frustumCulling;
|
||||
Qt3DRender::QRenderSurfaceSelector *m_surfaceSelector;
|
||||
Qt3DRender::QViewport *m_viewport;
|
||||
Qt3DRender::QCameraSelector *m_cameraSelector;
|
||||
Qt3DRender::QClearBuffers *m_clearBuffer;
|
||||
Qt3DRender::QFrustumCulling *m_frustumCulling;
|
||||
|
||||
void init();
|
||||
|
||||
Q_DECLARE_PUBLIC(QForwardRenderer)
|
||||
};
|
||||
|
||||
} // namespace Qt3DRender
|
||||
} // Qt3DExtras
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif // QT3DRENDER_RENDER_QFORWARDRENDERER_P_H
|
||||
#endif // QT3DEXTRAS_QFORWARDRENDERER_P_H
|
||||
|
||||
|
|
@ -37,8 +37,8 @@
|
|||
**
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef QT3DRENDER_RENDER_QGOOCHMATERIAL_H
|
||||
#define QT3DRENDER_RENDER_QGOOCHMATERIAL_H
|
||||
#ifndef QT3DEXTRAS_QGOOCHMATERIAL_H
|
||||
#define QT3DEXTRAS_QGOOCHMATERIAL_H
|
||||
|
||||
#include <Qt3DRender/qmaterial.h>
|
||||
#include <QColor>
|
||||
|
|
@ -49,7 +49,7 @@ namespace Qt3DRender {
|
|||
|
||||
class QGoochMaterialPrivate;
|
||||
|
||||
class QT3DRENDERSHARED_EXPORT QGoochMaterial : public QMaterial
|
||||
class QGoochMaterial : public QMaterial
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_PROPERTY(QColor diffuse READ diffuse WRITE setDiffuse NOTIFY diffuseChanged)
|
||||
|
|
@ -99,4 +99,4 @@ private:
|
|||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif // QT3DRENDER_RENDER_QGOOCHMATERIAL_H
|
||||
#endif // QT3DEXTRAS_QGOOCHMATERIAL_H
|
||||
|
|
@ -37,8 +37,8 @@
|
|||
**
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef QT3DRENDER_RENDER_QGOOCHMATERIAL_P_H
|
||||
#define QT3DRENDER_RENDER_QGOOCHMATERIAL_P_H
|
||||
#ifndef QT3DEXTRAS_QGOOCHMATERIAL_P_H
|
||||
#define QT3DEXTRAS_QGOOCHMATERIAL_P_H
|
||||
|
||||
//
|
||||
// W A R N I N G
|
||||
|
|
@ -103,5 +103,5 @@ public:
|
|||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif // QT3DRENDER_RENDER_QGOOCHMATERIAL_P_H
|
||||
#endif // QT3DEXTRAS_QGOOCHMATERIAL_P_H
|
||||
|
||||
|
|
@ -56,7 +56,9 @@
|
|||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
namespace Qt3DRender {
|
||||
using namespace Qt3DRender;
|
||||
|
||||
namespace Qt3DExtras {
|
||||
|
||||
|
||||
QNormalDiffuseMapAlphaMaterialPrivate::QNormalDiffuseMapAlphaMaterialPrivate()
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue