summaryrefslogtreecommitdiffstats
path: root/src/render/geometry/qspheregeometry.cpp
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@theqtcompany.com>2016-01-26 21:48:14 +0100
committerLiang Qi <liang.qi@theqtcompany.com>2016-01-26 21:50:16 +0100
commita359bd756a98a0462bbd039d9b76981d73dc11f7 (patch)
tree4917b25a005e75344a8f9ba60713ef5b4baa3533 /src/render/geometry/qspheregeometry.cpp
parent3d30f6151c0c2884b1f15280301e552b5f67949c (diff)
parent5a68874f7a2f18070890bec7c3259af94abe320b (diff)
Merge remote-tracking branch 'origin/5.6' into dev
Conflicts: src/doc/src/qt3dcollision-module.qdoc src/render/frontend/qcamera.cpp src/render/frontend/qcameralens.cpp Change-Id: I8a0ae250a6b8e065a1ef3c817968ebb7ef23b20d
Diffstat (limited to 'src/render/geometry/qspheregeometry.cpp')
-rw-r--r--src/render/geometry/qspheregeometry.cpp127
1 files changed, 127 insertions, 0 deletions
diff --git a/src/render/geometry/qspheregeometry.cpp b/src/render/geometry/qspheregeometry.cpp
index 9a97c422e..72c5b64df 100644
--- a/src/render/geometry/qspheregeometry.cpp
+++ b/src/render/geometry/qspheregeometry.cpp
@@ -311,6 +311,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)
{
@@ -318,6 +388,9 @@ QSphereGeometry::QSphereGeometry(QNode *parent)
d->init();
}
+/*!
+ * \internal
+ */
QSphereGeometry::QSphereGeometry(QSphereGeometryPrivate &dd, QNode *parent)
: QGeometry(dd, parent)
{
@@ -325,11 +398,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);
@@ -341,6 +420,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);
@@ -395,54 +477,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);