diff options
author | Liang Qi <liang.qi@qt.io> | 2016-09-23 09:33:53 +0200 |
---|---|---|
committer | Liang Qi <liang.qi@qt.io> | 2016-09-23 09:33:53 +0200 |
commit | ec2c6c0f13004bc1bba92f14443228778da287a0 (patch) | |
tree | 5c4e2621091ad7bbd31e6ffb6a277c1aaee39b55 /src/extras/geometries | |
parent | 5476bc6b4b6a12c921da502c24c4e078b04dd3b3 (diff) | |
parent | 0e3d54f8d7f9be26687afebcc9f456e4cefc2357 (diff) |
Merge remote-tracking branch 'origin/5.8' into devwip/particles
Change-Id: I4e1c528eb8e1c81aead51a5664635ca2becad397
Diffstat (limited to 'src/extras/geometries')
-rw-r--r-- | src/extras/geometries/qconegeometry.cpp | 200 | ||||
-rw-r--r-- | src/extras/geometries/qconemesh.cpp | 93 | ||||
-rw-r--r-- | src/extras/geometries/qcuboidgeometry.cpp | 82 | ||||
-rw-r--r-- | src/extras/geometries/qcuboidmesh.cpp | 58 | ||||
-rw-r--r-- | src/extras/geometries/qcylindergeometry.cpp | 27 | ||||
-rw-r--r-- | src/extras/geometries/qcylindermesh.cpp | 12 | ||||
-rw-r--r-- | src/extras/geometries/qplanegeometry.cpp | 27 | ||||
-rw-r--r-- | src/extras/geometries/qplanemesh.cpp | 16 | ||||
-rw-r--r-- | src/extras/geometries/qspheregeometry.cpp | 31 | ||||
-rw-r--r-- | src/extras/geometries/qspheremesh.cpp | 16 | ||||
-rw-r--r-- | src/extras/geometries/qtorusgeometry.cpp | 27 | ||||
-rw-r--r-- | src/extras/geometries/qtorusmesh.cpp | 16 |
12 files changed, 439 insertions, 166 deletions
diff --git a/src/extras/geometries/qconegeometry.cpp b/src/extras/geometries/qconegeometry.cpp index ab652b5dd..9db7e2b46 100644 --- a/src/extras/geometries/qconegeometry.cpp +++ b/src/extras/geometries/qconegeometry.cpp @@ -38,18 +38,16 @@ ****************************************************************************/ /*! - * \class QConeGeometry + * \class Qt3DExtras::QConeGeometry + * \inmodule Qt3DExtras * \brief The QConeGeometry class allows creation of a cone in 3D space. * \since 5.7 * \ingroup geometries + * \inherits Qt3DRender::QGeometry * - * The Cone is a common sight in 3D software shape libraries. - * - * The QConeGeometry class is most commonly used as part of the QConeMesh - * but can also be used in custom QGeometryRenderer subclasses. The class - * allows for creation of both the cone and truncated cone. - * - * \sa Qt3DExtras::QCylinderGeometry, Qt3DExtras::QConeMesh, Qt3DExtras::QGeometryRenderer + * The QConeGeometry class is most commonly used internally by the QConeMesh + * but can also be used in custom Qt3DRender::QGeometryRenderer subclasses. The class + * allows for creation of both a cone and a truncated cone. */ #ifndef _USE_MATH_DEFINES @@ -417,6 +415,83 @@ void QConeGeometryPrivate::init() q->addAttribute(m_indexAttribute); } +/*! + * \qmltype ConeGeometry + * \instantiates Qt3DExtras::QConeGeometry + * \inqmlmodule Qt3D.Extras + * \brief ConeGeometry allows creation of a cone in 3D space. + * + * The ConeGeometry type is most commonly used internally by the ConeMesh type + * but can also be used in custom GeometryRenderer types. + * The ConeGeometry type allows for creation of both a cone and a truncated cone. + */ + +/*! + * \qmlproperty bool ConeGeometry::hasTopEndcap + * + * Determines if the cone top is capped or open. + */ + +/*! + * \qmlproperty bool ConeGeometry::hasBottomEndcap + * + * Determines if the cone bottom is capped or open. + */ + +/*! + * \qmlproperty int ConeGeometry::rings + * + * Holds the number of rings in the geometry. + */ + +/*! + * \qmlproperty int ConeGeometry::slices + * + * Holds the number of slices in the geometry. + */ + +/*! + * \qmlproperty real ConeGeometry::topRadius + * + * Holds the top radius of the cone. + */ + +/*! + * \qmlproperty real ConeGeometry::bottomRadius + * + * Holds the bottom radius of the cone. + */ + +/*! + * \qmlproperty real ConeGeometry::length + * + * Holds the length of the cone. + */ + +/*! + * \qmlproperty Attribute ConeGeometry::positionAttribute + * + * Holds the geometry position attribute. + */ + +/*! + * \qmlproperty Attribute ConeGeometry::normalAttribute + * + * Holds the geometry normal attribute. + */ + +/*! + * \qmlproperty Attribute ConeGeometry::texCoordAttribute + * + * Holds the geometry texture coordinate attribute. + */ + +/*! + * \qmlproperty Attribute ConeGeometry::indexAttribute + * + * Holds the geometry index attribute. + */ + QConeGeometry::QConeGeometry(QNode *parent) : QGeometry(*new QConeGeometryPrivate, parent) { @@ -437,6 +512,9 @@ QConeGeometry::~QConeGeometry() { } +/*! + * Updates vertices based on geometry properties. + */ void QConeGeometry::updateVertices() { Q_D(QConeGeometry); @@ -448,6 +526,9 @@ void QConeGeometry::updateVertices() d->m_topRadius, d->m_bottomRadius, d->m_length)); } +/*! + * Updates indices based on geometry properties. + */ void QConeGeometry::updateIndices() { Q_D(QConeGeometry); @@ -462,8 +543,70 @@ void QConeGeometry::updateIndices() } /*! - * Sets whether the cone has a sealed top to \a hasTopEndcap. + * \property QConeGeometry::hasTopEndcap + * + * Determines if the cone top is capped or open. + */ +/*! + * \property QConeGeometry::hasBottomEndcap + * + * Determines if the cone bottom is capped or open. */ + +/*! + * \property QConeGeometry::rings + * + * Holds the number of rings in the geometry. + */ + +/*! + * \property QConeGeometry::slices + * + * Holds the number of slices in the geometry. + */ + +/*! + * \property QConeGeometry::topRadius + * + * Holds the top radius of the cone. + */ + +/*! + * \property QConeGeometry::bottomRadius + * + * Holds the bottom radius of the cone. + */ + +/*! + * \property QConeGeometry::length + * + * Holds the length of the cone. + */ + +/*! + * \property QConeGeometry::positionAttribute + * + * Holds the geometry position attribute. + */ + +/*! + * \property QConeGeometry::normalAttribute + * + * Holds the geometry normal attribute. + */ + +/*! + * \property QConeGeometry::texCoordAttribute + * + * Holds the geometry texture coordinate attribute. + */ + +/*! + * \property QConeGeometry::indexAttribute + * + * Holds the geometry index attribute. + */ + void QConeGeometry::setHasTopEndcap(bool hasTopEndcap) { Q_D(QConeGeometry); @@ -474,9 +617,6 @@ void QConeGeometry::setHasTopEndcap(bool hasTopEndcap) } } -/*! - * Sets whether the cone has a sealed bottom to \a hasBottomEndcap. - */ void QConeGeometry::setHasBottomEndcap(bool hasBottomEndcap) { Q_D(QConeGeometry); @@ -487,9 +627,6 @@ void QConeGeometry::setHasBottomEndcap(bool hasBottomEndcap) } } -/*! - * Sets the number of rings used in the cone's construction tp \a rings. - */ void QConeGeometry::setRings(int rings) { Q_D(QConeGeometry); @@ -501,9 +638,6 @@ void QConeGeometry::setRings(int rings) } } -/*! - * Sets the number of slices used in the cone's construction to \a slices. - */ void QConeGeometry::setSlices(int slices) { Q_D(QConeGeometry); @@ -515,9 +649,6 @@ void QConeGeometry::setSlices(int slices) } } -/*! - * Sets the radius for the top of the cone tp \a topRadius. - */ void QConeGeometry::setTopRadius(float topRadius) { Q_D(QConeGeometry); @@ -528,9 +659,6 @@ void QConeGeometry::setTopRadius(float topRadius) } } -/*! - * Sets the radius for the bottom of the cone to \a bottomRadius. - */ void QConeGeometry::setBottomRadius(float bottomRadius) { Q_D(QConeGeometry); @@ -541,9 +669,6 @@ void QConeGeometry::setBottomRadius(float bottomRadius) } } -/*! - * Sets the cone's length to \a length. - */ void QConeGeometry::setLength(float length) { Q_D(QConeGeometry); @@ -555,63 +680,42 @@ void QConeGeometry::setLength(float length) } } -/*! - * \return whether the cone has a top endcap. - */ bool QConeGeometry::hasTopEndcap() const { Q_D(const QConeGeometry); return d->m_hasTopEndcap; } -/*! - * \return whether the cone has a bottom endcap. - */ bool QConeGeometry::hasBottomEndcap() const { Q_D(const QConeGeometry); return d->m_hasBottomEndcap; } -/*! - * \return the top radius of the cone. - */ float QConeGeometry::topRadius() const { Q_D(const QConeGeometry); return d->m_topRadius; } -/*! - * \return the bottom radius of the cone. - */ float QConeGeometry::bottomRadius() const { Q_D(const QConeGeometry); return d->m_bottomRadius; } -/*! - * \return the number of rings used in the construction of the cone. - */ int QConeGeometry::rings() const { Q_D(const QConeGeometry); return d->m_rings; } -/*! - * \return the number of slices used in the construction of the cone. - */ int QConeGeometry::slices() const { Q_D(const QConeGeometry); return d->m_slices; } -/*! - * \return the cone's length. - */ float QConeGeometry::length() const { Q_D(const QConeGeometry); diff --git a/src/extras/geometries/qconemesh.cpp b/src/extras/geometries/qconemesh.cpp index e2f43b16d..385c469e0 100644 --- a/src/extras/geometries/qconemesh.cpp +++ b/src/extras/geometries/qconemesh.cpp @@ -53,6 +53,64 @@ QT_BEGIN_NAMESPACE namespace Qt3DExtras { +/*! + * \qmltype ConeMesh + * \instantiates Qt3DExtras::QConeMesh + * \inqmlmodule Qt3D.Extras + * \brief A conical mesh. + */ + +/*! + * \qmlproperty int ConeMesh::rings + * + * Holds the number of rings in the mesh. + */ + +/*! + * \qmlproperty int ConeMesh::slices + * + * Holds the number of slices in the mesh. + */ + +/*! + * \qmlproperty bool ConeMesh::hasTopEndcap + * + * Determines if the cone top is capped or open. + */ + +/*! + * \qmlproperty bool ConeMesh::hasBottomEndcap + * + * Determines if the cone bottom is capped or open. + */ + +/*! + * \qmlproperty real ConeMesh::topRadius + * + * Holds the top radius of the cone. + */ + +/*! + * \qmlproperty real ConeMesh::bottomRadius + * + * Holds the bottom radius of the cone. + */ + +/*! + * \qmlproperty real ConeMesh::length + * + * Holds the length of the cone. + */ + +/*! + * \class Qt3DExtras::QConeMesh + * \inmodule Qt3DExtras + * + * \inherits Qt3DRender::QGeometryRenderer + * + * \brief A conical mesh. + */ + QConeMesh::QConeMesh(QNode *parent) : QGeometryRenderer(parent) { @@ -108,36 +166,71 @@ void QConeMesh::setLength(float length) static_cast<QConeGeometry *>(geometry())->setLength(length); } +/*! + * \property QConeMesh::hasTopEndcap + * + * Determines if the cone top is capped or open. + */ bool QConeMesh::hasTopEndcap() const { return static_cast<QConeGeometry *>(geometry())->hasTopEndcap(); } +/*! + * \property QConeMesh::hasBottomEndcap + * + * Determines if the cone bottom is capped or open. + */ bool QConeMesh::hasBottomEndcap() const { return static_cast<QConeGeometry *>(geometry())->hasBottomEndcap(); } +/*! + * \property QConeMesh::topRadius + * + * Holds the top radius of the cone. + */ float QConeMesh::topRadius() const { return static_cast<QConeGeometry *>(geometry())->topRadius(); } +/*! + * \property QConeMesh::bottomRadius + * + * Holds the bottom radius of the cone. + */ float QConeMesh::bottomRadius() const { return static_cast<QConeGeometry *>(geometry())->bottomRadius(); } +/*! + * \property QConeMesh::rings + * + * Holds the number of rings in the mesh. + */ int QConeMesh::rings() const { return static_cast<QConeGeometry *>(geometry())->rings(); } +/*! + * \property QConeMesh::slices + * + * Holds the number of slices in the mesh. + */ int QConeMesh::slices() const { return static_cast<QConeGeometry *>(geometry())->slices(); } +/*! + * \property QConeMesh::length + * + * Holds the length of the cone. + */ float QConeMesh::length() const { return static_cast<QConeGeometry *>(geometry())->length(); diff --git a/src/extras/geometries/qcuboidgeometry.cpp b/src/extras/geometries/qcuboidgeometry.cpp index a632111f6..0f7b5220f 100644 --- a/src/extras/geometries/qcuboidgeometry.cpp +++ b/src/extras/geometries/qcuboidgeometry.cpp @@ -76,23 +76,23 @@ void createPlaneVertexData(float w, float h, const QSize &resolution, switch (normal) { case NegativeX: // Iterate over z - for (int j = resolution.width() - 1; j >= 0; --j) { - const float a = a0 + static_cast<float>(j) * da; - const float u = static_cast<float>(j) * du; + for (int j = resolution.height() - 1; j >= 0; --j) { + const float b = b0 + static_cast<float>(j) * db; + const float v = static_cast<float>(j) * dv; // Iterate over y - for (int i = 0; i < resolution.height(); ++i) { - const float b = b0 + static_cast<float>(i) * db; - const float v = static_cast<float>(i) * dv; + for (int i = 0; i < resolution.width(); ++i) { + const float a = a0 + static_cast<float>(i) * da; + const float u = static_cast<float>(i) * du; // position *vertices++ = planeDistance; - *vertices++ = b; *vertices++ = a; + *vertices++ = b; // texture coordinates - *vertices++ = 1.0f - u; *vertices++ = v; + *vertices++ = u; // normal *vertices++ = -1.0f; @@ -102,8 +102,8 @@ void createPlaneVertexData(float w, float h, const QSize &resolution, // tangent *vertices++ = 0.0f; *vertices++ = 0.0f; - *vertices++ = -1.0f; - *vertices++ = -1.0f; + *vertices++ = 1.0f; + *vertices++ = 1.0f; } } break; @@ -111,22 +111,22 @@ void createPlaneVertexData(float w, float h, const QSize &resolution, case PositiveX: { // Iterate over z for (int j = 0; j < resolution.height(); ++j) { - const float a = a0 + static_cast<float>(j) * da; - const float u = static_cast<float>(j) * du; + const float b = b0 + static_cast<float>(j) * db; + const float v = static_cast<float>(j) * dv; // Iterate over y for (int i = 0; i < resolution.width(); ++i) { - const float b = b0 + static_cast<float>(i) * db; - const float v = static_cast<float>(i) * dv; + const float a = a0 + static_cast<float>(i) * da; + const float u = static_cast<float>(i) * du; // position *vertices++ = planeDistance; - *vertices++ = b; *vertices++ = a; + *vertices++ = b; // texture coordinates + *vertices++ = 1.0f - v; *vertices++ = u; - *vertices++ = v; // normal *vertices++ = 1.0f; @@ -136,8 +136,8 @@ void createPlaneVertexData(float w, float h, const QSize &resolution, // tangent *vertices++ = 0.0f; *vertices++ = 0.0f; - *vertices++ = 1.0f; *vertices++ = -1.0f; + *vertices++ = 1.0f; } } break; @@ -563,44 +563,54 @@ void QCuboidGeometryPrivate::init() /*! * \qmltype CuboidGeometry - * \instantiates Qt3DRender::QCuboidGeometry - * \inqmlmodule Qt3D.Render + * \instantiates Qt3DExtras::QCuboidGeometry + * \inqmlmodule Qt3D.Extras + * \brief CuboidGeometry allows creation of a cuboid in 3D space. + * + * The CuboidGeometry type is most commonly used internally by the CuboidMesh type + * but can also be used in custom GeometryRenderer types. */ /*! - * \qmlproperty float CuboidGeometry::xExtent + * \qmlproperty real CuboidGeometry::xExtent * - * Holds the x extent. + * Holds the x extent of the geometry. */ /*! - * \qmlproperty float CuboidGeometry::yExtent + * \qmlproperty real CuboidGeometry::yExtent * - * Holds the y extent. + * Holds the y extent of the geometry. */ /*! - * \qmlproperty float CuboidGeometry::zExtent + * \qmlproperty real CuboidGeometry::zExtent * - * Holds the z extent. + * Holds the z extent of the geometry. */ /*! * \qmlproperty size CuboidGeometry::yzMeshResolution * * Holds the y-z resolution. + * The width and height values of this property specify the number of vertices generated for + * the y-z faces of the mesh. */ /*! * \qmlproperty size CuboidGeometry::xzMeshResolution * * Holds the x-z resolution. + * The width and height values of this property specify the number of vertices generated for + * the x-z faces of the mesh. */ /*! * \qmlproperty size CuboidGeometry::xyMeshResolution * * Holds the x-y resolution. + * The width and height values of this property specify the number of vertices generated for + * the x-y faces of the mesh. */ /*! @@ -634,11 +644,15 @@ void QCuboidGeometryPrivate::init() */ /*! - * \class Qt3DRender::QCuboidGeometry - * \inmodule Qt3DRender - * + * \class Qt3DExtras::QCuboidGeometry + * \inmodule Qt3DExtras + * \brief The QCuboidGeometry class allows creation of a cuboid in 3D space. + * \since 5.7 + * \ingroup geometries * \inherits Qt3DRender::QGeometry * + * The QCuboidGeometry class is most commonly used internally by the QCuboidMesh + * but can also be used in custom Qt3DRender::QGeometryRenderer subclasses. */ /*! @@ -770,7 +784,7 @@ void QCuboidGeometry::setXYMeshResolution(const QSize &resolution) /*! * \property QCuboidGeometry::xExtent * - * Holds the x extent. + * Holds the x extent of the geometry. */ float QCuboidGeometry::xExtent() const { @@ -781,7 +795,7 @@ float QCuboidGeometry::xExtent() const /*! * \property QCuboidGeometry::yExtent * - * Holds the y extent. + * Holds the y extent of the geometry. */ float QCuboidGeometry::yExtent() const { @@ -792,7 +806,7 @@ float QCuboidGeometry::yExtent() const /*! * \property QCuboidGeometry::zExtent * - * Holds the z extent. + * Holds the z extent of the geometry. */ float QCuboidGeometry::zExtent() const { @@ -804,6 +818,8 @@ float QCuboidGeometry::zExtent() const * \property QCuboidGeometry::yzMeshResolution * * Holds the y-z resolution. + * The width and height values of this property specify the number of vertices generated for + * the y-z faces of the mesh. */ QSize QCuboidGeometry::yzMeshResolution() const { @@ -815,6 +831,8 @@ QSize QCuboidGeometry::yzMeshResolution() const * \property QCuboidGeometry::xzMeshResolution * * Holds the x-z resolution. + * The width and height values of this property specify the number of vertices generated for + * the x-z faces of the mesh. */ QSize QCuboidGeometry::xyMeshResolution() const { @@ -826,6 +844,8 @@ QSize QCuboidGeometry::xyMeshResolution() const * \property QCuboidGeometry::xyMeshResolution * * Holds the x-y resolution. + * The width and height values of this property specify the number of vertices generated for + * the x-y faces of the mesh. */ QSize QCuboidGeometry::xzMeshResolution() const { diff --git a/src/extras/geometries/qcuboidmesh.cpp b/src/extras/geometries/qcuboidmesh.cpp index 004fca472..7df77ec63 100644 --- a/src/extras/geometries/qcuboidmesh.cpp +++ b/src/extras/geometries/qcuboidmesh.cpp @@ -45,59 +45,65 @@ QT_BEGIN_NAMESPACE namespace Qt3DExtras { /*! - * \qmltype QCuboidMesh - * \instantiates Qt3DRender::QCuboidMesh - * \inqmlmodule Qt3D.Render - * \brief A cube mesh. + * \qmltype CuboidMesh + * \instantiates Qt3DExtras::QCuboidMesh + * \inqmlmodule Qt3D.Extras + * \brief A cuboid mesh. */ /*! - * \qmlproperty float CuboidMesh::xExtent + * \qmlproperty real CuboidMesh::xExtent * - * Holds the x extent. + * Holds the x extent of the mesh. */ /*! - * \qmlproperty float CuboidMesh::yExtent + * \qmlproperty real CuboidMesh::yExtent * - * Holds the y extent. + * Holds the y extent of the mesh. */ /*! - * \qmlproperty float CuboidMesh::zExtent + * \qmlproperty real CuboidMesh::zExtent * - * Holds the z extent. + * Holds the z extent of the mesh. */ /*! * \qmlproperty size CuboidMesh::yzMeshResolution * - * Holds the y-z resolution. + * Holds the y-z resolution of the mesh. + * The width and height values of this property specify the number of vertices generated for + * the y-z faces of the mesh. */ /*! * \qmlproperty size CuboidMesh::xzMeshResolution * - * Holds the x-z resolution. + * Holds the x-z resolution of the mesh. + * The width and height values of this property specify the number of vertices generated for + * the x-z faces of the mesh. */ /*! * \qmlproperty size CuboidMesh::xyMeshResolution * - * Holds the x-y resolution. + * Holds the x-y resolution of the mesh. + * The width and height values of this property specify the number of vertices generated for + * the x-y faces of the mesh. */ /*! - * \class Qt3DRender::QCuboidMesh - * \inmodule Qt3DRender + * \class Qt3DExtras::QCuboidMesh + * \inmodule Qt3DExtras * * \inherits Qt3DRender::QGeometryRenderer * - * \brief A cube mesh. + * \brief A cuboid mesh. */ /*! - * Constructs a new QCuboidMedh with \a parent. + * Constructs a new QCuboidMesh with \a parent. */ QCuboidMesh::QCuboidMesh(QNode *parent) : QGeometryRenderer(parent) @@ -125,7 +131,7 @@ void QCuboidMesh::setXExtent(float xExtent) /*! * \property QCuboidMesh::xExtent * - * Holds the x extent. + * Holds the x extent of the mesh. */ float QCuboidMesh::xExtent() const { @@ -140,7 +146,7 @@ void QCuboidMesh::setYExtent(float yExtent) /*! * \property QCuboidMesh::yExtent * - * Holds the y extent. + * Holds the y extent of the mesh. */ float QCuboidMesh::yExtent() const { @@ -155,7 +161,7 @@ void QCuboidMesh::setZExtent(float zExtent) /*! * \property QCuboidMesh::zExtent * - * Holds the z extent. + * Holds the z extent of the mesh. */ float QCuboidMesh::zExtent() const { @@ -170,7 +176,9 @@ void QCuboidMesh::setYZMeshResolution(const QSize &resolution) /*! * \property QCuboidMesh::yzMeshResolution * - * Holds the y-z resolution. + * Holds the y-z resolution of the mesh. + * The width and height values of this property specify the number of vertices generated for + * the y-z faces of the mesh. */ QSize QCuboidMesh::yzMeshResolution() const { @@ -185,7 +193,9 @@ void QCuboidMesh::setXZMeshResolution(const QSize &resolution) /*! * \property QCuboidMesh::xzMeshResolution * - * Holds the x-z resolution. + * Holds the x-z resolution of the mesh. + * The width and height values of this property specify the number of vertices generated for + * the x-z faces of the mesh. */ QSize QCuboidMesh::xzMeshResolution() const { @@ -200,7 +210,9 @@ void QCuboidMesh::setXYMeshResolution(const QSize &resolution) /*! * \property QCuboidMesh::xyMeshResolution * - * Holds the x-y resolution. + * Holds the x-y resolution of the mesh. + * The width and height values of this property specify the number of vertices generated for + * the x-y faces of the mesh. */ QSize QCuboidMesh::xyMeshResolution() const { diff --git a/src/extras/geometries/qcylindergeometry.cpp b/src/extras/geometries/qcylindergeometry.cpp index 659d38359..136258162 100644 --- a/src/extras/geometries/qcylindergeometry.cpp +++ b/src/extras/geometries/qcylindergeometry.cpp @@ -338,8 +338,12 @@ void QCylinderGeometryPrivate::init() /*! * \qmltype CylinderGeometry - * \instantiates Qt3DRender::QCylinderGeometry - * \inqmlmodule Qt3D.Render + * \instantiates Qt3DExtras::QCylinderGeometry + * \inqmlmodule Qt3D.Extras + * \brief CylinderGeometry allows creation of a cylinder in 3D space. + * + * The CylinderGeometry type is most commonly used internally by the CylinderMesh type + * but can also be used in custom GeometryRenderer types. */ /*! @@ -355,13 +359,13 @@ void QCylinderGeometryPrivate::init() */ /*! - * \qmlproperty float CylinderGeometry::radius + * \qmlproperty real CylinderGeometry::radius * * Holds the radius of the cylinder. */ /*! - * \qmlproperty float CylinderGeometry::length + * \qmlproperty real CylinderGeometry::length * * Holds the length of the cylinder. */ @@ -391,10 +395,15 @@ void QCylinderGeometryPrivate::init() */ /*! - * \class Qt3DRender::QCylinderGeometry - * \inmodule Qt3DRender - * + * \class Qt3DExtras::QCylinderGeometry + * \inmodule Qt3DExtras + * \brief The QCylinderGeometry class allows creation of a cylinder in 3D space. + * \since 5.7 + * \ingroup geometries * \inherits Qt3DRender::QGeometry + * + * The QCylinderGeometry class is most commonly used internally by the QCylinderMesh + * but can also be used in custom Qt3DRender::QGeometryRenderer subclasses. */ /*! @@ -425,7 +434,7 @@ QCylinderGeometry::~QCylinderGeometry() } /*! - * Updates the vertices based on rings and slices. + * Updates the vertices based on rings, slices, and length properties. */ void QCylinderGeometry::updateVertices() { @@ -439,7 +448,7 @@ void QCylinderGeometry::updateVertices() } /*! - * Updates the indices based on rings and slices. + * Updates the indices based on rings, slices, and length properties. */ void QCylinderGeometry::updateIndices() { diff --git a/src/extras/geometries/qcylindermesh.cpp b/src/extras/geometries/qcylindermesh.cpp index ef405cb6e..875d8ed9a 100644 --- a/src/extras/geometries/qcylindermesh.cpp +++ b/src/extras/geometries/qcylindermesh.cpp @@ -58,8 +58,8 @@ namespace Qt3DExtras { /*! * \qmltype CylinderMesh - * \instantiates Qt3DRender::QCylinderMesh - * \inqmlmodule Qt3D.Render + * \instantiates Qt3DExtras::QCylinderMesh + * \inqmlmodule Qt3D.Extras * \brief A cylindrical mesh. */ @@ -76,20 +76,20 @@ namespace Qt3DExtras { */ /*! - * \qmlproperty float CylinderMesh::radius + * \qmlproperty real CylinderMesh::radius * * Holds the radius of the cylinder. */ /*! - * \qmlproperty float CylinderMesh::length + * \qmlproperty real CylinderMesh::length * * Holds the length of the cylinder. */ /*! - * \class Qt3DRender::QCylinderMesh - * \inmodule Qt3DRender + * \class Qt3DExtras::QCylinderMesh + * \inmodule Qt3DExtras * * \inherits Qt3DRender::QGeometryRenderer * diff --git a/src/extras/geometries/qplanegeometry.cpp b/src/extras/geometries/qplanegeometry.cpp index dad3147ff..74c90cf1b 100644 --- a/src/extras/geometries/qplanegeometry.cpp +++ b/src/extras/geometries/qplanegeometry.cpp @@ -208,18 +208,22 @@ public: /*! * \qmltype PlaneGeometry - * \instantiates Qt3DRender::QPlaneGeometry - * \inqmlmodule Qt3D.Render + * \instantiates Qt3DExtras::QPlaneGeometry + * \inqmlmodule Qt3D.Extras + * \brief PlaneGeometry allows creation of a plane in 3D space. + * + * The PlaneGeometry type is most commonly used internally by the PlaneMesh type + * but can also be used in custom GeometryRenderer types. */ /*! - * \qmlproperty float PlaneGeometry::width + * \qmlproperty real PlaneGeometry::width * * Holds the plane width. */ /*! - * \qmlproperty float PlaneGeometry::height + * \qmlproperty real PlaneGeometry::height * * Holds the plane height. */ @@ -261,10 +265,15 @@ public: */ /*! - * \class Qt3DRender::QPlaneGeometry - * \inmodule Qt3DRender - * + * \class Qt3DExtras::QPlaneGeometry + * \inmodule Qt3DExtras + * \brief The QPlaneGeometry class allows creation of a plane in 3D space. + * \since 5.7 + * \ingroup geometries * \inherits Qt3DRender::QGeometry + * + * The QPlaneGeometry class is most commonly used internally by the QPlaneMesh + * but can also be used in custom Qt3DRender::QGeometryRenderer subclasses. */ /*! @@ -295,7 +304,7 @@ QPlaneGeometry::~QPlaneGeometry() } /*! - * Updates vertices based on resolution. + * Updates vertices based on mesh resolution, width, and height properties. */ void QPlaneGeometry::updateVertices() { @@ -310,7 +319,7 @@ void QPlaneGeometry::updateVertices() } /*! - * Updates indices based on resolution. + * Updates indices based on mesh resolution. */ void QPlaneGeometry::updateIndices() { diff --git a/src/extras/geometries/qplanemesh.cpp b/src/extras/geometries/qplanemesh.cpp index f9d1a105b..f14d7cb97 100644 --- a/src/extras/geometries/qplanemesh.cpp +++ b/src/extras/geometries/qplanemesh.cpp @@ -46,19 +46,19 @@ namespace Qt3DExtras { /*! * \qmltype PlaneMesh - * \instantiates Qt3DRender::QPlaneMesh - * \inqmlmodule Qt3D.Render + * \instantiates Qt3DExtras::QPlaneMesh + * \inqmlmodule Qt3D.Extras * \brief A square planar mesh. */ /*! - * \qmlproperty float PlaneMesh::width + * \qmlproperty real PlaneMesh::width * * Holds the plane width. */ /*! - * \qmlproperty float PlaneMesh::height + * \qmlproperty real PlaneMesh::height * * Holds the plane height. */ @@ -67,11 +67,13 @@ namespace Qt3DExtras { * \qmlproperty size PlaneMesh::meshResolution * * Holds the plane resolution. + * The width and height values of this property specify the number of vertices generated for + * the mesh in the respective dimensions. */ /*! - * \class Qt3DRender::QPlaneMesh - * \inmodule Qt3DRender + * \class Qt3DExtras::QPlaneMesh + * \inmodule Qt3DExtras * * \inherits Qt3DRender::QGeometryRenderer * @@ -135,6 +137,8 @@ void QPlaneMesh::setMeshResolution(const QSize &resolution) * \property QPlaneMesh::meshResolution * * Holds the plane resolution. + * The width and height values of this property specify the number of vertices generated for + * the mesh in the respective dimensions. */ QSize QPlaneMesh::meshResolution() const { diff --git a/src/extras/geometries/qspheregeometry.cpp b/src/extras/geometries/qspheregeometry.cpp index 77844b2af..277d4fcb9 100644 --- a/src/extras/geometries/qspheregeometry.cpp +++ b/src/extras/geometries/qspheregeometry.cpp @@ -315,8 +315,12 @@ void QSphereGeometryPrivate::init() /*! * \qmltype SphereGeometry - * \instantiates QSphereGeometry - * \inqmlmodule Qt3D.Render + * \instantiates Qt3DExtras::QSphereGeometry + * \inqmlmodule Qt3D.Extras + * \brief SphereGeometry allows creation of a sphere in 3D space. + * + * The SphereGeometry type is most commonly used internally by the SphereMesh type + * but can also be used in custom GeometryRenderer types. */ /*! @@ -332,7 +336,7 @@ void QSphereGeometryPrivate::init() */ /*! - * \qmlproperty float SphereGeometry::radius + * \qmlproperty real SphereGeometry::radius * * Holds the radius of the sphere. */ @@ -340,7 +344,8 @@ void QSphereGeometryPrivate::init() /*! * \qmlproperty bool SphereGeometry::generateTangents * - * Holds the value of the automatic tangent generation flag. + * Holds the value of the automatic tangent vectors generation flag. + * Tangent vectors are orthogonal to normal vectors. */ /*! @@ -374,10 +379,15 @@ void QSphereGeometryPrivate::init() */ /*! - * \class QSphereGeometry - * \inmodule Qt3DRender + * \class Qt3DExtras::QSphereGeometry + * \inmodule Qt3DExtras + * \brief The QSphereGeometry class allows creation of a sphere in 3D space. + * \since 5.7 + * \ingroup geometries + * \inherits Qt3DRender::QGeometry * - * \inherits QGeometry + * The QSphereGeometry class is most commonly used internally by the QSphereMesh + * but can also be used in custom Qt3DRender::QGeometryRenderer subclasses. */ /*! @@ -408,7 +418,7 @@ QSphereGeometry::~QSphereGeometry() } /*! - * Updates vertices based on rings and slices. + * Updates vertices based on rings, slices, and radius properties */ void QSphereGeometry::updateVertices() { @@ -422,7 +432,7 @@ void QSphereGeometry::updateVertices() } /*! - * Updates indices based on rings and slices. + * Updates indices based on rings and slices properties. */ void QSphereGeometry::updateIndices() { @@ -481,7 +491,8 @@ void QSphereGeometry::setGenerateTangents(bool gen) /*! * \property QSphereGeometry::generateTangents * - * Holds the value of the automatic tangent generation flag. + * Holds the value of the automatic tangent vectors generation flag. + * Tangent vectors are orthogonal to normal vectors. */ bool QSphereGeometry::generateTangents() const { diff --git a/src/extras/geometries/qspheremesh.cpp b/src/extras/geometries/qspheremesh.cpp index 205f6437f..90cf5a872 100644 --- a/src/extras/geometries/qspheremesh.cpp +++ b/src/extras/geometries/qspheremesh.cpp @@ -47,8 +47,8 @@ namespace Qt3DExtras { /*! * \qmltype SphereMesh - * \instantiates Qt3DRender::QSphereMesh - * \inqmlmodule Qt3D.Render + * \instantiates Qt3DExtras::QSphereMesh + * \inqmlmodule Qt3D.Extras * \brief A spherical mesh. */ @@ -65,7 +65,7 @@ namespace Qt3DExtras { */ /*! - * \qmlproperty float SphereMesh::radius + * \qmlproperty real SphereMesh::radius * * Holds the radius of the sphere. */ @@ -73,12 +73,13 @@ namespace Qt3DExtras { /*! * \qmlproperty bool SphereMesh::generateTangents * - * Holds the value of the automatic tangent generation flag. + * Holds the value of the automatic tangent vectors generation flag. + * Tangent vectors are orthogonal to normal vectors. */ /*! - * \class Qt3DRender::QSphereMesh - * \inmodule Qt3DRender + * \class Qt3DExtras::QSphereMesh + * \inmodule Qt3DExtras * * \inherits Qt3DRender::QGeometryRenderer * @@ -127,7 +128,8 @@ void QSphereMesh::setGenerateTangents(bool gen) /*! * \property QSphereMesh::generateTangents * - * Holds the value of the automatic tangent generation flag. + * Holds the value of the automatic tangent vectors generation flag. + * Tangent vectors are orthogonal to normal vectors. */ bool QSphereMesh::generateTangents() const { diff --git a/src/extras/geometries/qtorusgeometry.cpp b/src/extras/geometries/qtorusgeometry.cpp index 1d292dec3..801281110 100644 --- a/src/extras/geometries/qtorusgeometry.cpp +++ b/src/extras/geometries/qtorusgeometry.cpp @@ -264,8 +264,12 @@ void QTorusGeometryPrivate::init() /*! * \qmltype TorusGeometry - * \instantiates Qt3DRender::QTorusGeometry - * \inqmlmodule Qt3D.Render + * \instantiates Qt3DExtras::QTorusGeometry + * \inqmlmodule Qt3D.Extras + * \brief TorusGeometry allows creation of a torus in 3D space. + * + * The TorusGeometry type is most commonly used internally by the TorusMesh type + * but can also be used in custom GeometryRenderer types. */ /*! @@ -281,13 +285,13 @@ void QTorusGeometryPrivate::init() */ /*! - * \qmlproperty float TorusGeometry::radius + * \qmlproperty real TorusGeometry::radius * * Holds the outer radius of the torus. */ /*! - * \qmlproperty float TorusGeometry::minorRadius + * \qmlproperty real TorusGeometry::minorRadius * * Holds the inner radius of the torus. */ @@ -317,10 +321,15 @@ void QTorusGeometryPrivate::init() */ /*! - * \class Qt3DRender::QTorusGeometry - * \inmodule Qt3DRender - * + * \class Qt3DExtras::QTorusGeometry + * \inmodule Qt3DExtras + * \brief The QTorusGeometry class allows creation of a torus in 3D space. + * \since 5.7 + * \ingroup geometries * \inherits Qt3DRender::QGeometry + * + * The QTorusGeometry class is most commonly used internally by the QTorusMesh + * but can also be used in custom Qt3DRender::QGeometryRenderer subclasses. */ /*! @@ -351,7 +360,7 @@ QTorusGeometry::~QTorusGeometry() } /*! - * Updates vertices based on rings and slices. + * Updates vertices based on rings, slices, and radius properties. */ void QTorusGeometry::updateVertices() { @@ -364,7 +373,7 @@ void QTorusGeometry::updateVertices() } /*! - * Updates indices based on rings and slices. + * Updates indices based on rings and slices properties. */ void QTorusGeometry::updateIndices() { diff --git a/src/extras/geometries/qtorusmesh.cpp b/src/extras/geometries/qtorusmesh.cpp index e3b5b61d0..a77631b73 100644 --- a/src/extras/geometries/qtorusmesh.cpp +++ b/src/extras/geometries/qtorusmesh.cpp @@ -51,9 +51,9 @@ namespace Qt3DExtras { /*! * \qmltype TorusMesh - * \instantiates Qt3DRender::QTorusMesh - * \inqmlmodule Qt3D.Render - * \brief A custom mesh. + * \instantiates Qt3DExtras::QTorusMesh + * \inqmlmodule Qt3D.Extras + * \brief A toroidal mesh. */ /*! @@ -69,24 +69,24 @@ namespace Qt3DExtras { */ /*! - * \qmlproperty float TorusMesh::radius + * \qmlproperty real TorusMesh::radius * * Holds the outer radius of the torus. */ /*! - * \qmlproperty float TorusMesh::minorRadius + * \qmlproperty real TorusMesh::minorRadius * * Holds the inner radius of the torus. */ /*! - * \class Qt3DRender::QTorusMesh - * \inmodule Qt3DRender + * \class Qt3DExtras::QTorusMesh + * \inmodule Qt3DExtras * * \inherits Qt3DRender::QGeometryRenderer * - * \brief A custom mesh. + * \brief A toroidal mesh. */ /*! |