diff options
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/core-components/qcamera.cpp | 66 | ||||
-rw-r--r-- | src/core/core-components/qcameralens.cpp | 54 | ||||
-rw-r--r-- | src/core/doc/qt3dcore.qdocconf | 17 | ||||
-rw-r--r-- | src/core/doc/src/qt3dcore-index.qdoc | 1 | ||||
-rw-r--r-- | src/core/doc/src/qt3dcore-module.qdoc | 14 | ||||
-rw-r--r-- | src/core/nodes/qcomponent.cpp | 16 | ||||
-rw-r--r-- | src/core/transforms/qmatrixtransform.cpp | 11 |
7 files changed, 176 insertions, 3 deletions
diff --git a/src/core/core-components/qcamera.cpp b/src/core/core-components/qcamera.cpp index 6fc43273a..2737daaa0 100644 --- a/src/core/core-components/qcamera.cpp +++ b/src/core/core-components/qcamera.cpp @@ -53,6 +53,14 @@ QCameraPrivate::QCameraPrivate(QCamera *qq) { } +/*! + \qmltype Camera + \instantiates Qt3D::QCamera + \inherits Entity + \inqmlmodule Qt3D + \since 5.5 +*/ + QCamera::QCamera(QNode *parent) : QEntity(*new QCameraPrivate(this), parent) { @@ -240,6 +248,15 @@ void QCamera::setProjectionType(QCameraLens::ProjectionType type) d->m_lens->setProjectionType(type); } +/*! + \qmlproperty enumeration Qt3D::Camera::projectionType + + Holds the type of the camera projection (orthogonal or perspective). + + \value CameraLens.OrthogonalProjection Orthogonal projection + \value CameraLens.PerspectiveProjection Perspective projection +*/ + QCameraLens::ProjectionType QCamera::projectionType() const { Q_D(const QCamera); @@ -252,6 +269,10 @@ void QCamera::setNearPlane(float nearPlane) d->m_lens->setNearPlane(nearPlane); } +/*! + \qmlproperty float Qt3D::Camera::nearPlane +*/ + float QCamera::nearPlane() const { Q_D(const QCamera); @@ -264,6 +285,10 @@ void QCamera::setFarPlane(float farPlane) d->m_lens->setFarPlane(farPlane); } +/*! + \qmlproperty float Qt3D::Camera::farPlane +*/ + float QCamera::farPlane() const { Q_D(const QCamera); @@ -276,6 +301,10 @@ void QCamera::setFieldOfView(float fieldOfView) d->m_lens->setFieldOfView(fieldOfView); } +/*! + \qmlproperty float Qt3D::Camera::fieldOfView +*/ + float QCamera::fieldOfView() const { Q_D(const QCamera); @@ -288,6 +317,10 @@ void QCamera::setAspectRatio(float aspectRatio) d->m_lens->setAspectRatio(aspectRatio); } +/*! + \qmlproperty float Qt3D::Camera::aspectRatio +*/ + float QCamera::aspectRatio() const { Q_D(const QCamera); @@ -300,6 +333,10 @@ void QCamera::setLeft(float left) d->m_lens->setLeft(left); } +/*! + \qmlproperty float Qt3D::Camera::left +*/ + float QCamera::left() const { Q_D(const QCamera); @@ -312,6 +349,10 @@ void QCamera::setRight(float right) d->m_lens->setRight(right); } +/*! + \qmlproperty float Qt3D::Camera::right +*/ + float QCamera::right() const { Q_D(const QCamera); @@ -324,6 +365,10 @@ void QCamera::setBottom(float bottom) d->m_lens->setBottom(bottom); } +/*! + \qmlproperty float Qt3D::Camera::bottom +*/ + float QCamera::bottom() const { Q_D(const QCamera); @@ -336,12 +381,21 @@ void QCamera::setTop(float top) d->m_lens->setTop(top); } +/*! + \qmlproperty float Qt3D::Camera::top +*/ + float QCamera::top() const { Q_D(const QCamera); return d->m_lens->top(); } +/*! + \qmlproperty matrix4x4 Qt3D::Camera::projectionMatrix + \readonly +*/ + QMatrix4x4 QCamera::projectionMatrix() const { Q_D(const QCamera); @@ -354,6 +408,10 @@ void QCamera::setPosition(const QVector3D &position) d->m_lookAt->setPosition(position); } +/*! + \qmlproperty vector3d Qt3D::Camera::position +*/ + QVector3D QCamera::position() const { Q_D(const QCamera); @@ -367,6 +425,10 @@ void QCamera::setUpVector(const QVector3D &upVector) d->m_lookAt->setUpVector(upVector); } +/*! + \qmlproperty vector3d Qt3D::Camera::upVector +*/ + QVector3D QCamera::upVector() const { Q_D(const QCamera); @@ -379,6 +441,10 @@ void QCamera::setViewCenter(const QVector3D &viewCenter) d->m_lookAt->setViewCenter(viewCenter); } +/*! + \qmlproperty vector3d Qt3D::Camera::viewCenter +*/ + QVector3D QCamera::viewCenter() const { Q_D(const QCamera); diff --git a/src/core/core-components/qcameralens.cpp b/src/core/core-components/qcameralens.cpp index 0d5f6ea49..fde9d16ad 100644 --- a/src/core/core-components/qcameralens.cpp +++ b/src/core/core-components/qcameralens.cpp @@ -274,4 +274,58 @@ QMatrix4x4 QCameraLens::projectionMatrix() const } // Qt3D +/*! + \qmltype CameraLens + \instantiates Qt3D::QCameraLens + \inqmlmodule Qt3D + \inherits Component3D + \since 5.5 +*/ + +/*! + \qmlproperty enumeration Qt3D::CameraLens::projectionType + + Holds the type of the camera projection (orthogonal or perspective). + + \value CameraLens.OrthogonalProjection Orthogonal projection + \value CameraLens.PerspectiveProjection Perspective projection +*/ + +/*! + \qmlproperty float Qt3D::CameraLens::nearPlane +*/ + +/*! + \qmlproperty float Qt3D::CameraLens::farPlane +*/ + +/*! + \qmlproperty float Qt3D::CameraLens::fieldOfView +*/ + +/*! + \qmlproperty float Qt3D::CameraLens::aspectRatio +*/ + +/*! + \qmlproperty float Qt3D::CameraLens::left +*/ + +/*! + \qmlproperty float Qt3D::CameraLens::right +*/ + +/*! + \qmlproperty float Qt3D::CameraLens::bottom +*/ + +/*! + \qmlproperty float Qt3D::CameraLens::top +*/ + +/*! + \qmlproperty matrix4x4 Qt3D::CameraLens::projectionMatrix + \readonly +*/ + QT_END_NAMESPACE diff --git a/src/core/doc/qt3dcore.qdocconf b/src/core/doc/qt3dcore.qdocconf index 02907b173..db2848ae8 100644 --- a/src/core/doc/qt3dcore.qdocconf +++ b/src/core/doc/qt3dcore.qdocconf @@ -18,20 +18,30 @@ qhp.Qt3DCore.filterAttributes = qt3dcore $QT_VERSION qtrefdoc qhp.Qt3DCore.customFilters.Qt.name = Qt3DCore $QT_VERSION qhp.Qt3DCore.customFilters.Qt.filterAttributes = qt3dcore $QT_VERSION -qhp.Qt3DCore.subprojects = classes +qhp.Qt3DCore.subprojects = classes qmltypes + qhp.Qt3DCore.subprojects.classes.title = C++ Classes qhp.Qt3DCore.subprojects.classes.indexTitle = Qt3D Core C++ Classes qhp.Qt3DCore.subprojects.classes.selectors = class fake:headerfile qhp.Qt3DCore.subprojects.classes.sortPages = true +qhp.Qt3DCore.subprojects.qmltypes.title = QML Types +qhp.Qt3DCore.subprojects.qmltypes.indexTitle = Qt3D Core QML Types +qhp.Qt3DCore.subprojects.qmltypes.selectors = qmlclass +qhp.Qt3DCore.subprojects.qmltypes.sortPages = true + tagfile = ../../../doc/qt3dcore/qt3dcore.tags depends += qtcore qtqml qtquick qtdoc qt3drender headerdirs += .. \ - ../../plugins + ../../plugins \ + ../../quick3d/quick3d + sourcedirs += .. \ - ../../plugins + ../../plugins \ + ../../quick3d/quick3d + exampledirs += src/snippets #excludedirs += @@ -45,3 +55,4 @@ Cpp.ignoredirectives += Q_DECLARE_LOGGING_CATEGORY navigation.landingpage = "Qt3D Core" navigation.cppclassespage = "Qt3D Core C++ Classes" +navigation.qmltypespage = "Qt3D Core QML Types" diff --git a/src/core/doc/src/qt3dcore-index.qdoc b/src/core/doc/src/qt3dcore-index.qdoc index 184068337..b2908264b 100644 --- a/src/core/doc/src/qt3dcore-index.qdoc +++ b/src/core/doc/src/qt3dcore-index.qdoc @@ -58,6 +58,7 @@ \list \li \l {Qt3D Core C++ Classes} + \li \l {Qt3D Core QML Types} \li \l {Qt3D Examples} \endlist diff --git a/src/core/doc/src/qt3dcore-module.qdoc b/src/core/doc/src/qt3dcore-module.qdoc index 453152d85..d664b8bf6 100644 --- a/src/core/doc/src/qt3dcore-module.qdoc +++ b/src/core/doc/src/qt3dcore-module.qdoc @@ -54,3 +54,17 @@ framework, as well as classes that provide the ability to render using the Qt3D framework. */ + +/*! + \qmlmodule Qt3D 2.0 + \title Qt3D Core QML Types + \ingroup qmlmodules + + \brief Provides core Qt3D QML types. + + To import and use the module's QML types, use the following statement: + + \badcode + import Qt3D 2.0 + \endcode +*/ diff --git a/src/core/nodes/qcomponent.cpp b/src/core/nodes/qcomponent.cpp index 7cd68dc73..52fa77905 100644 --- a/src/core/nodes/qcomponent.cpp +++ b/src/core/nodes/qcomponent.cpp @@ -195,4 +195,20 @@ QComponent::QComponent(QComponentPrivate &dd, QNode *parent) } // namespace Qt3D +/*! + \qmltype Component3D + \instantiates Qt3D::QComponent + \inqmlmodule Qt3D + \inherits Node + \since 5.5 +*/ + +/*! + \qmlproperty bool Qt3D::Component3D::shareable +*/ + +/*! + \qmlproperty bool Qt3D::Component3D::enabled +*/ + QT_END_NAMESPACE diff --git a/src/core/transforms/qmatrixtransform.cpp b/src/core/transforms/qmatrixtransform.cpp index 706a183f1..298b85c1a 100644 --- a/src/core/transforms/qmatrixtransform.cpp +++ b/src/core/transforms/qmatrixtransform.cpp @@ -91,4 +91,15 @@ QMatrix4x4 QMatrixTransform::transformMatrix() const } // namespace Qt3D +/*! + \qmltype MatrixTransform + \inqmlmodule Qt3D + \since 5.5 + \instantiates Qt3D::QMatrixTransform +*/ + +/*! + \qmlproperty matrix4x4 Qt3D::MatrixTransform::matrix +*/ + QT_END_NAMESPACE |