diff options
author | Tomi Korpipää <tomi.korpipaa@theqtcompany.com> | 2016-01-20 06:21:10 +0200 |
---|---|---|
committer | Tomi Korpipää <tomi.korpipaa@theqtcompany.com> | 2016-01-20 11:08:08 +0000 |
commit | 03dc44479b8cfff3946dcb5a16a7f450cbf78ce7 (patch) | |
tree | ca125c5e5f0286a343cbefc6960c155dd8b19e12 /src | |
parent | 4d70b9af0049562cfb8cc12ebb68f3281fc96c69 (diff) |
Added skeleton docs to geometry classes
Change-Id: I312b3f1eed1578899319cfc30b9bad143c5c467e
Task-number: QTBUG-46037
Reviewed-by: Pasi Keränen <pasi.keranen@theqtcompany.com>
Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/render/geometry/qabstractattribute.cpp | 127 | ||||
-rw-r--r-- | src/render/geometry/qabstractbuffer.cpp | 41 | ||||
-rw-r--r-- | src/render/geometry/qboundingvolumespecifier.cpp | 28 | ||||
-rw-r--r-- | src/render/geometry/qbuffer.cpp | 130 | ||||
-rw-r--r-- | src/render/geometry/qcuboidgeometry.cpp | 150 | ||||
-rw-r--r-- | src/render/geometry/qcuboidmesh.cpp | 88 | ||||
-rw-r--r-- | src/render/geometry/qcylindergeometry.cpp | 116 | ||||
-rw-r--r-- | src/render/geometry/qcylindermesh.cpp | 66 | ||||
-rw-r--r-- | src/render/geometry/qgeometry.cpp | 67 | ||||
-rw-r--r-- | src/render/geometry/qgeometryrenderer.cpp | 142 | ||||
-rw-r--r-- | src/render/geometry/qmesh.cpp | 53 | ||||
-rw-r--r-- | src/render/geometry/qplanegeometry.cpp | 116 | ||||
-rw-r--r-- | src/render/geometry/qplanemesh.cpp | 55 | ||||
-rw-r--r-- | src/render/geometry/qspheregeometry.cpp | 127 | ||||
-rw-r--r-- | src/render/geometry/qspheremesh.cpp | 66 | ||||
-rw-r--r-- | src/render/geometry/qtorusgeometry.cpp | 116 | ||||
-rw-r--r-- | src/render/geometry/qtorusmesh.cpp | 66 | ||||
-rw-r--r-- | src/render/materialsystem/qmaterial.cpp | 7 |
18 files changed, 1549 insertions, 12 deletions
diff --git a/src/render/geometry/qabstractattribute.cpp b/src/render/geometry/qabstractattribute.cpp index 002eed5e9..3879279fc 100644 --- a/src/render/geometry/qabstractattribute.cpp +++ b/src/render/geometry/qabstractattribute.cpp @@ -62,16 +62,89 @@ QAbstractAttributePrivate::QAbstractAttributePrivate() { } +/*! + * \qmltype AbstractAttribute + * \instantiates Qt3DRender::QAbstractAttribute + * \inqmlmodule Qt3D.Render + * \brief Uncreatable + */ + +/*! + * \class Qt3DRender::QAbstractAttribute + * \inmodule Qt3DRender + * + * \inherits Qt3DCore::QNode + * + * Abstract class. + */ + +/*! + * \typedef Qt3DRender::QAbstractBufferPtr + * \relates Qt3DRender::QAbstractAttribute + */ + +/*! + * \fn QVector<QVector4D> Qt3DRender::QAbstractAttribute::asVector4D() const + */ + +/*! + * \fn QVector<QVector3D> Qt3DRender::QAbstractAttribute::asVector3D() const + */ + +/*! + * \fn QVector<QVector2D> Qt3DRender::QAbstractAttribute::asVector2D() const + */ + +/*! + * \fn void Qt3DRender::QAbstractAttribute::dump(int count) + * \a count + */ + +/*! + * \enum QAbstractAttribute::AttributeType + * + * The type of the attribute. + * + * \value VertexAttribute + * \value IndexAttribute + */ + +/*! + * \enum QAbstractAttribute::DataType + * + * The type of the data. + * + * \value Byte + * \value UnsignedByte + * \value Short + * \value UnsignedShort + * \value Int + * \value UnsignedInt + * \value HalfFloat + * \value Float + * \value Double + */ + +/*! + * Constructs a new QAbstractAttribute with \a parent. + */ QAbstractAttribute::QAbstractAttribute(QNode *parent) : QNode(*new QAbstractAttributePrivate(), parent) { } +/*! + * Destroys the abstract attribute. + */ QAbstractAttribute::~QAbstractAttribute() { Q_ASSERT_X(Qt3DCore::QNodePrivate::get(this)->m_wasCleanedUp, Q_FUNC_INFO, "QNode::cleanup should have been called by now. A Qt3DRender::QAbstractAttribute subclass didn't call QNode::cleanup in its destructor"); } +/*! + * Constructs a new QAbstractAttribute from \a buf of \a type, \a dataSize, \a count, \a offset, + * and \a stride with \a parent. + */ QAbstractAttribute::QAbstractAttribute(QAbstractBuffer *buf, DataType type, uint dataSize, uint count, uint offset, uint stride, QNode *parent) : QNode(*new QAbstractAttributePrivate(), parent) { @@ -84,11 +157,17 @@ QAbstractAttribute::QAbstractAttribute(QAbstractBuffer *buf, DataType type, uint d->m_byteStride = stride; } +/*! + * \internal + */ QAbstractAttribute::QAbstractAttribute(QAbstractAttributePrivate &dd, QNode *parent) : QNode(dd, parent) { } +/*! + * \internal + */ QAbstractAttribute::QAbstractAttribute(QAbstractAttributePrivate &dd, QAbstractBuffer *buf, const QString &name, DataType dataType, uint dataSize, uint count, uint offset, uint stride, QNode *parent) : QNode(dd, parent) { @@ -102,6 +181,9 @@ QAbstractAttribute::QAbstractAttribute(QAbstractAttributePrivate &dd, QAbstractB d->m_byteStride = stride; } +/*! + * \internal + */ void QAbstractAttribute::copy(const QNode *ref) { QNode::copy(ref); @@ -117,54 +199,99 @@ void QAbstractAttribute::copy(const QNode *ref) d_func()->m_attributeType = attribute->d_func()->m_attributeType; } +/*! + * \property QAbstractAttribute::buffer + * + * Holds the buffer. + */ QAbstractBuffer *QAbstractAttribute::buffer() const { Q_D(const QAbstractAttribute); return d->m_buffer; } +/*! + * \property QAbstractAttribute::name + * + * Holds the name. + */ QString QAbstractAttribute::name() const { Q_D(const QAbstractAttribute); return d->m_name; } +/*! + * \property QAbstractAttribute::dataSize + * + * Holds the data size. + */ uint QAbstractAttribute::dataSize() const { Q_D(const QAbstractAttribute); return d->m_dataSize; } +/*! + * \property QAbstractAttribute::dataType + * + * Holds the data type. + */ QAbstractAttribute::DataType QAbstractAttribute::dataType() const { Q_D(const QAbstractAttribute); return d->m_dataType; } +/*! + * \property QAbstractAttribute::count + * + * Holds the count. + */ uint QAbstractAttribute::count() const { Q_D(const QAbstractAttribute); return d->m_count; } +/*! + * \property QAbstractAttribute::byteStride + * + * Holds the byte stride. + */ uint QAbstractAttribute::byteStride() const { Q_D(const QAbstractAttribute); return d->m_byteStride; } +/*! + * \property QAbstractAttribute::byteOffset + * + * Holds the byte offset. + */ uint QAbstractAttribute::byteOffset() const { Q_D(const QAbstractAttribute); return d->m_byteOffset; } +/*! + * \property QAbstractAttribute::divisor + * + * Holds the divisor. + */ uint QAbstractAttribute::divisor() const { Q_D(const QAbstractAttribute); return d->m_divisor; } +/*! + * \property QAbstractAttribute::attributeType + * + * Holds the attribute type. + */ QAbstractAttribute::AttributeType QAbstractAttribute::attributeType() const { Q_D(const QAbstractAttribute); diff --git a/src/render/geometry/qabstractbuffer.cpp b/src/render/geometry/qabstractbuffer.cpp index 1d3673c38..b45b9e35a 100644 --- a/src/render/geometry/qabstractbuffer.cpp +++ b/src/render/geometry/qabstractbuffer.cpp @@ -51,22 +51,55 @@ QAbstractBufferPrivate::QAbstractBufferPrivate() { } +/*! + * \qmltype AbstractBuffer + * \instantiates Qt3DRender::QAbstractBuffer + * \inqmlmodule Qt3D.Render + * \brief Uncreatable + */ + +/*! + * \class Qt3DRender::QAbstractBuffer + * \inmodule Qt3DRender + * + * \inherits Qt3DCore::QNode + * + * Abstract class. + */ + +/*! + * \fn void Qt3DRender::QAbstractBuffer::dataChanged(const QByteArray &bytes) + * + * This signal is emitted with \a bytes when data changes. + */ + +/*! + * Constructs a new QAbstractBuffer with \a parent. + */ QAbstractBuffer::QAbstractBuffer(QNode *parent) : QNode(*new QAbstractBufferPrivate(), parent) { } +/*! + * Destroys the abstract buffer. + */ QAbstractBuffer::~QAbstractBuffer() { Q_ASSERT_X(Qt3DCore::QNodePrivate::get(this)->m_wasCleanedUp, Q_FUNC_INFO, "QNode::cleanup should have been called by now. A Qt3DRender::QAbstractBuffer subclass didn't call QNode::cleanup in its destructor"); } -/*! \internal */ +/*! + * \internal + */ QAbstractBuffer::QAbstractBuffer(QAbstractBufferPrivate &dd, QNode *parent) : QNode(dd, parent) { } +/*! + * \internal + */ void QAbstractBuffer::copy(const QNode *ref) { QNode::copy(ref); @@ -74,6 +107,9 @@ void QAbstractBuffer::copy(const QNode *ref) d_func()->m_data = buffer->d_func()->m_data; } +/*! + * Sets \a bytes as data. + */ void QAbstractBuffer::setData(const QByteArray &bytes) { Q_D(QAbstractBuffer); @@ -84,6 +120,9 @@ void QAbstractBuffer::setData(const QByteArray &bytes) } } +/*! + * \return the data. + */ QByteArray QAbstractBuffer::data() const { Q_D(const QAbstractBuffer); diff --git a/src/render/geometry/qboundingvolumespecifier.cpp b/src/render/geometry/qboundingvolumespecifier.cpp index d09c38dfd..04689a644 100644 --- a/src/render/geometry/qboundingvolumespecifier.cpp +++ b/src/render/geometry/qboundingvolumespecifier.cpp @@ -53,11 +53,39 @@ public: QAbstractAttribute *m_positionAttribute; }; +/*! + * \qmltype BoundingVolumeSpecifier + * \instantiates Qt3DRender::QBoundingVolumeSpecifier + * \inqmlmodule Qt3D.Render + * \brief Uncreatable + */ + +/*! + * \qmlproperty AbstractAttribute BoundingVolumeSpecifier::positionAttribute + * + * Holds the position attribute. + */ + +/*! + * \class Qt3DRender::QBoundingVolumeSpecifier + * \inmodule Qt3DRender + * + * \inherits QObject + */ + +/*! + * Constructs a new QBoundingVolumeSpecifier with \a parent. + */ QBoundingVolumeSpecifier::QBoundingVolumeSpecifier(QObject *parent) : QObject(*new QBoundingVolumeSpecifierPrivate(), parent) { } +/*! + * \property QBoundingVolumeSpecifier::positionAttribute + * + * Holds the position attribute. + */ QAbstractAttribute *QBoundingVolumeSpecifier::positionAttribute() const { Q_D(const QBoundingVolumeSpecifier); diff --git a/src/render/geometry/qbuffer.cpp b/src/render/geometry/qbuffer.cpp index 276af75fe..580a6381a 100644 --- a/src/render/geometry/qbuffer.cpp +++ b/src/render/geometry/qbuffer.cpp @@ -56,7 +56,90 @@ QBufferPrivate::QBufferPrivate() { } +/*! + * \qmltype Buffer + * \instantiates Qt3DRender::QBuffer + * \inqmlmodule Qt3D.Render + */ + +/*! + * \qmlproperty QBuffer::UsageType Buffer::usage + * + * Holds the buffer usage. + */ + +/*! + * \qmlproperty QBuffer::BufferType Buffer::type + * + * Holds the buffer type. + */ + +/*! + * \qmlproperty bool Buffer::sync + * + * Holds the sync flag. When sync is true, this will force data created + * by a Qt3DRender::QBufferFunctor to also be updated on the frontend + * Qt3DRender::QBuffer node. By default sync is false. + * + * \note: This has no effect if the buffer's data was set directly using the data + * property. + */ + +/*! + * \class Qt3DRender::QBuffer + * \inmodule Qt3DRender + * + * \inherits Qt3DRender::QAbstractBuffer + */ + +/*! + * \enum QBuffer::BufferType + * + * The type of the buffer. + * + * \value VertexBuffer + * GL_ARRAY_BUFFER + * \value IndexBuffer + * GL_ELEMENT_ARRAY_BUFFER + * \value PixelPackBuffer + * GL_PIXEL_PACK_BUFFER + * \value PixelUnpackBuffer + * GL_PIXEL_UNPACK_BUFFER + */ + +/*! + * \enum QBuffer::UsageType + * + * The type of the usage. + * + * \value StreamDraw + * GL_STREAM_DRAW + * \value StreamRead + * GL_STREAM_READ + * \value StreamCopy + * GL_STREAM_COPY + * \value StaticDraw + * GL_STATIC_DRAW + * \value StaticRead + * GL_STATIC_READ + * \value StaticCopy + * GL_STATIC_COPY + * \value DynamicDraw + * GL_DYNAMIC_DRAW + * \value DynamicRead + * GL_DYNAMIC_READ + * \value DynamicCopy + * GL_DYNAMIC_COPY + */ + +/*! + * \typedef Qt3DRender::QBufferFunctorPtr + * \relates QBuffer + */ +/*! + * Constructs a new QBuffer of buffer type \a ty with \a parent. + */ QBuffer::QBuffer(QBuffer::BufferType ty, QNode *parent) : QAbstractBuffer(*new QBufferPrivate(), parent) { @@ -64,12 +147,17 @@ QBuffer::QBuffer(QBuffer::BufferType ty, QNode *parent) d->m_type = ty; } +/*! + * Destroys this buffer. + */ QBuffer::~QBuffer() { QAbstractBuffer::cleanup(); } -/*! \internal */ +/*! + * \internal + */ QBuffer::QBuffer(QBufferPrivate &dd, QBuffer::BufferType ty, QNode *parent) : QAbstractBuffer(dd, parent) { @@ -77,6 +165,9 @@ QBuffer::QBuffer(QBufferPrivate &dd, QBuffer::BufferType ty, QNode *parent) d->m_type = ty; } +/*! + * \internal + */ void QBuffer::copy(const QNode *ref) { QAbstractBuffer::copy(ref); @@ -87,6 +178,9 @@ void QBuffer::copy(const QNode *ref) d_func()->m_sync = buffer->d_func()->m_sync; } +/*! + * \internal + */ void QBuffer::sceneChangeEvent(const QSceneChangePtr &change) { QScenePropertyChangePtr e = qSharedPointerCast<QScenePropertyChange>(change); @@ -97,6 +191,11 @@ void QBuffer::sceneChangeEvent(const QSceneChangePtr &change) } } +/*! + * \property QBuffer::usage + * + * Holds the buffer usage. + */ QBuffer::UsageType QBuffer::usage() const { Q_D(const QBuffer); @@ -112,12 +211,20 @@ void QBuffer::setUsage(QBuffer::UsageType usage) } } +/*! + * \property QBuffer::type + * + * Holds the buffer type. + */ QBuffer::BufferType QBuffer::type() const { Q_D(const QBuffer); return d->m_type; } +/*! + * Sets the buffer \a functor. + */ void QBuffer::setBufferFunctor(const QBufferFunctorPtr &functor) { Q_D(QBuffer); @@ -132,6 +239,9 @@ void QBuffer::setBufferFunctor(const QBufferFunctorPtr &functor) } } +/*! + * \return the buffer functor. + */ QBufferFunctorPtr QBuffer::bufferFunctor() const { Q_D(const QBuffer); @@ -139,12 +249,14 @@ QBufferFunctorPtr QBuffer::bufferFunctor() const } /*! - Sets the sync to \a sync. When sync is true, this will force data created - by a Qt3DRender::QBufferFunctor to also be updated on the frontend - Qt3DRender::QBuffer node. By default sync is false. - - \note: This has no effect if the buffer's data was set directly using the data - property. + * \property QBuffer::sync + * + * Holds the sync flag. When sync is true, this will force data created + * by a Qt3DRender::QBufferFunctor to also be updated on the frontend + * Qt3DRender::QBuffer node. By default sync is false. + * + * \note: This has no effect if the buffer's data was set directly using the data + * property. */ void QBuffer::setSync(bool sync) { @@ -155,10 +267,6 @@ void QBuffer::setSync(bool sync) } } -/*! - Returns whether data loaded by a Qt3DRender::QBufferFunctor should be - synched with the Qt3DRender::QBuffer node or not. - */ bool QBuffer::isSync() const { Q_D(const QBuffer); diff --git a/src/render/geometry/qcuboidgeometry.cpp b/src/render/geometry/qcuboidgeometry.cpp index 943d2c89a..e6354d090 100644 --- a/src/render/geometry/qcuboidgeometry.cpp +++ b/src/render/geometry/qcuboidgeometry.cpp @@ -489,6 +489,89 @@ void QCuboidGeometryPrivate::init() q->addAttribute(m_indexAttribute); } +/*! + * \qmltype CuboidGeometry + * \instantiates Qt3DRender::QCuboidGeometry + * \inqmlmodule Qt3D.Render + */ + +/*! + * \qmlproperty float CuboidGeometry::xExtent + * + * Holds the x extent. + */ + +/*! + * \qmlproperty float CuboidGeometry::yExtent + * + * Holds the y extent. + */ + +/*! + * \qmlproperty float CuboidGeometry::zExtent + * + * Holds the z extent. + */ + +/*! + * \qmlproperty size CuboidGeometry::yzMeshResolution + * + * Holds the y-z resolution. + */ + +/*! + * \qmlproperty size CuboidGeometry::xzMeshResolution + * + * Holds the x-z resolution. + */ + +/*! + * \qmlproperty size CuboidGeometry::xyMeshResolution + * + * Holds the x-y resolution. + */ + +/*! + * \qmlproperty Attribute CuboidGeometry::positionAttribute + * + * Holds the geometry position attribute. + */ + +/*! + * \qmlproperty Attribute CuboidGeometry::normalAttribute + * + * Holds the geometry normal attribute. + */ + +/*! + * \qmlproperty Attribute CuboidGeometry::texCoordAttribute + * + * Holds the geometry texture coordinate attribute. + */ + +/*! + * \qmlproperty Attribute CuboidGeometry::tangentAttribute + * + * Holds the geometry tangent attribute. + */ + +/*! + * \qmlproperty Attribute CuboidGeometry::indexAttribute + * + * Holds the geometry index attribute. + */ + +/*! + * \class Qt3DRender::QCuboidGeometry + * \inmodule Qt3DRender + * + * \inherits Qt3DRender::QGeometry + * + */ + +/*! + * Constructs a new QCuboidGeometry with \a parent. + */ QCuboidGeometry::QCuboidGeometry(QNode *parent) : QGeometry(*new QCuboidGeometryPrivate(), parent) { @@ -496,6 +579,9 @@ QCuboidGeometry::QCuboidGeometry(QNode *parent) d->init(); } +/*! + * \internal + */ QCuboidGeometry::QCuboidGeometry(QCuboidGeometryPrivate &dd, QNode *parent) : QGeometry(dd, parent) { @@ -503,11 +589,17 @@ QCuboidGeometry::QCuboidGeometry(QCuboidGeometryPrivate &dd, QNode *parent) d->init(); } +/*! + * Destroys this geometry. + */ QCuboidGeometry::~QCuboidGeometry() { QGeometry::cleanup(); } +/*! + * Updates indices based on mesh resolutions. + */ void QCuboidGeometry::updateIndices() { Q_D(QCuboidGeometry); @@ -521,6 +613,9 @@ void QCuboidGeometry::updateIndices() } +/*! + * Updates vertices based on mesh resolutions. + */ void QCuboidGeometry::updateVertices() { Q_D(QCuboidGeometry); @@ -601,66 +696,121 @@ void QCuboidGeometry::setXYMeshResolution(const QSize &resolution) } } +/*! + * \property QCuboidGeometry::xExtent + * + * Holds the x extent. + */ float QCuboidGeometry::xExtent() const { Q_D(const QCuboidGeometry); return d->m_xExtent; } +/*! + * \property QCuboidGeometry::yExtent + * + * Holds the y extent. + */ float QCuboidGeometry::yExtent() const { Q_D(const QCuboidGeometry); return d->m_yExtent; } +/*! + * \property QCuboidGeometry::zExtent + * + * Holds the z extent. + */ float QCuboidGeometry::zExtent() const { Q_D(const QCuboidGeometry); return d->m_zExtent; } +/*! + * \property QCuboidGeometry::yzMeshResolution + * + * Holds the y-z resolution. + */ QSize QCuboidGeometry::yzMeshResolution() const { Q_D(const QCuboidGeometry); return d->m_yzFaceResolution; } +/*! + * \property QCuboidGeometry::xzMeshResolution + * + * Holds the x-z resolution. + */ QSize QCuboidGeometry::xyMeshResolution() const { Q_D(const QCuboidGeometry); return d->m_xyFaceResolution; } +/*! + * \property QCuboidGeometry::xyMeshResolution + * + * Holds the x-y resolution. + */ QSize QCuboidGeometry::xzMeshResolution() const { Q_D(const QCuboidGeometry); return d->m_xzFaceResolution; } +/*! + * \property QCuboidGeometry::positionAttribute + * + * Holds the geometry position attribute. + */ QAttribute *QCuboidGeometry::positionAttribute() const { Q_D(const QCuboidGeometry); return d->m_positionAttribute; } +/*! + * \property QCuboidGeometry::normalAttribute + * + * Holds the geometry normal attribute. + */ QAttribute *QCuboidGeometry::normalAttribute() const { Q_D(const QCuboidGeometry); return d->m_normalAttribute; } +/*! + * \property QCuboidGeometry::texCoordAttribute + * + * Holds the geometry texture coordinate attribute. + */ QAttribute *QCuboidGeometry::texCoordAttribute() const { Q_D(const QCuboidGeometry); return d->m_texCoordAttribute; } +/*! + * \property QCuboidGeometry::tangentAttribute + * + * Holds the geometry tangent attribute. + */ QAttribute *QCuboidGeometry::tangentAttribute() const { Q_D(const QCuboidGeometry); return d->m_tangentAttribute; } +/*! + * \property QCuboidGeometry::indexAttribute + * + * Holds the geometry index attribute. + */ QAttribute *QCuboidGeometry::indexAttribute() const { Q_D(const QCuboidGeometry); diff --git a/src/render/geometry/qcuboidmesh.cpp b/src/render/geometry/qcuboidmesh.cpp index 90b9c05e0..7924308b6 100644 --- a/src/render/geometry/qcuboidmesh.cpp +++ b/src/render/geometry/qcuboidmesh.cpp @@ -41,6 +41,61 @@ QT_BEGIN_NAMESPACE namespace Qt3DRender { +/*! + * \qmltype QCuboidMesh + * \instantiates Qt3DRender::QCuboidMesh + * \inqmlmodule Qt3D.Render + * \brief A cube mesh. + */ + +/*! + * \qmlproperty float CuboidMesh::xExtent + * + * Holds the x extent. + */ + +/*! + * \qmlproperty float CuboidMesh::yExtent + * + * Holds the y extent. + */ + +/*! + * \qmlproperty float CuboidMesh::zExtent + * + * Holds the z extent. + */ + +/*! + * \qmlproperty size CuboidMesh::yzMeshResolution + * + * Holds the y-z resolution. + */ + +/*! + * \qmlproperty size CuboidMesh::xzMeshResolution + * + * Holds the x-z resolution. + */ + +/*! + * \qmlproperty size CuboidMesh::xyMeshResolution + * + * Holds the x-y resolution. + */ + +/*! + * \class Qt3DRender::QCuboidMesh + * \inmodule Qt3DRender + * + * \inherits Qt3DRender::QGeometryRenderer + * + * \brief A cube mesh. + */ + +/*! + * Constructs a new QCuboidMedh with \a parent. + */ QCuboidMesh::QCuboidMesh(QNode *parent) : QGeometryRenderer(parent) { @@ -54,6 +109,9 @@ QCuboidMesh::QCuboidMesh(QNode *parent) QGeometryRenderer::setGeometry(geometry); } +/*! + * Destroys this cube mesh. + */ QCuboidMesh::~QCuboidMesh() { QNode::cleanup(); @@ -64,6 +122,11 @@ void QCuboidMesh::setXExtent(float xExtent) static_cast<QCuboidGeometry *>(geometry())->setXExtent(xExtent); } +/*! + * \property QCuboidMesh::xExtent + * + * Holds the x extent. + */ float QCuboidMesh::xExtent() const { return static_cast<QCuboidGeometry *>(geometry())->xExtent(); @@ -74,6 +137,11 @@ void QCuboidMesh::setYExtent(float yExtent) static_cast<QCuboidGeometry *>(geometry())->setYExtent(yExtent); } +/*! + * \property QCuboidMesh::yExtent + * + * Holds the y extent. + */ float QCuboidMesh::yExtent() const { return static_cast<QCuboidGeometry *>(geometry())->yExtent(); @@ -84,6 +152,11 @@ void QCuboidMesh::setZExtent(float zExtent) static_cast<QCuboidGeometry *>(geometry())->setZExtent(zExtent); } +/*! + * \property QCuboidMesh::zExtent + * + * Holds the z extent. + */ float QCuboidMesh::zExtent() const { return static_cast<QCuboidGeometry *>(geometry())->zExtent(); @@ -94,6 +167,11 @@ void QCuboidMesh::setYZMeshResolution(const QSize &resolution) static_cast<QCuboidGeometry *>(geometry())->setYZMeshResolution(resolution); } +/*! + * \property QCuboidMesh::yzMeshResolution + * + * Holds the y-z resolution. + */ QSize QCuboidMesh::yzMeshResolution() const { return static_cast<QCuboidGeometry *>(geometry())->yzMeshResolution(); @@ -104,6 +182,11 @@ void QCuboidMesh::setXZMeshResolution(const QSize &resolution) static_cast<QCuboidGeometry *>(geometry())->setXZMeshResolution(resolution); } +/*! + * \property QCuboidMesh::xzMeshResolution + * + * Holds the x-z resolution. + */ QSize QCuboidMesh::xzMeshResolution() const { return static_cast<QCuboidGeometry *>(geometry())->xzMeshResolution(); @@ -114,6 +197,11 @@ void QCuboidMesh::setXYMeshResolution(const QSize &resolution) static_cast<QCuboidGeometry *>(geometry())->setXYMeshResolution(resolution); } +/*! + * \property QCuboidMesh::xyMeshResolution + * + * Holds the x-y resolution. + */ QSize QCuboidMesh::xyMeshResolution() const { return static_cast<QCuboidGeometry *>(geometry())->xyMeshResolution(); diff --git a/src/render/geometry/qcylindergeometry.cpp b/src/render/geometry/qcylindergeometry.cpp index 8d8d293d8..2acd8a75f 100644 --- a/src/render/geometry/qcylindergeometry.cpp +++ b/src/render/geometry/qcylindergeometry.cpp @@ -342,6 +342,70 @@ void QCylinderGeometryPrivate::init() q->addAttribute(m_indexAttribute); } +/*! + * \qmltype CylinderGeometry + * \instantiates Qt3DRender::QCylinderGeometry + * \inqmlmodule Qt3D.Render + */ + +/*! + * \qmlproperty int CylinderGeometry::rings + * + * Holds the number of rings in the cylinder. + */ + +/*! + * \qmlproperty int CylinderGeometry::slices + * + * Holds the number of slices in the cylinder. + */ + +/*! + * \qmlproperty float CylinderGeometry::radius + * + * Holds the radius of the cylinder. + */ + +/*! + * \qmlproperty float CylinderGeometry::length + * + * Holds the length of the cylinder. + */ + +/*! + * \qmlproperty Attribute CylinderGeometry::positionAttribute + * + * Holds the geometry position attribute. + */ + +/*! + * \qmlproperty Attribute CylinderGeometry::normalAttribute + * + * Holds the geometry normal attribute. + */ + +/*! + * \qmlproperty Attribute CylinderGeometry::texCoordAttribute + * + * Holds the geometry texture coordinate attribute. + */ + +/*! + * \qmlproperty Attribute CylinderGeometry::indexAttribute + * + * Holds the geometry index attribute. + */ + +/*! + * \class Qt3DRender::QCylinderGeometry + * \inmodule Qt3DRender + * + * \inherits Qt3DRender::QGeometry + */ + +/*! + * Constructs a new QCylinderMesh with \a parent. + */ QCylinderGeometry::QCylinderGeometry(QNode *parent) : QGeometry(*new QCylinderGeometryPrivate, parent) { @@ -349,6 +413,9 @@ QCylinderGeometry::QCylinderGeometry(QNode *parent) d->init(); } +/*! + * \internal + */ QCylinderGeometry::QCylinderGeometry(QCylinderGeometryPrivate &dd, QNode *parent) :QGeometry(dd, parent) { @@ -356,11 +423,17 @@ QCylinderGeometry::QCylinderGeometry(QCylinderGeometryPrivate &dd, QNode *parent d->init(); } +/*! + * Destroys the geometry. + */ QCylinderGeometry::~QCylinderGeometry() { QGeometry::cleanup(); } +/*! + * Updates the vertices based on rings and slices. + */ void QCylinderGeometry::updateVertices() { Q_D(QCylinderGeometry); @@ -372,6 +445,9 @@ void QCylinderGeometry::updateVertices() d->m_vertexBuffer->setBufferFunctor(QBufferFunctorPtr(new CylinderVertexDataFunctor(d->m_rings, d->m_slices, d->m_radius, d->m_length))); } +/*! + * Updates the indices based on rings and slices. + */ void QCylinderGeometry::updateIndices() { Q_D(QCylinderGeometry); @@ -423,48 +499,88 @@ void QCylinderGeometry::setLength(float length) } } +/*! + * \property QCylinderGeometry::rings + * + * Holds the number of rings in the cylinder. + */ int QCylinderGeometry::rings() const { Q_D(const QCylinderGeometry); return d->m_rings; } +/*! + * \property QCylinderGeometry::slices + * + * Holds the number of slices in the cylinder. + */ int QCylinderGeometry::slices() const { Q_D(const QCylinderGeometry); return d->m_slices; } +/*! + * \property QCylinderGeometry::radius + * + * Holds the radius of the cylinder. + */ float QCylinderGeometry::radius() const { Q_D(const QCylinderGeometry); return d->m_radius; } +/*! + * \property QCylinderGeometry::length + * + * Holds the length of the cylinder. + */ float QCylinderGeometry::length() const { Q_D(const QCylinderGeometry); return d->m_length; } +/*! + * \property QCylinderGeometry::positionAttribute + * + * Holds the geometry position attribute. + */ QAttribute *QCylinderGeometry::positionAttribute() const { Q_D(const QCylinderGeometry); return d->m_positionAttribute; } +/*! + * \property QCylinderGeometry::normalAttribute + * + * Holds the geometry normal attribute. + */ QAttribute *QCylinderGeometry::normalAttribute() const { Q_D(const QCylinderGeometry); return d->m_normalAttribute; } +/*! + * \property QCylinderGeometry::texCoordAttribute + * + * Holds the geometry texture coordinate attribute. + */ QAttribute *QCylinderGeometry::texCoordAttribute() const { Q_D(const QCylinderGeometry); return d->m_texCoordAttribute; } +/*! + * \property QCylinderGeometry::indexAttribute + * + * Holds the geometry index attribute. + */ QAttribute *QCylinderGeometry::indexAttribute() const { Q_D(const QCylinderGeometry); diff --git a/src/render/geometry/qcylindermesh.cpp b/src/render/geometry/qcylindermesh.cpp index 4c714c06a..5893acefc 100644 --- a/src/render/geometry/qcylindermesh.cpp +++ b/src/render/geometry/qcylindermesh.cpp @@ -51,6 +51,49 @@ QT_BEGIN_NAMESPACE namespace Qt3DRender { +/*! + * \qmltype CylinderMesh + * \instantiates Qt3DRender::QCylinderMesh + * \inqmlmodule Qt3D.Render + * \brief A cylindrical mesh. + */ + +/*! + * \qmlproperty int CylinderMesh::rings + * + * Holds the number of rings in the mesh. + */ + +/*! + * \qmlproperty int CylinderMesh::slices + * + * Holds the number of slices in the mesh. + */ + +/*! + * \qmlproperty float CylinderMesh::radius + * + * Holds the radius of the cylinder. + */ + +/*! + * \qmlproperty float CylinderMesh::length + * + * Holds the length of the cylinder. + */ + +/*! + * \class Qt3DRender::QCylinderMesh + * \inmodule Qt3DRender + * + * \inherits Qt3DRender::QGeometryRenderer + * + * \brief A cylindrical mesh. + */ + +/*! + * Constructs a new QCylinderMesh with \a parent. + */ QCylinderMesh::QCylinderMesh(QNode *parent) : QGeometryRenderer(parent) { @@ -63,6 +106,9 @@ QCylinderMesh::QCylinderMesh(QNode *parent) QGeometryRenderer::setGeometry(geometry); } +/*! + * Destroys this cylinder mesh. + */ QCylinderMesh::~QCylinderMesh() { QNode::cleanup(); @@ -88,21 +134,41 @@ void QCylinderMesh::setLength(float length) static_cast<QCylinderGeometry *>(geometry())->setLength(length); } +/*! + * \property QCylinderMesh::rings + * + * Holds the number of rings in the mesh. + */ int QCylinderMesh::rings() const { return static_cast<QCylinderGeometry *>(geometry())->rings(); } +/*! + * \property QCylinderMesh::slices + * + * Holds the number of slices in the mesh. + */ int QCylinderMesh::slices() const { return static_cast<QCylinderGeometry *>(geometry())->slices(); } +/*! + * \property QCylinderMesh::radius + * + * Holds the radius of the cylinder. + */ float QCylinderMesh::radius() const { return static_cast<QCylinderGeometry *>(geometry())->radius(); } +/*! + * \property QCylinderMesh::length + * + * Holds the length of the cylinder. + */ float QCylinderMesh::length() const { return static_cast<QCylinderGeometry *>(geometry())->length(); diff --git a/src/render/geometry/qgeometry.cpp b/src/render/geometry/qgeometry.cpp index 10216b59c..b2a7e1671 100644 --- a/src/render/geometry/qgeometry.cpp +++ b/src/render/geometry/qgeometry.cpp @@ -47,6 +47,9 @@ using namespace Qt3DCore; namespace Qt3DRender { +/*! + * \internal + */ void QGeometryPrivate::_q_boundingVolumeSpecifierChanged(QAbstractAttribute *) { if (m_changeArbiter != Q_NULLPTR) { @@ -60,6 +63,42 @@ void QGeometryPrivate::_q_boundingVolumeSpecifierChanged(QAbstractAttribute *) } } +/*! + * \qmltype Geometry + * \instantiates Qt3DRender::QGeometry + * \inqmlmodule Qt3D.Render + */ + +/*! + * \qmlproperty int Geometry::verticesPerPatch + * + * Holds vertices per patch. + */ + +/*! + * \qmlproperty BoundingVolumeSpecifier Geometry::boundingVolumeSpecifier + * + * Holds bounding volume specifier. + */ + +/*! + * \class Qt3DRender::QGeometry + * \inmodule Qt3DRender + * + * \inherits Qt3DCore::QNode + * + */ + +/*! + * \typedef Qt3DRender::QAttributeList + * \relates Qt3DRender::QGeometry + * + * A vector of {QAbstractAttribute}s. + */ + +/*! + * Constructs a new QGeometry with \a parent. + */ QGeometry::QGeometry(QNode *parent) : QNode(*new QGeometryPrivate(), parent) { @@ -68,6 +107,9 @@ QGeometry::QGeometry(QNode *parent) this, SLOT(_q_boundingVolumeSpecifierChanged(QAbstractAttribute *))); } +/*! + * \internal + */ QGeometry::QGeometry(QGeometryPrivate &dd, QNode *parent) : QNode(dd, parent) { @@ -76,11 +118,17 @@ QGeometry::QGeometry(QGeometryPrivate &dd, QNode *parent) this, SLOT(_q_boundingVolumeSpecifierChanged(QAbstractAttribute *))); } +/*! + * Destroys this geometry. + */ QGeometry::~QGeometry() { QNode::cleanup(); } +/*! + * Adds an \a attribute to this geometry. + */ void QGeometry::addAttribute(QAbstractAttribute *attribute) { Q_D(QGeometry); @@ -103,6 +151,9 @@ void QGeometry::addAttribute(QAbstractAttribute *attribute) } } +/*! + * Removes the given \a attribute from this geometry. + */ void QGeometry::removeAttribute(QAbstractAttribute *attribute) { Q_D(QGeometry); @@ -124,24 +175,40 @@ void QGeometry::setVerticesPerPatch(int verticesPerPatch) } } +/*! + * \property QGeometry::verticesPerPatch + * + * Holds vertices per patch. + */ int QGeometry::verticesPerPatch() const { Q_D(const QGeometry); return d->m_verticesPerPatch; } +/*! + * \property QGeometry::boundingVolumeSpecifier + * + * Holds bounding volume specifier. + */ QBoundingVolumeSpecifier *QGeometry::boundingVolumeSpecifier() { Q_D(QGeometry); return &d->m_boundingVolumeSpecifier; } +/*! + * \return the list of attributes in this geometry. + */ QAttributeList QGeometry::attributes() const { Q_D(const QGeometry); return d->m_attributes; } +/*! + * \internal + */ void QGeometry::copy(const QNode *ref) { QNode::copy(ref); diff --git a/src/render/geometry/qgeometryrenderer.cpp b/src/render/geometry/qgeometryrenderer.cpp index 29a75ffc4..335c83daa 100644 --- a/src/render/geometry/qgeometryrenderer.cpp +++ b/src/render/geometry/qgeometryrenderer.cpp @@ -59,69 +59,202 @@ QGeometryRendererPrivate::QGeometryRendererPrivate() { } +/*! + * \qmltype GeometryRenderer + * \instantiates Qt3DRender::QGeometryRenderer + * \inqmlmodule Qt3D.Render + */ + +/*! + * \qmlproperty int GeometryRenderer::instanceCount + * + * Holds the instance count. + */ + +/*! + * \qmlproperty int GeometryRenderer::primitiveCount + * + * Holds the primitive count. + */ + +/*! + * \qmlproperty int GeometryRenderer::baseVertex + * + * Holds the base vertex. + */ + +/*! + * \qmlproperty int GeometryRenderer::baseInstance + * + * Holds the base instance. + */ + +/*! + * \qmlproperty int GeometryRenderer::restartIndex + * + * Holds the restart index. + */ + +/*! + * \qmlproperty bool GeometryRenderer::primitiveRestart + * + * Holds the primitive restart flag. + */ + +/*! + * \qmlproperty Geometry GeometryRenderer::geometry + * + * Holds the geometry. + */ + +/*! + * \qmlproperty QGeometryRenderer::PrimitiveType GeometryRenderer::primitiveType + * + * Holds the primitive type. + */ + +/*! + * \class Qt3DRender::QGeometryRenderer + * \inmodule Qt3DRender + * + * \inherits Qt3DCore::QComponent + * + */ + +/*! + * \enum QGeometryRenderer::PrimitiveType + * + * The type of the primitive. + * + * \value Points + * \value Lines + * \value LineLoop + * \value LineStrip + * \value Triangles + * \value TriangleStrip + * \value TriangleFan + * \value LinesAdjacency + * \value TrianglesAdjacency + * \value LineStripAdjacency + * \value TriangleStripAdjacency + * \value Patches + */ + +/*! + * Constructs a new QGeometryRenderer with \a parent. + */ QGeometryRenderer::QGeometryRenderer(QNode *parent) : QComponent(*new QGeometryRendererPrivate(), parent) { } +/*! + * Destroys this geometry renderer. + */ QGeometryRenderer::~QGeometryRenderer() { QComponent::cleanup(); } +/*! + * \internal + */ QGeometryRenderer::QGeometryRenderer(QGeometryRendererPrivate &dd, QNode *parent) : QComponent(dd, parent) { } +/*! + * \property QGeometryRenderer::instanceCount + * + * Holds the instance count. + */ int QGeometryRenderer::instanceCount() const { Q_D(const QGeometryRenderer); return d->m_instanceCount; } +/*! + * \property QGeometryRenderer::primitiveCount + * + * Holds the primitive count. + */ int QGeometryRenderer::primitiveCount() const { Q_D(const QGeometryRenderer); return d->m_primitiveCount; } +/*! + * \property QGeometryRenderer::baseVertex + * + * Holds the base vertex. + */ int QGeometryRenderer::baseVertex() const { Q_D(const QGeometryRenderer); return d->m_baseVertex; } +/*! + * \property QGeometryRenderer::baseInstance + * + * Holds the base instance. + */ int QGeometryRenderer::baseInstance() const { Q_D(const QGeometryRenderer); return d->m_baseInstance; } +/*! + * \property QGeometryRenderer::restartIndex + * + * Holds the restart index. + */ int QGeometryRenderer::restartIndex() const { Q_D(const QGeometryRenderer); return d->m_restartIndex; } +/*! + * \property QGeometryRenderer::primitiveRestart + * + * Holds the primitive restart flag. + */ bool QGeometryRenderer::primitiveRestart() const { Q_D(const QGeometryRenderer); return d->m_primitiveRestart; } +/*! + * \property QGeometryRenderer::geometry + * + * Holds the geometry. + */ QGeometry *QGeometryRenderer::geometry() const { Q_D(const QGeometryRenderer); return d->m_geometry; } +/*! + * \property QGeometryRenderer::primitiveType + * + * Holds the primitive type. + */ QGeometryRenderer::PrimitiveType QGeometryRenderer::primitiveType() const { Q_D(const QGeometryRenderer); return d->m_primitiveType; } +/*! + * \return the geometry functor. + */ QGeometryFunctorPtr QGeometryRenderer::geometryFunctor() const { Q_D(const QGeometryRenderer); @@ -227,6 +360,9 @@ void QGeometryRenderer::setPrimitiveType(QGeometryRenderer::PrimitiveType primit emit primitiveTypeChanged(primitiveType); } +/*! + * Sets the geometry \a functor. + */ void QGeometryRenderer::setGeometryFunctor(const QGeometryFunctorPtr &functor) { Q_D(QGeometryRenderer); @@ -241,6 +377,9 @@ void QGeometryRenderer::setGeometryFunctor(const QGeometryFunctorPtr &functor) } } +/*! + * \internal + */ void QGeometryRenderer::copy(const QNode *ref) { QComponent::copy(ref); @@ -256,6 +395,9 @@ void QGeometryRenderer::copy(const QNode *ref) d_func()->m_functor = other->d_func()->m_functor; } +/*! + * \internal + */ void QGeometryRenderer::sceneChangeEvent(const Qt3DCore::QSceneChangePtr &e) { Q_D(QGeometryRenderer); diff --git a/src/render/geometry/qmesh.cpp b/src/render/geometry/qmesh.cpp index 873769bd7..54b9d8e35 100644 --- a/src/render/geometry/qmesh.cpp +++ b/src/render/geometry/qmesh.cpp @@ -72,11 +72,45 @@ QMeshPrivate::QMeshPrivate() { } +/*! + * \qmltype Mesh + * \instantiates Qt3DRender::QMesh + * \inqmlmodule Qt3D.Render + * \brief A custom mesh. + */ + +/*! + * \qmlproperty url Mesh::source + * + * Holds the source url to the file containing the custom mesh. + */ + +/*! + * \qmlproperty string Mesh::subMesh + * + * Holds the subMesh for the mesh. + */ + +/*! + * \class Qt3DRender::QMesh + * \inmodule Qt3DRender + * + * \inherits Qt3DRender::QGeometryRenderer + * + * \brief A custom mesh. + */ + +/*! + * Constructs a new QMesh with \a parent. + */ QMesh::QMesh(QNode *parent) : QGeometryRenderer(*new QMeshPrivate, parent) { } +/*! + * Destroys this mesh. + */ QMesh::~QMesh() { QNode::cleanup(); @@ -99,6 +133,11 @@ void QMesh::setSource(const QUrl& source) emit sourceChanged(source); } +/*! + * \property QMesh::source + * + * Holds the \a source url to the file containing the custom mesh. + */ QUrl QMesh::source() const { Q_D(const QMesh); @@ -116,12 +155,20 @@ void QMesh::setSubMesh(const QString &subMesh) emit subMeshChanged(subMesh); } +/*! + * \property QMesh::subMesh + * + * Holds the subMesh for the mesh. + */ QString QMesh::subMesh() const { Q_D(const QMesh); return d->m_subMesh; } +/*! + * \internal + */ MeshFunctor::MeshFunctor(const QUrl &sourcePath, const QString& subMesh) : QGeometryFunctor() , m_sourcePath(sourcePath) @@ -129,6 +176,9 @@ MeshFunctor::MeshFunctor(const QUrl &sourcePath, const QString& subMesh) { } +/*! + * \internal + */ QGeometry *MeshFunctor::operator()() { if (m_sourcePath.isEmpty()) { @@ -153,6 +203,9 @@ QGeometry *MeshFunctor::operator()() return Q_NULLPTR; } +/*! + * \internal + */ bool MeshFunctor::operator ==(const QGeometryFunctor &other) const { const MeshFunctor *otherFunctor = functor_cast<MeshFunctor>(&other); diff --git a/src/render/geometry/qplanegeometry.cpp b/src/render/geometry/qplanegeometry.cpp index ad571dbb4..57ca9b7d5 100644 --- a/src/render/geometry/qplanegeometry.cpp +++ b/src/render/geometry/qplanegeometry.cpp @@ -201,6 +201,70 @@ public: QSize m_resolution; }; +/*! + * \qmltype PlaneGeometry + * \instantiates Qt3DRender::QPlaneGeometry + * \inqmlmodule Qt3D.Render + */ + +/*! + * \qmlproperty float PlaneGeometry::width + * + * Holds the plane width. + */ + +/*! + * \qmlproperty float PlaneGeometry::height + * + * Holds the plane height. + */ + +/*! + * \qmlproperty size PlaneGeometry::resolution + * + * Holds the plane resolution. + */ + +/*! + * \qmlproperty Attribute PlaneGeometry::positionAttribute + * + * Holds the geometry position attribute. + */ + +/*! + * \qmlproperty Attribute PlaneGeometry::normalAttribute + * + * Holds the geometry normal attribute. + */ + +/*! + * \qmlproperty Attribute PlaneGeometry::texCoordAttribute + * + * Holds the geometry texture coordinate attribute. + */ + +/*! + * \qmlproperty Attribute PlaneGeometry::tangentAttribute + * + * Holds the geometry tangent attribute. + */ + +/*! + * \qmlproperty Attribute PlaneGeometry::indexAttribute + * + * Holds the geometry index attribute. + */ + +/*! + * \class Qt3DRender::QPlaneGeometry + * \inmodule Qt3DRender + * + * \inherits Qt3DRender::QGeometry + */ + +/*! + * Constructs a new QPlaneGeometry with \a parent. + */ QPlaneGeometry::QPlaneGeometry(QPlaneGeometry::QNode *parent) : QGeometry(*new QPlaneGeometryPrivate(), parent) { @@ -208,6 +272,9 @@ QPlaneGeometry::QPlaneGeometry(QPlaneGeometry::QNode *parent) d->init(); } +/*! + * \internal + */ QPlaneGeometry::QPlaneGeometry(QPlaneGeometryPrivate &dd, QNode *parent) : QGeometry(dd, parent) { @@ -215,11 +282,17 @@ QPlaneGeometry::QPlaneGeometry(QPlaneGeometryPrivate &dd, QNode *parent) d->init(); } +/*! + * Destroys this geometry. + */ QPlaneGeometry::~QPlaneGeometry() { QGeometry::cleanup(); } +/*! + * Updates vertices based on resolution. + */ void QPlaneGeometry::updateVertices() { Q_D(QPlaneGeometry); @@ -232,6 +305,9 @@ void QPlaneGeometry::updateVertices() d->m_vertexBuffer->setBufferFunctor(QBufferFunctorPtr(new PlaneVertexBufferFunctor(d->m_width, d->m_height, d->m_meshResolution))); } +/*! + * Updates indices based on resolution. + */ void QPlaneGeometry::updateIndices() { Q_D(QPlaneGeometry); @@ -273,48 +349,88 @@ void QPlaneGeometry::setHeight(float height) emit heightChanged(height); } +/*! + * \property QPlaneGeometry::resolution + * + * Holds the plane resolution. + */ QSize QPlaneGeometry::resolution() const { Q_D(const QPlaneGeometry); return d->m_meshResolution; } +/*! + * \property QPlaneGeometry::width + * + * Holds the plane width. + */ float QPlaneGeometry::width() const { Q_D(const QPlaneGeometry); return d->m_width; } +/*! + * \property QPlaneGeometry::height + * + * Holds the plane height. + */ float QPlaneGeometry::height() const { Q_D(const QPlaneGeometry); return d->m_height; } +/*! + * \property QPlaneGeometry::positionAttribute + * + * Holds the geometry position attribute. + */ QAttribute *QPlaneGeometry::positionAttribute() const { Q_D(const QPlaneGeometry); return d->m_positionAttribute; } +/*! + * \property QPlaneGeometry::normalAttribute + * + * Holds the geometry normal attribute. + */ QAttribute *QPlaneGeometry::normalAttribute() const { Q_D(const QPlaneGeometry); return d->m_normalAttribute; } +/*! + * \property QPlaneGeometry::texCoordAttribute + * + * Holds the geometry texture coordinate attribute. + */ QAttribute *QPlaneGeometry::texCoordAttribute() const { Q_D(const QPlaneGeometry); return d->m_texCoordAttribute; } +/*! + * \property QPlaneGeometry::tangentAttribute + * + * Holds the geometry tangent attribute. + */ QAttribute *QPlaneGeometry::tangentAttribute() const { Q_D(const QPlaneGeometry); return d->m_tangentAttribute; } +/*! + * \property QPlaneGeometry::indexAttribute + * + * Holds the geometry index attribute. + */ QAttribute *QPlaneGeometry::indexAttribute() const { Q_D(const QPlaneGeometry); diff --git a/src/render/geometry/qplanemesh.cpp b/src/render/geometry/qplanemesh.cpp index 158b8e7ed..ce7860fea 100644 --- a/src/render/geometry/qplanemesh.cpp +++ b/src/render/geometry/qplanemesh.cpp @@ -41,6 +41,43 @@ QT_BEGIN_NAMESPACE namespace Qt3DRender { +/*! + * \qmltype PlaneMesh + * \instantiates Qt3DRender::QPlaneMesh + * \inqmlmodule Qt3D.Render + * \brief A square planar mesh. + */ + +/*! + * \qmlproperty float PlaneMesh::width + * + * Holds the plane width. + */ + +/*! + * \qmlproperty float PlaneMesh::height + * + * Holds the plane height. + */ + +/*! + * \qmlproperty size PlaneMesh::meshResolution + * + * Holds the plane resolution. + */ + +/*! + * \class Qt3DRender::QPlaneMesh + * \inmodule Qt3DRender + * + * \inherits Qt3DRender::QGeometryRenderer + * + * \brief A square planar mesh. + */ + +/*! + * Constructs a new QPlaneMesh with \a parent. + */ QPlaneMesh::QPlaneMesh(QNode *parent) : QGeometryRenderer(parent) { @@ -51,6 +88,9 @@ QPlaneMesh::QPlaneMesh(QNode *parent) QGeometryRenderer::setGeometry(geometry); } +/*! + * Destroys this plane mesh. + */ QPlaneMesh::~QPlaneMesh() { QNode::cleanup(); @@ -61,6 +101,11 @@ void QPlaneMesh::setWidth(float width) static_cast<QPlaneGeometry *>(geometry())->setWidth(width); } +/*! + * \property QPlaneMesh::width + * + * Holds the plane width. + */ float QPlaneMesh::width() const { return static_cast<QPlaneGeometry *>(geometry())->width(); @@ -71,6 +116,11 @@ void QPlaneMesh::setHeight(float height) static_cast<QPlaneGeometry *>(geometry())->setHeight(height); } +/*! + * \property QPlaneMesh::height + * + * Holds the plane height. + */ float QPlaneMesh::height() const { return static_cast<QPlaneGeometry *>(geometry())->height(); @@ -81,6 +131,11 @@ void QPlaneMesh::setMeshResolution(const QSize &resolution) static_cast<QPlaneGeometry *>(geometry())->setResolution(resolution); } +/*! + * \property QPlaneMesh::meshResolution + * + * Holds the plane resolution. + */ QSize QPlaneMesh::meshResolution() const { return static_cast<QPlaneGeometry *>(geometry())->resolution(); diff --git a/src/render/geometry/qspheregeometry.cpp b/src/render/geometry/qspheregeometry.cpp index 2496b3e41..94b90bca1 100644 --- a/src/render/geometry/qspheregeometry.cpp +++ b/src/render/geometry/qspheregeometry.cpp @@ -308,6 +308,76 @@ void QSphereGeometryPrivate::init() q->addAttribute(m_indexAttribute); } +/*! + * \qmltype SphereGeometry + * \instantiates Qt3DRender::QSphereGeometry + * \inqmlmodule Qt3D.Render + */ + +/*! + * \qmlproperty int SphereGeometry::rings + * + * Holds the number of rings in the sphere. + */ + +/*! + * \qmlproperty int SphereGeometry::slices + * + * Holds the number of slices in the sphere. + */ + +/*! + * \qmlproperty float SphereGeometry::radius + * + * Holds the radius of the sphere. + */ + +/*! + * \qmlproperty bool SphereGeometry::generateTangents + * + * Holds the value of the automatic tangent generation flag. + */ + +/*! + * \qmlproperty Attribute SphereGeometry::positionAttribute + * + * Holds the geometry position attribute. + */ + +/*! + * \qmlproperty Attribute SphereGeometry::normalAttribute + * + * Holds the geometry normal attribute. + */ + +/*! + * \qmlproperty Attribute SphereGeometry::texCoordAttribute + * + * Holds the geometry texture coordinate attribute. + */ + +/*! + * \qmlproperty Attribute SphereGeometry::tangentAttribute + * + * Holds the geometry tangent attribute. + */ + +/*! + * \qmlproperty Attribute SphereGeometry::indexAttribute + * + * Holds the geometry index attribute. + */ + +/*! + * \class Qt3DRender::QSphereGeometry + * \inmodule Qt3DRender + * + * \inherits Qt3DRender::QGeometry + */ + +/*! + * Constructs a new QSphereGeometry with \a parent. + */ QSphereGeometry::QSphereGeometry(QNode *parent) : QGeometry(*new QSphereGeometryPrivate(), parent) { @@ -315,6 +385,9 @@ QSphereGeometry::QSphereGeometry(QNode *parent) d->init(); } +/*! + * \internal + */ QSphereGeometry::QSphereGeometry(QSphereGeometryPrivate &dd, QNode *parent) : QGeometry(dd, parent) { @@ -322,11 +395,17 @@ QSphereGeometry::QSphereGeometry(QSphereGeometryPrivate &dd, QNode *parent) d->init(); } +/*! + * Destroys this geometry. + */ QSphereGeometry::~QSphereGeometry() { QGeometry::cleanup(); } +/*! + * Updates vertices based on rings and slices. + */ void QSphereGeometry::updateVertices() { Q_D(QSphereGeometry); @@ -338,6 +417,9 @@ void QSphereGeometry::updateVertices() d->m_vertexBuffer->setBufferFunctor(QBufferFunctorPtr(new SphereVertexDataFunctor(d->m_rings, d->m_slices, d->m_radius))); } +/*! + * Updates indices based on rings and slices. + */ void QSphereGeometry::updateIndices() { Q_D(QSphereGeometry); @@ -392,54 +474,99 @@ void QSphereGeometry::setGenerateTangents(bool gen) } } +/*! + * \property QSphereGeometry::generateTangents + * + * Holds the value of the automatic tangent generation flag. + */ bool QSphereGeometry::generateTangents() const { Q_D(const QSphereGeometry); return d->m_generateTangents; } +/*! + * \property QSphereGeometry::rings + * + * Holds the number of rings in the sphere. + */ int QSphereGeometry::rings() const { Q_D(const QSphereGeometry); return d->m_rings; } +/*! + * \property QSphereGeometry::slices + * + * Holds the number of slices in the sphere. + */ int QSphereGeometry::slices() const { Q_D(const QSphereGeometry); return d->m_slices; } +/*! + * \property QSphereGeometry::radius + * + * Holds the radius of the sphere. + */ float QSphereGeometry::radius() const { Q_D(const QSphereGeometry); return d->m_radius; } +/*! + * \property QSphereGeometry::positionAttribute + * + * Holds the geometry position attribute. + */ QAttribute *QSphereGeometry::positionAttribute() const { Q_D(const QSphereGeometry); return d->m_positionAttribute; } +/*! + * \property QSphereGeometry::normalAttribute + * + * Holds the geometry normal attribute. + */ QAttribute *QSphereGeometry::normalAttribute() const { Q_D(const QSphereGeometry); return d->m_normalAttribute; } +/*! + * \property QSphereGeometry::texCoordAttribute + * + * Holds the geometry texture coordinate attribute. + */ QAttribute *QSphereGeometry::texCoordAttribute() const { Q_D(const QSphereGeometry); return d->m_texCoordAttribute; } +/*! + * \property QSphereGeometry::tangentAttribute + * + * Holds the geometry tangent attribute. + */ QAttribute *QSphereGeometry::tangentAttribute() const { Q_D(const QSphereGeometry); return d->m_tangentAttribute; } +/*! + * \property QSphereGeometry::indexAttribute + * + * Holds the geometry index attribute. + */ QAttribute *QSphereGeometry::indexAttribute() const { Q_D(const QSphereGeometry); diff --git a/src/render/geometry/qspheremesh.cpp b/src/render/geometry/qspheremesh.cpp index bd93c0ab6..47fbf9ea4 100644 --- a/src/render/geometry/qspheremesh.cpp +++ b/src/render/geometry/qspheremesh.cpp @@ -42,6 +42,49 @@ QT_BEGIN_NAMESPACE namespace Qt3DRender { +/*! + * \qmltype SphereMesh + * \instantiates Qt3DRender::QSphereMesh + * \inqmlmodule Qt3D.Render + * \brief A spherical mesh. + */ + +/*! + * \qmlproperty int SphereMesh::rings + * + * Holds the number of rings in the mesh. + */ + +/*! + * \qmlproperty int SphereMesh::slices + * + * Holds the number of slices in the mesh. + */ + +/*! + * \qmlproperty float SphereMesh::radius + * + * Holds the radius of the sphere. + */ + +/*! + * \qmlproperty bool SphereMesh::generateTangents + * + * Holds the value of the automatic tangent generation flag. + */ + +/*! + * \class Qt3DRender::QSphereMesh + * \inmodule Qt3DRender + * + * \inherits Qt3DRender::QGeometryRenderer + * + * \brief A spherical mesh. + */ + +/*! + * Constructs a new QSphereMesh with \a parent. + */ QSphereMesh::QSphereMesh(QNode *parent) : QGeometryRenderer(parent) { @@ -53,6 +96,9 @@ QSphereMesh::QSphereMesh(QNode *parent) QGeometryRenderer::setGeometry(geometry); } +/*! + * Destroys this sphere mesh. + */ QSphereMesh::~QSphereMesh() { QNode::cleanup(); @@ -78,21 +124,41 @@ void QSphereMesh::setGenerateTangents(bool gen) static_cast<QSphereGeometry *>(geometry())->setGenerateTangents(gen); } +/*! + * \property QSphereMesh::generateTangents + * + * Holds the value of the automatic tangent generation flag. + */ bool QSphereMesh::generateTangents() const { return static_cast<QSphereGeometry *>(geometry())->generateTangents(); } +/*! + * \property QSphereMesh::rings + * + * Holds the number of rings in the mesh. + */ int QSphereMesh::rings() const { return static_cast<QSphereGeometry *>(geometry())->rings(); } +/*! + * \property QSphereMesh::slices + * + * Holds the number of slices in the mesh. + */ int QSphereMesh::slices() const { return static_cast<QSphereGeometry *>(geometry())->slices(); } +/*! + * \property QSphereMesh::radius + * + * Holds the radius of the sphere. + */ float QSphereMesh::radius() const { return static_cast<QSphereGeometry *>(geometry())->radius(); diff --git a/src/render/geometry/qtorusgeometry.cpp b/src/render/geometry/qtorusgeometry.cpp index d2d4fae4a..cedfaa7d4 100644 --- a/src/render/geometry/qtorusgeometry.cpp +++ b/src/render/geometry/qtorusgeometry.cpp @@ -257,6 +257,70 @@ void QTorusGeometryPrivate::init() q->addAttribute(m_indexAttribute); } +/*! + * \qmltype TorusGeometry + * \instantiates Qt3DRender::QTorusGeometry + * \inqmlmodule Qt3D.Render + */ + +/*! + * \qmlproperty int TorusGeometry::rings + * + * Holds the number of rings in the torus. + */ + +/*! + * \qmlproperty int TorusGeometry::slices + * + * Holds the number of slices in the torus. + */ + +/*! + * \qmlproperty float TorusGeometry::radius + * + * Holds the outer radius of the torus. + */ + +/*! + * \qmlproperty float TorusGeometry::minorRadius + * + * Holds the inner radius of the torus. + */ + +/*! + * \qmlproperty Attribute TorusGeometry::positionAttribute + * + * Holds the geometry position attribute. + */ + +/*! + * \qmlproperty Attribute TorusGeometry::normalAttribute + * + * Holds the geometry normal attribute. + */ + +/*! + * \qmlproperty Attribute TorusGeometry::texCoordAttribute + * + * Holds the geometry texture coordinate attribute. + */ + +/*! + * \qmlproperty Attribute TorusGeometry::indexAttribute + * + * Holds the geometry index attribute. + */ + +/*! + * \class Qt3DRender::QTorusGeometry + * \inmodule Qt3DRender + * + * \inherits Qt3DRender::QGeometry + */ + +/*! + * Constructs a new QTorusGeometry with \a parent. + */ QTorusGeometry::QTorusGeometry(QNode *parent) : QGeometry(*new QTorusGeometryPrivate(), parent) { @@ -264,6 +328,9 @@ QTorusGeometry::QTorusGeometry(QNode *parent) d->init(); } +/*! + * \internal + */ QTorusGeometry::QTorusGeometry(QTorusGeometryPrivate &dd, QNode *parent) : QGeometry(dd, parent) { @@ -271,11 +338,17 @@ QTorusGeometry::QTorusGeometry(QTorusGeometryPrivate &dd, QNode *parent) d->init(); } +/*! + * Destroys this geometry. + */ QTorusGeometry::~QTorusGeometry() { QGeometry::cleanup(); } +/*! + * Updates vertices based on rings and slices. + */ void QTorusGeometry::updateVertices() { Q_D(QTorusGeometry); @@ -286,6 +359,9 @@ void QTorusGeometry::updateVertices() d->m_vertexBuffer->setBufferFunctor(QBufferFunctorPtr(new TorusVertexDataFunctor(d->m_rings, d->m_slices, d->m_radius, d->m_minorRadius))); } +/*! + * Updates indices based on rings and slices. + */ void QTorusGeometry::updateIndices() { Q_D(QTorusGeometry); @@ -337,48 +413,88 @@ void QTorusGeometry::setMinorRadius(float minorRadius) } } +/*! + * \property QTorusGeometry::rings + * + * Holds the number of rings in the torus. + */ int QTorusGeometry::rings() const { Q_D(const QTorusGeometry); return d->m_rings; } +/*! + * \property QTorusGeometry::slices + * + * Holds the number of slices in the torus. + */ int QTorusGeometry::slices() const { Q_D(const QTorusGeometry); return d->m_slices; } +/*! + * \property QTorusGeometry::radius + * + * Holds the outer radius of the torus. + */ float QTorusGeometry::radius() const { Q_D(const QTorusGeometry); return d->m_radius; } +/*! + * \property QTorusGeometry::minorRadius + * + * Holds the inner radius of the torus. + */ float QTorusGeometry::minorRadius() const { Q_D(const QTorusGeometry); return d->m_minorRadius; } +/*! + * \property QTorusGeometry::positionAttribute + * + * Holds the geometry position attribute. + */ QAttribute *QTorusGeometry::positionAttribute() const { Q_D(const QTorusGeometry); return d->m_positionAttribute; } +/*! + * \property QTorusGeometry::normalAttribute + * + * Holds the geometry normal attribute. + */ QAttribute *QTorusGeometry::normalAttribute() const { Q_D(const QTorusGeometry); return d->m_normalAttribute; } +/*! + * \property QTorusGeometry::texCoordAttribute + * + * Holds the geometry texture coordinate attribute. + */ QAttribute *QTorusGeometry::texCoordAttribute() const { Q_D(const QTorusGeometry); return d->m_texCoordAttribute; } +/*! + * \property QTorusGeometry::indexAttribute + * + * Holds the geometry index attribute. + */ QAttribute *QTorusGeometry::indexAttribute() const { Q_D(const QTorusGeometry); diff --git a/src/render/geometry/qtorusmesh.cpp b/src/render/geometry/qtorusmesh.cpp index 76e913aa2..01aa79fba 100644 --- a/src/render/geometry/qtorusmesh.cpp +++ b/src/render/geometry/qtorusmesh.cpp @@ -46,6 +46,49 @@ QT_BEGIN_NAMESPACE namespace Qt3DRender { +/*! + * \qmltype TorusMesh + * \instantiates Qt3DRender::QTorusMesh + * \inqmlmodule Qt3D.Render + * \brief A custom mesh. + */ + +/*! + * \qmlproperty int TorusMesh::rings + * + * Holds the number of rings in the mesh. + */ + +/*! + * \qmlproperty int TorusMesh::slices + * + * Holds the number of slices in the mesh. + */ + +/*! + * \qmlproperty float TorusMesh::radius + * + * Holds the outer radius of the torus. + */ + +/*! + * \qmlproperty float TorusMesh::minorRadius + * + * Holds the inner radius of the torus. + */ + +/*! + * \class Qt3DRender::QTorusMesh + * \inmodule Qt3DRender + * + * \inherits Qt3DRender::QGeometryRenderer + * + * \brief A custom mesh. + */ + +/*! + * Constructs a new QTorusMesh with \a parent. + */ QTorusMesh::QTorusMesh(QNode *parent) : QGeometryRenderer(parent) { @@ -58,6 +101,9 @@ QTorusMesh::QTorusMesh(QNode *parent) QGeometryRenderer::setGeometry(geometry); } +/*! + * Destroys this torus mesh. + */ QTorusMesh::~QTorusMesh() { QGeometryRenderer::cleanup(); @@ -83,21 +129,41 @@ void QTorusMesh::setMinorRadius(float minorRadius) static_cast<QTorusGeometry *>(geometry())->setMinorRadius(minorRadius); } +/*! + * \property QTorusMesh::rings + * + * Holds the number of rings in the mesh. + */ int QTorusMesh::rings() const { return static_cast<QTorusGeometry *>(geometry())->rings(); } +/*! + * \property QTorusMesh::slices + * + * Holds the number of slices in the mesh. + */ int QTorusMesh::slices() const { return static_cast<QTorusGeometry *>(geometry())->slices(); } +/*! + * \property QTorusMesh::radius + * + * Holds the outer radius of the torus. + */ float QTorusMesh::radius() const { return static_cast<QTorusGeometry *>(geometry())->radius(); } +/*! + * \property QTorusMesh::minorRadius + * + * Holds the inner radius of the torus. + */ float QTorusMesh::minorRadius() const { return static_cast<QTorusGeometry *>(geometry())->minorRadius(); diff --git a/src/render/materialsystem/qmaterial.cpp b/src/render/materialsystem/qmaterial.cpp index ceb16db57..ac7db1e23 100644 --- a/src/render/materialsystem/qmaterial.cpp +++ b/src/render/materialsystem/qmaterial.cpp @@ -43,6 +43,13 @@ #include <Qt3DCore/qscenepropertychange.h> /*! + * \qmltype Material + * \instantiates Qt3DRender::QMaterial + * \inqmlmodule Qt3D.Render + * \brief Non-creatable abstract base for materials. + */ + +/*! * \class Qt3DRender::QMaterial * \inmodule Qt3DRender * |