diff options
author | Liang Qi <liang.qi@theqtcompany.com> | 2016-01-26 21:48:14 +0100 |
---|---|---|
committer | Liang Qi <liang.qi@theqtcompany.com> | 2016-01-26 21:50:16 +0100 |
commit | a359bd756a98a0462bbd039d9b76981d73dc11f7 (patch) | |
tree | 4917b25a005e75344a8f9ba60713ef5b4baa3533 /src | |
parent | 3d30f6151c0c2884b1f15280301e552b5f67949c (diff) | |
parent | 5a68874f7a2f18070890bec7c3259af94abe320b (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')
122 files changed, 2077 insertions, 843 deletions
diff --git a/src/core/aspects/qabstractaspect.cpp b/src/core/aspects/qabstractaspect.cpp index 73aed25a7..06e241f65 100644 --- a/src/core/aspects/qabstractaspect.cpp +++ b/src/core/aspects/qabstractaspect.cpp @@ -57,10 +57,6 @@ static QByteArray className(const QMetaObject &obj) namespace Qt3DCore { -/*! - \class Qt3DCore::QAbstractAspectPrivate - \internal -*/ QAbstractAspectPrivate::QAbstractAspectPrivate() : QObjectPrivate() , m_root(Q_NULLPTR) @@ -84,13 +80,30 @@ QAbstractAspect::QAbstractAspect(QObject *parent) : QObject(*new QAbstractAspectPrivate, parent) { } +/*! + \typedef Qt3DCore::QAspectJobPtr + \relates Qt3DCore::QAbstractAspect + + A shared pointer for QAspectJob. +*/ + +/*! + \typedef Qt3DCore::QBackendNodeFunctorPtr + \relates Qt3DCore::QAbstractAspect -/*! \internal */ + A shared pointer for QBackendNodeFunctor. +*/ + +/*! + \internal +*/ QAbstractAspect::QAbstractAspect(QAbstractAspectPrivate &dd, QObject *parent) : QObject(dd, parent) { } - +/*! + Registers backend. +*/ void QAbstractAspect::registerBackendType(const QMetaObject &obj, const QBackendNodeFunctorPtr &functor) { Q_D(QAbstractAspect); diff --git a/src/core/aspects/qaspectengine.cpp b/src/core/aspects/qaspectengine.cpp index ffdc831af..e3fc6c9d2 100644 --- a/src/core/aspects/qaspectengine.cpp +++ b/src/core/aspects/qaspectengine.cpp @@ -62,10 +62,6 @@ QT_BEGIN_NAMESPACE namespace Qt3DCore { -/*! - \class Qt3DCore::QAspectEnginePrivate - \internal -*/ QAspectEnginePrivate::QAspectEnginePrivate() : QObjectPrivate() , m_postman(Q_NULLPTR) diff --git a/src/core/jobs/qabstractaspectjobmanager.cpp b/src/core/jobs/qabstractaspectjobmanager.cpp index cd07e5463..afd49fdf3 100644 --- a/src/core/jobs/qabstractaspectjobmanager.cpp +++ b/src/core/jobs/qabstractaspectjobmanager.cpp @@ -43,10 +43,6 @@ QT_BEGIN_NAMESPACE namespace Qt3DCore { -/*! - \class Qt3DCore::QAbstractAspectJobManager - \internal -*/ QAbstractAspectJobManager::QAbstractAspectJobManager(QObject *parent) : QObject(parent) { diff --git a/src/core/jobs/qaspectjob.cpp b/src/core/jobs/qaspectjob.cpp index 5ff81276a..6f5360972 100644 --- a/src/core/jobs/qaspectjob.cpp +++ b/src/core/jobs/qaspectjob.cpp @@ -54,10 +54,6 @@ bool isDependencyNull(const QWeakPointer<QAspectJob> &dep) } // anonymous -/*! - \class Qt3DCore::QAspectJobPrivate - \internal -*/ QAspectJobPrivate::QAspectJobPrivate() { } diff --git a/src/core/jobs/qaspectjobmanager.cpp b/src/core/jobs/qaspectjobmanager.cpp index 6139b2d6e..0c49f36f0 100644 --- a/src/core/jobs/qaspectjobmanager.cpp +++ b/src/core/jobs/qaspectjobmanager.cpp @@ -52,10 +52,6 @@ QT_BEGIN_NAMESPACE namespace Qt3DCore { -/*! - \class Qt3DCore::QAspectJobManager - \internal -*/ QAspectJobManager::QAspectJobManager(QObject *parent) : QAbstractAspectJobManager(parent) , m_threadPooler(new QThreadPooler(this)) diff --git a/src/core/jobs/qthreadpooler.cpp b/src/core/jobs/qthreadpooler.cpp index e82b2bf79..79cf6040e 100644 --- a/src/core/jobs/qthreadpooler.cpp +++ b/src/core/jobs/qthreadpooler.cpp @@ -46,10 +46,6 @@ QT_BEGIN_NAMESPACE namespace Qt3DCore { -/*! - \class Qt3DCore::QThreadPooler - \internal -*/ QThreadPooler::QThreadPooler(QObject *parent) : QObject(parent), m_futureInterface(Q_NULLPTR), diff --git a/src/core/nodes/qbackendnode.cpp b/src/core/nodes/qbackendnode.cpp index 6f3c43d09..d864288cb 100644 --- a/src/core/nodes/qbackendnode.cpp +++ b/src/core/nodes/qbackendnode.cpp @@ -47,10 +47,6 @@ QT_BEGIN_NAMESPACE namespace Qt3DCore { -/*! - \class Qt3DCore::QBackendNodePrivate - \internal -*/ QBackendNodePrivate::QBackendNodePrivate(QBackendNode::Mode mode) : q_ptr(Q_NULLPTR) , m_mode(mode) diff --git a/src/core/nodes/qcomponent.cpp b/src/core/nodes/qcomponent.cpp index 9b3876381..9008c0438 100644 --- a/src/core/nodes/qcomponent.cpp +++ b/src/core/nodes/qcomponent.cpp @@ -48,10 +48,6 @@ QT_BEGIN_NAMESPACE namespace Qt3DCore { -/*! - \class Qt3DCore::QComponentPrivate - \internal -*/ QComponentPrivate::QComponentPrivate() : QNodePrivate() , m_shareable(true) @@ -187,6 +183,9 @@ QComponent::QComponent(QComponentPrivate &dd, QNode *parent) \inqmlmodule Qt3D.Core \inherits Node \since 5.5 + \brief Provides the base type for creating Qt 3D components. + + \TODO */ /*! diff --git a/src/core/nodes/qentity.cpp b/src/core/nodes/qentity.cpp index e3147c14e..7c876bda3 100644 --- a/src/core/nodes/qentity.cpp +++ b/src/core/nodes/qentity.cpp @@ -52,10 +52,6 @@ QT_BEGIN_NAMESPACE namespace Qt3DCore { -/*! - \class Qt3DCore::QEntityPrivate - \internal -*/ QEntityPrivate::QEntityPrivate() : QNodePrivate() , m_parentEntityId() @@ -121,6 +117,12 @@ void QEntity::copy(const QNode *ref) addComponent(qobject_cast<QComponent *>(ccclone)); } } +/*! + \typedef Qt3DCore::QComponentList + \relates Qt3DCore::QEntity + + List of QComponent pointers. +*/ /*! Returns the list of Qt3DCore::QComponent instances the entity is referencing. diff --git a/src/core/nodes/qnode.cpp b/src/core/nodes/qnode.cpp index c7b9440ba..239d72780 100644 --- a/src/core/nodes/qnode.cpp +++ b/src/core/nodes/qnode.cpp @@ -59,10 +59,6 @@ namespace Qt3DCore { QHash<QNodeId, QNode *> QNodePrivate::m_clonesLookupTable = QHash<QNodeId, QNode *>(); -/*! - \class Qt3DCore::QNodePrivate - \internal -*/ QNodePrivate::QNodePrivate() : QObjectPrivate() , m_changeArbiter(Q_NULLPTR) @@ -541,6 +537,19 @@ void QNode::setParent(QNode *parent) } /*! + \typedef Qt3DCore::QNodePtr + \relates Qt3DCore::QNode + + A shared pointer for QNode. +*/ +/*! + \typedef Qt3DCore::QNodeList + \relates Qt3DCore::QNode + + List of QNode pointers. +*/ + +/*! * Returns a list filled with the QNode children of the current * QNode instance. */ diff --git a/src/core/qbackendscenepropertychange.cpp b/src/core/qbackendscenepropertychange.cpp index 16d68b80f..67ebd1a06 100644 --- a/src/core/qbackendscenepropertychange.cpp +++ b/src/core/qbackendscenepropertychange.cpp @@ -51,10 +51,6 @@ namespace Qt3DCore { \inmodule Qt3DCore */ -/*! - \class Qt3DCore::QBackendScenePropertyChangePrivate - \internal -*/ QBackendScenePropertyChangePrivate::QBackendScenePropertyChangePrivate() : QScenePropertyChangePrivate() { @@ -86,6 +82,13 @@ QNodeId QBackendScenePropertyChange::targetNode() const return d->m_targetUuid; } +/*! + \typedef Qt3DCore::QBackendScenePropertyChangePtr + \relates Qt3DCore::QBackendScenePropertyChange + + A shared pointer for QBackendScenePropertyChange. +*/ + /*! \internal */ QBackendScenePropertyChange::QBackendScenePropertyChange(QBackendScenePropertyChangePrivate &dd) : QScenePropertyChange(dd) diff --git a/src/core/qchangearbiter.cpp b/src/core/qchangearbiter.cpp index 291d555c9..0085a32ec 100644 --- a/src/core/qchangearbiter.cpp +++ b/src/core/qchangearbiter.cpp @@ -54,7 +54,7 @@ QT_BEGIN_NAMESPACE namespace Qt3DCore { -/*! +/* !\internal \class Qt3DCore::QChangeArbiter \inmodule Qt3DCore \since 5.5 diff --git a/src/core/qscenechange.cpp b/src/core/qscenechange.cpp index 7deeabe76..0637953f2 100644 --- a/src/core/qscenechange.cpp +++ b/src/core/qscenechange.cpp @@ -61,10 +61,6 @@ namespace Qt3DCore { \value AllChanges Allows an observer to monitor for any of the above changes. */ -/*! - \class Qt3DCore::QSceneChangePrivate - \internal -*/ QSceneChangePrivate::QSceneChangePrivate() : q_ptr(Q_NULLPTR) { diff --git a/src/core/qscenepropertychange.cpp b/src/core/qscenepropertychange.cpp index 1a8682dbd..ef84d988f 100644 --- a/src/core/qscenepropertychange.cpp +++ b/src/core/qscenepropertychange.cpp @@ -53,10 +53,6 @@ namespace Qt3DCore { QFrameAllocator *QScenePropertyChangePrivate::m_allocator = new QFrameAllocator(128, sizeof(QScenePropertyChange), sizeof(QScenePropertyChangePrivate) * 2); QMutex QScenePropertyChangePrivate::m_mutex; -/*! - \class Qt3DCore::QScenePropertyChangePrivate - \internal -*/ QScenePropertyChangePrivate::QScenePropertyChangePrivate() : QSceneChangePrivate() { diff --git a/src/core/resources/qframeallocator.cpp b/src/core/resources/qframeallocator.cpp index 3223f9069..5e0e147b6 100644 --- a/src/core/resources/qframeallocator.cpp +++ b/src/core/resources/qframeallocator.cpp @@ -37,7 +37,7 @@ ** ****************************************************************************/ -/*! +/* !\internal \class Qt3DCore::QFrameAllocator \inmodule Qt3DCore \brief Provides a pool of memory chunks to be used to allocate objects on a per frame basis. @@ -56,10 +56,6 @@ QT_BEGIN_NAMESPACE namespace Qt3DCore { -/*! - \class Qt3DCore::QFrameAllocatorPrivate - \internal -*/ QFrameAllocatorPrivate::QFrameAllocatorPrivate() { } diff --git a/src/core/resources/qresourcemanager.cpp b/src/core/resources/qresourcemanager.cpp index bb4c87d24..f13960940 100644 --- a/src/core/resources/qresourcemanager.cpp +++ b/src/core/resources/qresourcemanager.cpp @@ -37,7 +37,7 @@ ** ****************************************************************************/ -/*! +/* !\internal \class Qt3DCore::QResourceManager \inmodule Qt3DCore \since 5.5 @@ -57,7 +57,7 @@ parameters. The defaults are ArrayAllocatingPolicy and NonLockingPolicy respectively. */ -/*! +/* !\internal \class Qt3DCore::ArrayAllocatingPolicy \inmodule Qt3DCore \since 5.5 @@ -70,7 +70,7 @@ \sa QResourceManager */ -/*! +/* !\internal \class Qt3DCore::ObjectLevelLockingPolicy \inmodule Qt3DCore \since 5.5 diff --git a/src/core/resources/qresourcemanager_p.h b/src/core/resources/qresourcemanager_p.h index cff9d1961..dd5314101 100644 --- a/src/core/resources/qresourcemanager_p.h +++ b/src/core/resources/qresourcemanager_p.h @@ -155,34 +155,46 @@ class ArrayAllocatingPolicy { public: ArrayAllocatingPolicy() + : m_numBuckets(0) + , m_numConstructed(0) { reset(); } + ~ArrayAllocatingPolicy() + { + deallocateBuckets(); + } + T* allocateResource() { Q_ASSERT(!m_freeList.isEmpty()); - int idx = m_freeList.last(); - m_freeList.pop_back(); + int idx = m_freeList.takeLast(); int bucketIdx = idx / BucketSize; int localIdx = idx % BucketSize; - Q_ASSERT(bucketIdx <= m_buckets.size()); - if (bucketIdx == m_buckets.size()) { - m_buckets.append(Bucket(BucketSize)); - m_bucketDataPtrs[bucketIdx] = m_buckets.last().data(); + Q_ASSERT(bucketIdx <= m_numBuckets); + if (bucketIdx == m_numBuckets) { + m_bucketDataPtrs[bucketIdx] = static_cast<T*>(malloc(sizeof(T) * BucketSize)); + // ### memset is only needed as long as we also use this for primitive types (see FrameGraphManager) + // ### remove once this is fixed, add a static_assert on T instead + memset(m_bucketDataPtrs[bucketIdx], 0, sizeof(T) * BucketSize); + ++m_numBuckets; + } + + Q_ASSERT(idx <= m_numConstructed); + if (idx == m_numConstructed) { + new (m_bucketDataPtrs[bucketIdx] + localIdx) T; + ++m_numConstructed; } - // Make sure we got a properly constructed object at that point - // otherwise we might end up passing around bogus vtable pointers - // (shows up when we start releasing resources) - return new (m_bucketDataPtrs[bucketIdx] + localIdx) T; + + return m_bucketDataPtrs[bucketIdx] + localIdx; } void releaseResource(T *r) { // search linearly over buckets to find the index of the resource // and put it into the free list - const int numBuckets = m_buckets.size(); - for (int bucketIdx = 0; bucketIdx < numBuckets; ++bucketIdx) { + for (int bucketIdx = 0; bucketIdx < m_numBuckets; ++bucketIdx) { const T* firstItem = m_bucketDataPtrs[bucketIdx]; if (firstItem > r || r >= firstItem + BucketSize) { // resource is not in this bucket when its pointer address @@ -203,13 +215,14 @@ public: void reset() { - m_buckets.clear(); + deallocateBuckets(); m_freeList.resize(MaxSize); for (int i = 0; i < MaxSize; i++) m_freeList[i] = MaxSize - (i + 1); } private: + Q_DISABLE_COPY(ArrayAllocatingPolicy) enum { MaxSize = (1 << INDEXBITS), @@ -218,13 +231,25 @@ private: BucketSize = (1 << (INDEXBITS < 10 ? INDEXBITS : 10)) }; - typedef QVector<T> Bucket; - QList<Bucket> m_buckets; - // optimization: quick access to bucket data pointers - // this improves the performance of the releaseResource benchmarks - // and reduces their runtime by a factor 2 + void deallocateBuckets() + { + while (m_numConstructed > 0) { + --m_numConstructed; + int bucketIdx = m_numConstructed / BucketSize; + int localIdx = m_numConstructed % BucketSize; + (m_bucketDataPtrs[bucketIdx] + localIdx)->~T(); + } + + while (m_numBuckets > 0) { + --m_numBuckets; + free(m_bucketDataPtrs[m_numBuckets]); + } + } + T* m_bucketDataPtrs[MaxSize / BucketSize]; QVector<int> m_freeList; + int m_numBuckets; + int m_numConstructed; void performCleanup(T *r, Int2Type<true>) { diff --git a/src/core/services/qabstractframeadvanceservice.cpp b/src/core/services/qabstractframeadvanceservice.cpp index 8a3843fb9..15bf46afa 100644 --- a/src/core/services/qabstractframeadvanceservice.cpp +++ b/src/core/services/qabstractframeadvanceservice.cpp @@ -44,12 +44,8 @@ QT_BEGIN_NAMESPACE namespace Qt3DCore { -/*! - \class Qt3DCore::QAbstractFrameAdvanceServicePrivate - \internal -*/ -/*! +/* !\internal \class Qt3DCore::QAbstractFrameAdvanceService \inmodule Qt3DCore \brief Interface for a Qt3D frame advance service. @@ -74,19 +70,19 @@ QAbstractFrameAdvanceService::QAbstractFrameAdvanceService(QAbstractFrameAdvance } -/*! +/* \fn qint64 Qt3DCore::QAbstractFrameAdvanceService::waitForNextFrame() Returns the current time, the call may be blocking if waiting for a tick. */ -/*! +/* \fn void Qt3DCore::QAbstractFrameAdvanceService::start() Starts the service. */ -/*! +/* \fn void Qt3DCore::QAbstractFrameAdvanceService::stop() Stops the service, performing any cleanup deemed necessary. diff --git a/src/core/services/qeventfilterservice.cpp b/src/core/services/qeventfilterservice.cpp index dd049f0e8..82b6a5b7f 100644 --- a/src/core/services/qeventfilterservice.cpp +++ b/src/core/services/qeventfilterservice.cpp @@ -122,7 +122,7 @@ public: }; -/*! +/* !\internal \class Qt3DCore::QEventFilterService \inmodule Qt3DCore diff --git a/src/core/services/qopenglinformationservice.cpp b/src/core/services/qopenglinformationservice.cpp index f6a5f0e85..0f62544c8 100644 --- a/src/core/services/qopenglinformationservice.cpp +++ b/src/core/services/qopenglinformationservice.cpp @@ -44,12 +44,8 @@ QT_BEGIN_NAMESPACE namespace Qt3DCore { -/*! - \class Qt3DCore::QOpenGLInformationServicePrivate - \internal -*/ -/*! +/* !\internal \class Qt3DCore::QOpenGLInformationService \inmodule Qt3DCore \brief Interface for a Qt3D OpenGL information service @@ -60,7 +56,7 @@ namespace Qt3DCore { having a valid OpenGL context on the current thread. */ -/*! +/* Creates an instance of QOpenGLInformationService, with a \a description for the new service. This constructor is protected so only subclasses can instantiate a QOpenGLInformationService object. @@ -70,7 +66,7 @@ QOpenGLInformationService::QOpenGLInformationService(const QString &description) { } -/*! +/* \internal */ QOpenGLInformationService::QOpenGLInformationService(QOpenGLInformationServicePrivate &dd) @@ -78,7 +74,7 @@ QOpenGLInformationService::QOpenGLInformationService(QOpenGLInformationServicePr { } -/*! +/* \fn QSurfaceFormat Qt3DCore::QOpenGLInformationService::format() const Subclasses should override this function to return the QSurfaceFormat of the diff --git a/src/core/services/qservicelocator.cpp b/src/core/services/qservicelocator.cpp index 643a63061..54747e4ba 100644 --- a/src/core/services/qservicelocator.cpp +++ b/src/core/services/qservicelocator.cpp @@ -48,7 +48,7 @@ QT_BEGIN_NAMESPACE namespace Qt3DCore { -/*! +/* !\internal \class Qt3DCore::QAbstractServiceProvider \inmodule Qt3DCore */ @@ -59,7 +59,7 @@ QAbstractServiceProvider::QAbstractServiceProvider(int type, const QString &desc d_ptr->q_ptr = this; } -/*! \internal */ +/* \internal */ QAbstractServiceProvider::QAbstractServiceProvider(QAbstractServiceProviderPrivate &dd) : d_ptr(&dd) { @@ -100,7 +100,7 @@ public: }; -/*! +/* !\internal \class Qt3DCore::QServiceLocator \inmodule Qt3DCore \brief Service locator used by aspects to retrieve pointers to concrete service objects @@ -122,7 +122,7 @@ public: do nothing implementations. */ -/*! +/* Creates an instance of QServiceLocator. */ QServiceLocator::QServiceLocator() @@ -130,14 +130,14 @@ QServiceLocator::QServiceLocator() { } -/*! +/* Destroys a QServiceLocator object */ QServiceLocator::~QServiceLocator() { } -/*! +/* Registers \a provider service provider for the service \a serviceType. This replaces any existing provider for this service. The service provider does not take ownership of the provider. @@ -152,7 +152,7 @@ void QServiceLocator::registerServiceProvider(int serviceType, QAbstractServiceP ++(d->m_nonNullDefaultServices); } -/*! +/* Unregisters any existing provider for the \a serviceType. \sa registerServiceProvider() @@ -165,7 +165,7 @@ void QServiceLocator::unregisterServiceProvider(int serviceType) d->m_nonNullDefaultServices -= removedCount; } -/*! +/* Returns the number of registered services. */ int QServiceLocator::serviceCount() const @@ -174,7 +174,7 @@ int QServiceLocator::serviceCount() const return DefaultServiceCount + d->m_services.size() - d->m_nonNullDefaultServices; } -/*! +/* \fn T *Qt3DCore::QServiceLocator::service(int serviceType) Returns a pointer to the service provider for \a serviceType. If no provider @@ -185,7 +185,7 @@ int QServiceLocator::serviceCount() const */ -/*! +/* Returns a pointer to a provider for the system information service. If no provider has been explicitly registered for this service type, then a pointer to a null, do- nothing service is returned. @@ -196,7 +196,7 @@ QSystemInformationService *QServiceLocator::systemInformation() return static_cast<QSystemInformationService *>(d->m_services.value(SystemInformation, &d->m_nullSystemInfo)); } -/*! +/* Returns a pointer to a provider for the OpenGL information service. If no provider has been explicitly registered for this service type, then a pointer to a null, do- nothing service is returned. @@ -207,7 +207,7 @@ QOpenGLInformationService *QServiceLocator::openGLInformation() return static_cast<QOpenGLInformationService *>(d->m_services.value(OpenGLInformation, &d->m_nullOpenGLInfo)); } -/*! +/* Returns a pointer to a provider for the frame advance service. If no provider has been explicitly registered for this service type, then a pointer to a simple timer-based service is returned. @@ -218,7 +218,7 @@ QAbstractFrameAdvanceService *QServiceLocator::frameAdvanceService() return static_cast<QAbstractFrameAdvanceService *>(d->m_services.value(FrameAdvanceService, &d->m_defaultFrameAdvanceService)); } -/*! +/* Returns a pointer to a provider for the event filter service. If no provider has been explicitly registered for this service type, then a pointer to the default event filter service is returned. @@ -229,7 +229,7 @@ QEventFilterService *QServiceLocator::eventFilterService() return static_cast<QEventFilterService *>(d->m_services.value(EventFilterService, &d->m_eventFilterService)); } -/*! +/* \internal */ QAbstractServiceProvider *QServiceLocator::_q_getServiceHelper(int type) diff --git a/src/core/services/qsysteminformationservice.cpp b/src/core/services/qsysteminformationservice.cpp index fdc8594c9..f11e0c3d1 100644 --- a/src/core/services/qsysteminformationservice.cpp +++ b/src/core/services/qsysteminformationservice.cpp @@ -44,17 +44,7 @@ QT_BEGIN_NAMESPACE namespace Qt3DCore { -/*! - \class Qt3DCore::QAbstractServiceProviderPrivate - \internal -*/ - -/*! - \class Qt3DCore::QSystemInformationServicePrivate - \internal -*/ - -/*! +/* !\internal \class Qt3DCore::QSystemInformationService \inmodule Qt3DCore \brief Interface for a Qt3D system information service @@ -63,7 +53,7 @@ namespace Qt3DCore { system information service. */ -/*! +/* Creates an instance of QSystemInformationService, with a \a description for the new service. This constructor is protected so only subclasses can instantiate a QSystemInformationService object. @@ -73,7 +63,7 @@ QSystemInformationService::QSystemInformationService(const QString &description) { } -/*! +/* \internal */ QSystemInformationService::QSystemInformationService(QSystemInformationServicePrivate &dd) @@ -81,14 +71,14 @@ QSystemInformationService::QSystemInformationService(QSystemInformationServicePr { } -/*! +/* \fn QStringList Qt3DCore::QSystemInformationService::aspectNames() const Subclasses should override this function and return a string list containing the names of all registered aspects. */ -/*! +/* \fn int Qt3DCore::QSystemInformationService::threadPoolThreadCount() const Subclasses should override this function and return the number of threads in the diff --git a/src/core/services/qtickclockservice.cpp b/src/core/services/qtickclockservice.cpp index 8f29117e7..3691959ed 100644 --- a/src/core/services/qtickclockservice.cpp +++ b/src/core/services/qtickclockservice.cpp @@ -59,7 +59,7 @@ public: QTickClock m_clock; }; -/*! +/* !\internal \class Qt3DCore::QTickClockService \inmodule Qt3DCore \brief Default QAbstractFrameAdvanceService implementation. @@ -81,7 +81,7 @@ qint64 QTickClockService::waitForNextFrame() return d->m_clock.waitForNextTick(); } -/*! +/* Starts the inner tick clock used by the service. */ void QTickClockService::start() diff --git a/src/core/transforms/qtransform.cpp b/src/core/transforms/qtransform.cpp index cea09cb53..502f62131 100644 --- a/src/core/transforms/qtransform.cpp +++ b/src/core/transforms/qtransform.cpp @@ -47,10 +47,6 @@ QT_BEGIN_NAMESPACE namespace Qt3DCore { -/*! - \class Qt3DCore::QTransformPrivate - \internal -*/ QTransformPrivate::QTransformPrivate() : QComponentPrivate() , m_rotation() @@ -65,6 +61,12 @@ QTransform::QTransform(QNode *parent) : QComponent(*new QTransformPrivate, parent) { } +/*! + \qmltype Transform + \inqmlmodule Qt3D.Core + \since 5.6 + \TODO +*/ /*! \internal */ QTransform::QTransform(QTransformPrivate &dd, QNode *parent) diff --git a/src/doc/qt3d.qdocconf b/src/doc/qt3d.qdocconf index 72f4060a7..bb51fa725 100644 --- a/src/doc/qt3d.qdocconf +++ b/src/doc/qt3d.qdocconf @@ -6,6 +6,12 @@ version = $QT_VERSION examplesinstallpath = qt3d/qt3d +indexes += $QT_INSTALL_DOCS/qtcore/qtcore.index \ + $QT_INSTALL_DOCS/qtgui/qtgui.index \ + $QT_INSTALL_DOCS/qtqml/qtqml.index \ + $QT_INSTALL_DOCS/qtquick/qtquick.index \ + $QT_INSTALL_DOCS/qmake/qmake.index + qhp.projects = Qt3D qhp.Qt3D.file = qt3d.qhp @@ -32,7 +38,7 @@ qhp.Qt3D.subprojects.qmltypes.sortPages = true tagfile = qt3d.tags -depends += qtcore qtqml qtquick qtdoc +depends += qtcore qtgui qtqml qtquick qtdoc headerdirs += . \ ../render \ @@ -43,6 +49,8 @@ headerdirs += . \ ../quick3d/quick3d \ ../input +# Exclude private header files from the documentation build +excludefiles += "*_p.h" sourcedirs += . \ ../render \ @@ -60,20 +68,21 @@ examples.fileextensions += "*.fraq *.geom *.vert" examples.imageextensions += "*.png" #excludedirs += - +macro.TODO = " " imagedirs += images \ ../../examples/qt3d/shadow-map-qml/doc/images \ ../../examples/qt3d/basicshapes-cpp/doc/images \ ../../examples/qt3d/planets-qml/doc/images \ - ../../examples/qt3d/wireframe/doc/images + ../../examples/qt3d/wireframe/doc/images \ + ../../examples/qt3d/audio-visualizer-qml/doc/images -Cpp.ignoretokens += QT3DCORE_PRIVATE_EXPORT \ - QT3DINPUTSHARED_EXPORT \ +Cpp.ignoretokens += QT3DINPUTSHARED_EXPORT \ QT3DCORESHARED_EXPORT \ QT3DLOGIC_PRIVATE_EXPORT \ QT3DLOGICSHARED_EXPORT \ QT3DRENDERSHARED_EXPORT \ - QT3DRENDERSHARED_PRIVATE_EXPORT + QT3DRENDERSHARED_PRIVATE_EXPORT \ + QT3DQUICKSHARED_PRIVATE_EXPORT Cpp.ignoredirectives += Q_DECLARE_LOGGING_CATEGORY diff --git a/src/doc/src/qcircularbuffer.qdoc b/src/doc/src/qcircularbuffer.qdoc index 41cee96de..e313a7375 100644 --- a/src/doc/src/qcircularbuffer.qdoc +++ b/src/doc/src/qcircularbuffer.qdoc @@ -37,7 +37,7 @@ ** ****************************************************************************/ -/*! +/* !\internal \class Qt3DCore::QCircularBuffer \inmodule Qt3DCore \brief A template class providing a dynamic circular array. @@ -198,14 +198,14 @@ \sa iterator, const_iterator, QVector, QList, QLinkedList */ -/*! \fn Qt3DCore::QCircularBuffer::QCircularBuffer() +/* \fn Qt3DCore::QCircularBuffer::QCircularBuffer() Constructs an empty circular buffer with zero capacity. \sa resize(), setCapacity() */ -/*! \fn Qt3DCore::QCircularBuffer::QCircularBuffer(int capacity) +/* \fn Qt3DCore::QCircularBuffer::QCircularBuffer(int capacity) Constructs an empty circular buffer with an initial capacity of \a capacity elements. @@ -213,7 +213,7 @@ \sa resize(), setCapacity() */ -/*! \fn Qt3DCore::QCircularBuffer::QCircularBuffer(int capacity, const T &value) +/* \fn Qt3DCore::QCircularBuffer::QCircularBuffer(int capacity, const T &value) Constructs a circular buffer with an initial capacity and size of \a capacity elements. @@ -223,7 +223,7 @@ \sa resize(), setCapacity(), fill() */ -/*! \fn Qt3DCore::QCircularBuffer::QCircularBuffer(int capacity, int size, const T &value) +/* \fn Qt3DCore::QCircularBuffer::QCircularBuffer(int capacity, int size, const T &value) Constructs a circular buffer with an initial capacity of \a capacity elements and initial size of \a size elements. @@ -233,7 +233,7 @@ \sa resize(), setCapacity(), fill() */ -/*! \fn Qt3DCore::QCircularBuffer::QCircularBuffer(const QCircularBuffer<T> &other) +/* \fn Qt3DCore::QCircularBuffer::QCircularBuffer(const QCircularBuffer<T> &other) Constructs a copy of \a other. @@ -245,18 +245,18 @@ \sa operator=() */ -/*! \fn Qt3DCore::QCircularBuffer::~QCircularBuffer() +/* \fn Qt3DCore::QCircularBuffer::~QCircularBuffer() Destroys the circular buffer. */ -/*! \fn QCircularBuffer &Qt3DCore::QCircularBuffer::operator=(const QCircularBuffer<T> &other) +/* \fn QCircularBuffer &Qt3DCore::QCircularBuffer::operator=(const QCircularBuffer<T> &other) Assigns \a other to this circular buffer and returns a reference to this circular buffer. */ -/*! \fn Qt3DCore::QCircularBuffer::iterator Qt3DCore::QCircularBuffer::begin() +/* \fn Qt3DCore::QCircularBuffer::iterator Qt3DCore::QCircularBuffer::begin() Returns an \l{STL-Style iterators}{STL-style iterator} pointing to the first item in the circular buffer. @@ -264,12 +264,12 @@ \sa constBegin(), end() */ -/*! \fn Qt3DCore::QCircularBuffer::const_iterator Qt3DCore::QCircularBuffer::begin() const +/* \fn Qt3DCore::QCircularBuffer::const_iterator Qt3DCore::QCircularBuffer::begin() const \overload */ -/*! \fn Qt3DCore::QCircularBuffer::const_iterator Qt3DCore::QCircularBuffer::constBegin() const +/* \fn Qt3DCore::QCircularBuffer::const_iterator Qt3DCore::QCircularBuffer::constBegin() const Returns a const \l{STL-Style Iterators}{STL-style iterator} pointing to the first item in the circular buffer. @@ -277,7 +277,7 @@ \sa begin(), constEnd() */ -/*! \fn Qt3DCore::QCircularBuffer::iterator Qt3DCore::QCircularBuffer::end() +/* \fn Qt3DCore::QCircularBuffer::iterator Qt3DCore::QCircularBuffer::end() Returns an \l {STL-Style Iterators} {STL-style iterator} pointing to the imaginary item after the last item in the circular buffer. @@ -285,12 +285,12 @@ \sa begin(), constEnd() */ -/*! \fn Qt3DCore::QCircularBuffer::const_iterator Qt3DCore::QCircularBuffer::end() const +/* \fn Qt3DCore::QCircularBuffer::const_iterator Qt3DCore::QCircularBuffer::end() const \overload */ -/*! \fn Qt3DCore::QCircularBuffer::const_iterator Qt3DCore::QCircularBuffer::constEnd() const +/* \fn Qt3DCore::QCircularBuffer::const_iterator Qt3DCore::QCircularBuffer::constEnd() const Returns a const \l{STL-Style Iterators} {STL-style iterator} pointing to the imaginary item after the last item in the circular buffer. @@ -298,7 +298,7 @@ \sa constBegin(), end() */ -/*! \fn Qt3DCore::QCircularBuffer::iterator Qt3DCore::QCircularBuffer::erase(const_iterator pos) +/* \fn Qt3DCore::QCircularBuffer::iterator Qt3DCore::QCircularBuffer::erase(const_iterator pos) Removes the item pointed to by the iterator \a pos from the circular buffer, and returns an iterator to the next item in the circular @@ -307,7 +307,7 @@ \sa insert(), remove() */ -/*! \fn Qt3DCore::QCircularBuffer::iterator Qt3DCore::QCircularBuffer::erase(const_iterator begin, const_iterator end) +/* \fn Qt3DCore::QCircularBuffer::iterator Qt3DCore::QCircularBuffer::erase(const_iterator begin, const_iterator end) \overload @@ -316,65 +316,65 @@ before the call. */ -/*! \fn void Qt3DCore::QCircularBuffer::push_back(const T &value) +/* \fn void Qt3DCore::QCircularBuffer::push_back(const T &value) This function is provided for STL compatibility. It is equivalent to append(\a value). */ -/*! \fn void Qt3DCore::QCircularBuffer::push_front(const T &value) +/* \fn void Qt3DCore::QCircularBuffer::push_front(const T &value) This function is provided for STL compatibility. It is equivalent to prepend(\a value). */ -/*! \fn void Qt3DCore::QCircularBuffer::pop_back() +/* \fn void Qt3DCore::QCircularBuffer::pop_back() This function is provided for STL compatibility. It is equivalent to erase(end() - 1). */ -/*! \fn void Qt3DCore::QCircularBuffer::pop_front() +/* \fn void Qt3DCore::QCircularBuffer::pop_front() This function is provided for STL compatibility. It is equivalent to erase(begin()). */ -/*! \fn bool Qt3DCore::QCircularBuffer::empty() const +/* \fn bool Qt3DCore::QCircularBuffer::empty() const This function is provided for STL compatibility. It is equivalent to isEmpty(), returning true if the circular buffer is empty; otherwise returns false. */ -/*! \fn Qt3DCore::QCircularBuffer::reference Qt3DCore::QCircularBuffer::front() +/* \fn Qt3DCore::QCircularBuffer::reference Qt3DCore::QCircularBuffer::front() This function is provided for STL compatibility. It is equivalent to first(). */ -/*! \fn Qt3DCore::QCircularBuffer::const_reference Qt3DCore::QCircularBuffer::front() const +/* \fn Qt3DCore::QCircularBuffer::const_reference Qt3DCore::QCircularBuffer::front() const \overload */ -/*! \fn Qt3DCore::QCircularBuffer::reference Qt3DCore::QCircularBuffer::back() +/* \fn Qt3DCore::QCircularBuffer::reference Qt3DCore::QCircularBuffer::back() This function is provided for STL compatibility. It is equivalent to last(). */ -/*! \fn Qt3DCore::QCircularBuffer::const_reference Qt3DCore::QCircularBuffer::back() const +/* \fn Qt3DCore::QCircularBuffer::const_reference Qt3DCore::QCircularBuffer::back() const \overload */ -/*! \fn int Qt3DCore::QCircularBuffer::refCount() const +/* \fn int Qt3DCore::QCircularBuffer::refCount() const Returns the number of shallow copies that exist of this circular buffer. */ -/*! \fn Qt3DCore::QCircularBuffer::append(const T &value) +/* \fn Qt3DCore::QCircularBuffer::append(const T &value) Inserts \a value at the end of the circular buffer. If the circular buffer is full, then the oldest element is overwritten. @@ -388,7 +388,7 @@ \sa operator<<(), operator+=(), prepend(), insert() */ -/*! \fn const T &Qt3DCore::QCircularBuffer::at(int i) const +/* \fn const T &Qt3DCore::QCircularBuffer::at(int i) const Returns the item at index position \a i in the circular buffer. @@ -398,7 +398,7 @@ \sa value(), operator[]() */ -/*! \fn T &Qt3DCore::QCircularBuffer::operator[](int i) +/* \fn T &Qt3DCore::QCircularBuffer::operator[](int i) Returns the item at index position \a i as a modifiable reference. @@ -411,14 +411,14 @@ \sa at(), value() */ -/*! \fn const T &Qt3DCore::QCircularBuffer::operator[](int i) const +/* \fn const T &Qt3DCore::QCircularBuffer::operator[](int i) const \overload Same as at(\a i). */ -/*! \fn int Qt3DCore::QCircularBuffer::capacity() const +/* \fn int Qt3DCore::QCircularBuffer::capacity() const Returns the maximum number of elements that can be stored in the circular buffer. @@ -426,7 +426,7 @@ \sa setCapacity(), size() */ -/*! \fn void Qt3DCore::QCircularBuffer::clear() +/* \fn void Qt3DCore::QCircularBuffer::clear() Removes all elements from the circular buffer so that the size is zero. The capacity is unchanged. @@ -434,7 +434,7 @@ \sa isEmpty() */ -/*! \fn bool Qt3DCore::QCircularBuffer::contains(const T &value) const +/* \fn bool Qt3DCore::QCircularBuffer::contains(const T &value) const Returns true if the circular buffer contains an occurrence of \a value; otherwise returns false. @@ -445,7 +445,7 @@ \sa indexOf(), count() */ -/*! \fn int Qt3DCore::QCircularBuffer::count(const T &value) const +/* \fn int Qt3DCore::QCircularBuffer::count(const T &value) const Returns the number of occurrences of \a value in the circular buffer. @@ -455,14 +455,14 @@ \sa contains(), indexOf() */ -/*! \fn int Qt3DCore::QCircularBuffer::count() const +/* \fn int Qt3DCore::QCircularBuffer::count() const \overload Same as size(). */ -/*! \fn Qt3DCore::QCircularBuffer::array_range Qt3DCore::QCircularBuffer::data() +/* \fn Qt3DCore::QCircularBuffer::array_range Qt3DCore::QCircularBuffer::data() Returns an \l array_range describing the internal array of data. If the circular buffer is non-linearized, then this function causes it to be @@ -475,7 +475,7 @@ \sa constData(), dataOne(), dataTwo(), isLinearised() */ -/*! \fn Qt3DCore::QCircularBuffer::const_array_range Qt3DCore::QCircularBuffer::data() const +/* \fn Qt3DCore::QCircularBuffer::const_array_range Qt3DCore::QCircularBuffer::data() const \overload @@ -484,7 +484,7 @@ constness. */ -/*! \fn Qt3DCore::QCircularBuffer::const_array_range Qt3DCore::QCircularBuffer::constData() const +/* \fn Qt3DCore::QCircularBuffer::const_array_range Qt3DCore::QCircularBuffer::constData() const Returns a \l const_array_range describing the internal array of data. @@ -499,7 +499,7 @@ \sa data(), constDataOne(), constDataTwo(), isLinearised() */ -/*! \fn Qt3DCore::QCircularBuffer::array_range Qt3DCore::QCircularBuffer::dataOne() +/* \fn Qt3DCore::QCircularBuffer::array_range Qt3DCore::QCircularBuffer::dataOne() Returns an \l array_range describing the first internal array of contiguous data. If the circular buffer is linearized, then this function is @@ -515,7 +515,7 @@ \sa constDataOne(), dataTwo(), data(), isLinearised() */ -/*! \fn Qt3DCore::QCircularBuffer::const_array_range Qt3DCore::QCircularBuffer::dataOne() const +/* \fn Qt3DCore::QCircularBuffer::const_array_range Qt3DCore::QCircularBuffer::dataOne() const \overload @@ -523,7 +523,7 @@ (unless the circular buffer is empty). */ -/*! \fn Qt3DCore::QCircularBuffer::const_array_range Qt3DCore::QCircularBuffer::constDataOne() const +/* \fn Qt3DCore::QCircularBuffer::const_array_range Qt3DCore::QCircularBuffer::constDataOne() const Returns a \l const_array_range describing the first internal array of contiguous data. If the circular buffer is linearized, then this function is @@ -539,7 +539,7 @@ \sa dataOne(), constDataTwo(), constData(), isLinearised() */ -/*! \fn Qt3DCore::QCircularBuffer::array_range Qt3DCore::QCircularBuffer::dataTwo() +/* \fn Qt3DCore::QCircularBuffer::array_range Qt3DCore::QCircularBuffer::dataTwo() Returns an \l array_range describing the first internal array of contiguous data. If the circular buffer is linearized, then the pointer and array size @@ -549,12 +549,12 @@ \sa dataOne(), constDataTwo(), data(), isLinearised() */ -/*! \fn Qt3DCore::QCircularBuffer::const_array_range Qt3DCore::QCircularBuffer::dataTwo() const +/* \fn Qt3DCore::QCircularBuffer::const_array_range Qt3DCore::QCircularBuffer::dataTwo() const \overload */ -/*! \fn Qt3DCore::QCircularBuffer::const_array_range Qt3DCore::QCircularBuffer::constDataTwo() const +/* \fn Qt3DCore::QCircularBuffer::const_array_range Qt3DCore::QCircularBuffer::constDataTwo() const Returns a \l const_array_range describing the first internal array of contiguous data. If the circular buffer is linearized, then the pointer and array size @@ -564,7 +564,7 @@ \sa constDataOne(), dataTwo(), constData(), isLinearised() */ -/*! \fn bool Qt3DCore::QCircularBuffer::endsWith(const T &value) const +/* \fn bool Qt3DCore::QCircularBuffer::endsWith(const T &value) const Returns \c true if this circular buffer is not empty and its last item is equal to \a value; otherwise returns \c false. @@ -572,7 +572,7 @@ \sa isEmpty(), last(), startsWith() */ -/*! \fn QCircularBuffer<T>& Qt3DCore::QCircularBuffer::fill(const T &value, int size = -1) +/* \fn QCircularBuffer<T>& Qt3DCore::QCircularBuffer::fill(const T &value, int size = -1) Assigns \a value to all items in the circular buffer. If \a size is different from -1 (the default), the circular buffer is resized to size \a @@ -586,7 +586,7 @@ \sa resize() */ -/*! \fn T &Qt3DCore::QCircularBuffer::first() +/* \fn T &Qt3DCore::QCircularBuffer::first() Returns a reference to the first item in the circular buffer. This function assumes that the circular buffer isn't empty. @@ -594,12 +594,12 @@ \sa last(), isEmpty() */ -/*! \fn const T &Qt3DCore::QCircularBuffer::first() const +/* \fn const T &Qt3DCore::QCircularBuffer::first() const \overload */ -/*! \fn int Qt3DCore::QCircularBuffer::freeSize() const +/* \fn int Qt3DCore::QCircularBuffer::freeSize() const Returns the number of items that can be added to the circular buffer without causing the earliest item to be overwritten. It is equivalent @@ -608,7 +608,7 @@ \sa sizeAvailable(), capacity(), isEmpty(), isFull(), size() */ -/*! \fn static QCircularBuffer<T> Qt3DCore::QCircularBuffer::fromList(const QList<T>& list) +/* \fn static QCircularBuffer<T> Qt3DCore::QCircularBuffer::fromList(const QList<T>& list) Returns a QCircularBuffer object with the data contained in \a list. The capacity and size of the circular buffer will be equal to the size of @@ -620,7 +620,7 @@ \sa fromVector(), toList(), toVector() */ -/*! \fn static QCircularBuffer<T> Qt3DCore::QCircularBuffer::fromVector(const QVector<T>& vector) +/* \fn static QCircularBuffer<T> Qt3DCore::QCircularBuffer::fromVector(const QVector<T>& vector) Returns a QCircularBuffer object with the data contained in \a vector. The capacity and size of the circular buffer will be equal to the size of @@ -629,7 +629,7 @@ \sa fromList(), toVector(), toList() */ -/*! \fn int Qt3DCore::QCircularBuffer::indexOf(const T &value, int from = 0) const +/* \fn int Qt3DCore::QCircularBuffer::indexOf(const T &value, int from = 0) const Returns the index position of the first occurrence of \a value in the circular buffer, searching forward from index position \a from. @@ -644,7 +644,7 @@ \sa lastIndexOf(), contains() */ -/*! \fn void Qt3DCore::QCircularBuffer::insert(int i, const T &value) +/* \fn void Qt3DCore::QCircularBuffer::insert(int i, const T &value) Inserts \a value at index position \a i in the circular buffer. If \a i is 0, the value is prepended to the circular buffer. If \a i @@ -676,7 +676,7 @@ \sa append(), prepend(), remove() */ -/*! \fn void Qt3DCore::QCircularBuffer::insert(int i, int count, const T &value) +/* \fn void Qt3DCore::QCircularBuffer::insert(int i, int count, const T &value) \overload @@ -710,7 +710,7 @@ \sa append(), prepend(), remove() */ -/*! \fn Qt3DCore::QCircularBuffer::iterator Qt3DCore::QCircularBuffer::insert(const_iterator before, int count, const T &value) +/* \fn Qt3DCore::QCircularBuffer::iterator Qt3DCore::QCircularBuffer::insert(const_iterator before, int count, const T &value) \overload @@ -721,7 +721,7 @@ \sa append(), prepend(), remove() */ -/*! \fn Qt3DCore::QCircularBuffer::iterator Qt3DCore::QCircularBuffer::insert(const_iterator before, const T &value) +/* \fn Qt3DCore::QCircularBuffer::iterator Qt3DCore::QCircularBuffer::insert(const_iterator before, const T &value) \overload @@ -731,21 +731,21 @@ \sa append(), prepend(), remove() */ -/*! \fn bool Qt3DCore::QCircularBuffer::isEmpty() const +/* \fn bool Qt3DCore::QCircularBuffer::isEmpty() const Returns true if the circular buffer has size 0; otherwise returns false. \sa capacity(), resize(), setCapacity(), size() */ -/*! \fn bool Qt3DCore::QCircularBuffer::isFull() const +/* \fn bool Qt3DCore::QCircularBuffer::isFull() const Returns true if the circular buffer is full ie if size() == capacity(); otherwise returns false. \sa capacity(), resize(), setCapacity(), size() */ -/*! \fn bool Qt3DCore::QCircularBuffer::isLinearised() const +/* \fn bool Qt3DCore::QCircularBuffer::isLinearised() const Returns \c true if the circular buffer is linearized; otherwise returns \c false. @@ -820,7 +820,7 @@ \sa linearise(), data(), dataOne(), dataTwo() */ -/*! \fn T &Qt3DCore::QCircularBuffer::last() +/* \fn T &Qt3DCore::QCircularBuffer::last() Returns a reference to the last item in the circular buffer. This function assumes that the circular buffer isn't empty. @@ -828,12 +828,12 @@ \sa first(), isEmpty() */ -/*! \fn const T &Qt3DCore::QCircularBuffer::last() const +/* \fn const T &Qt3DCore::QCircularBuffer::last() const \overload */ -/*! \fn int Qt3DCore::QCircularBuffer::lastIndexOf(const T &value, int from = -1) const +/* \fn int Qt3DCore::QCircularBuffer::lastIndexOf(const T &value, int from = -1) const Returns the index position of the last occurrence of the value \a value in the circular buffer, searching backward from index position \a @@ -849,7 +849,7 @@ \sa indexOf() */ -/*! \fn void Qt3DCore::QCircularBuffer::linearise() +/* \fn void Qt3DCore::QCircularBuffer::linearise() Linearizes the internal representation of the circular buffer such that all items are stored in a single contiguous array. @@ -859,7 +859,7 @@ \sa isLinearised() */ -/*! \fn void Qt3DCore::QCircularBuffer::prepend(const T &value) +/* \fn void Qt3DCore::QCircularBuffer::prepend(const T &value) Inserts \a value at the beginning of the circular buffer. If the circular buffer is full, then the highest index item is overwritten. @@ -873,14 +873,14 @@ \sa operator<<(), operator+=(), append(), insert() */ -/*! \fn void Qt3DCore::QCircularBuffer::remove(int i) +/* \fn void Qt3DCore::QCircularBuffer::remove(int i) Removes the element at index position \a i. \sa insert(), replace(), fill() */ -/*! \fn void Qt3DCore::QCircularBuffer::remove(int i, int count) +/* \fn void Qt3DCore::QCircularBuffer::remove(int i, int count) \overload @@ -890,7 +890,7 @@ \sa insert(), replace(), fill() */ -/*! \fn void Qt3DCore::QCircularBuffer::replace(int i, const T &value) +/* \fn void Qt3DCore::QCircularBuffer::replace(int i, const T &value) Replaces the item at index position \a i with \a value. @@ -900,7 +900,7 @@ \sa operator[](), remove() */ -/*! \fn void Qt3DCore::QCircularBuffer::reserve(int capacity) +/* \fn void Qt3DCore::QCircularBuffer::reserve(int capacity) Sets the capacity of the circular buffer to \a capacity. It is a synonym for setCapacity(). @@ -908,7 +908,7 @@ \sa setCapacity() */ -/*! \fn void Qt3DCore::QCircularBuffer::resize(int size) +/* \fn void Qt3DCore::QCircularBuffer::resize(int size) Changes the size of the circular buffer to \a size which must be > 0 and <= capacity(). If \a size is less than the old size, then the highest indexed @@ -919,21 +919,21 @@ \sa size(), insert(), remove(), capacity(), setCapacity() */ -/*! \fn void Qt3DCore::QCircularBuffer::setCapacity(int capacity) +/* \fn void Qt3DCore::QCircularBuffer::setCapacity(int capacity) Sets the capacity of the circular buffer to \a capacity. \sa reserve(), capacity() */ -/*! \fn int Qt3DCore::QCircularBuffer::size() const +/* \fn int Qt3DCore::QCircularBuffer::size() const Returns the number of items in the circular buffer. \sa sizeAvailable(), capacity(), resize() */ -/*! \fn int Qt3DCore::QCircularBuffer::sizeAvailable() const +/* \fn int Qt3DCore::QCircularBuffer::sizeAvailable() const Returns the number of items that can be added to the circular buffer without causing the earliest item to be overwritten. It is equivalent @@ -942,7 +942,7 @@ \sa capacity(), isEmpty(), isFull(), size(), freeSize() */ -/*! \fn void Qt3DCore::QCircularBuffer::squeeze() +/* \fn void Qt3DCore::QCircularBuffer::squeeze() Releases any unused memory from the circular buffer. It is equivalent to calling setCapacity(size()). @@ -950,7 +950,7 @@ \sa setCapacity(), size(), resize(), sizeAvailable() */ -/*! \fn bool Qt3DCore::QCircularBuffer::startsWith(const T &value) const +/* \fn bool Qt3DCore::QCircularBuffer::startsWith(const T &value) const Returns \c true if the circular buffer is not empty and its first item is equal to \a value; otherwise returns \c false. @@ -958,7 +958,7 @@ \sa isEmpty(), first(), endsWith() */ -/*! \fn QList<T> Qt3DCore::QCircularBuffer::toList() const +/* \fn QList<T> Qt3DCore::QCircularBuffer::toList() const Returns a QList object with the data contained in this QCircularBuffer. @@ -969,14 +969,14 @@ \sa fromList(), toVector() */ -/*! \fn QVector<T> Qt3DCore::QCircularBuffer::toVector() const +/* \fn QVector<T> Qt3DCore::QCircularBuffer::toVector() const Returns a QVector object with the data contained in this QCircularBuffer. \sa fromVector(), toList() */ -/*! \fn T Qt3DCore::QCircularBuffer::value(int i) const +/* \fn T Qt3DCore::QCircularBuffer::value(int i) const Returns the value at index position \a i in the circular buffer. @@ -988,7 +988,7 @@ \sa at(), operator[]() */ -/*! \fn T Qt3DCore::QCircularBuffer::value(int i, const T &defaultValue) const +/* \fn T Qt3DCore::QCircularBuffer::value(int i, const T &defaultValue) const \overload @@ -996,7 +996,7 @@ \a defaultValue. */ -/*! \fn bool Qt3DCore::operator==(const QCircularBuffer<T> &lhs, const QCircularBuffer<T> &rhs) +/* \fn bool Qt3DCore::operator==(const QCircularBuffer<T> &lhs, const QCircularBuffer<T> &rhs) Returns \c true if the circular buffer \a lhs is equal to \a rhs; otherwise returns \c false. @@ -1010,7 +1010,7 @@ \sa operator!=() */ -/*! \fn bool Qt3DCore::operator!=(const QCircularBuffer<T> &lhs, const QCircularBuffer<T> &rhs) +/* \fn bool Qt3DCore::operator!=(const QCircularBuffer<T> &lhs, const QCircularBuffer<T> &rhs) Returns \c true if the circular buffer \a lhs is not equal to \a rhs; otherwise returns \c false. @@ -1024,7 +1024,7 @@ \sa operator==() */ -/*! \fn Qt3DCore::QCircularBuffer<T>& Qt3DCore::QCircularBuffer::operator+=(const T &other) +/* \fn Qt3DCore::QCircularBuffer<T>& Qt3DCore::QCircularBuffer::operator+=(const T &other) Appends the item \a other to this circular buffer and returns a reference to this circular buffer. @@ -1032,7 +1032,7 @@ \sa operator+(), operator<<(), append() */ -/*! \fn Qt3DCore::QCircularBuffer<T>& Qt3DCore::QCircularBuffer::operator+=(const QCircularBuffer<T>& other) +/* \fn Qt3DCore::QCircularBuffer<T>& Qt3DCore::QCircularBuffer::operator+=(const QCircularBuffer<T>& other) \overload @@ -1042,17 +1042,17 @@ \sa operator+(), operator<<(), append() */ -/*! \fn Qt3DCore::QCircularBuffer<T>& Qt3DCore::QCircularBuffer::operator+=(const QVector<T>& other) +/* \fn Qt3DCore::QCircularBuffer<T>& Qt3DCore::QCircularBuffer::operator+=(const QVector<T>& other) \overload */ -/*! \fn Qt3DCore::QCircularBuffer<T>& Qt3DCore::QCircularBuffer::operator+=(const QList<T>& other) +/* \fn Qt3DCore::QCircularBuffer<T>& Qt3DCore::QCircularBuffer::operator+=(const QList<T>& other) \overload */ -/*! \fn Qt3DCore::QCircularBuffer<T>& Qt3DCore::QCircularBuffer::operator<<(const T &other) +/* \fn Qt3DCore::QCircularBuffer<T>& Qt3DCore::QCircularBuffer::operator<<(const T &other) Appends the item \a other to this circular buffer and returns a reference to this circular buffer. @@ -1060,7 +1060,7 @@ \sa operator+(), operator+=(), append() */ -/*! \fn Qt3DCore::QCircularBuffer<T>& Qt3DCore::QCircularBuffer::operator<<(const QCircularBuffer<T>& other) +/* \fn Qt3DCore::QCircularBuffer<T>& Qt3DCore::QCircularBuffer::operator<<(const QCircularBuffer<T>& other) \overload @@ -1070,17 +1070,17 @@ \sa operator+(), operator+=(), append() */ -/*! \fn Qt3DCore::QCircularBuffer<T>& Qt3DCore::QCircularBuffer::operator<<(const QVector<T>& other) +/* \fn Qt3DCore::QCircularBuffer<T>& Qt3DCore::QCircularBuffer::operator<<(const QVector<T>& other) \overload */ -/*! \fn Qt3DCore::QCircularBuffer<T>& Qt3DCore::QCircularBuffer::operator<<(const QList<T>& other) +/* \fn Qt3DCore::QCircularBuffer<T>& Qt3DCore::QCircularBuffer::operator<<(const QList<T>& other) \overload */ -/*! \fn Qt3DCore::QCircularBuffer<T> Qt3DCore::operator+(const QCircularBuffer<T>& lhs, const QCircularBuffer<T>& rhs) +/* \fn Qt3DCore::QCircularBuffer<T> Qt3DCore::operator+(const QCircularBuffer<T>& lhs, const QCircularBuffer<T>& rhs) \relates Qt3DCore::QCircularBuffer Returns a circular buffer object with capacity of lhs.size() + rhs.size() containing @@ -1089,78 +1089,78 @@ \sa {QCircularBuffer::}{operator+=()} */ -/*! \fn void Qt3DCore::swap(QCircularBuffer<T> &lhs, QCircularBuffer<T> &rhs) +/* \fn void Qt3DCore::swap(QCircularBuffer<T> &lhs, QCircularBuffer<T> &rhs) Swaps the contents of the circular buffer \a lhs with the contents of \a rhs. */ -/*! \fn bool Qt3DCore::operator<(const QCircularBuffer<T> &lhs, const QCircularBuffer<T> &rhs) +/* \fn bool Qt3DCore::operator<(const QCircularBuffer<T> &lhs, const QCircularBuffer<T> &rhs) Returns \c true if \a lhs is lexographically less than \a rhs. This is equivalent to calling \c{return std::lexicographical_compare(lhs.begin(), lhs.end(), rhs.begin(), rhs.end())}. */ -/*! \fn bool Qt3DCore::operator>(const QCircularBuffer<T> &lhs, const QCircularBuffer<T> &rhs) +/* \fn bool Qt3DCore::operator>(const QCircularBuffer<T> &lhs, const QCircularBuffer<T> &rhs) Returns \c true if \a rhs is lexographically less than \a lhs. */ -/*! \fn bool Qt3DCore::operator>=(const QCircularBuffer<T> &lhs, const QCircularBuffer<T> &rhs) +/* \fn bool Qt3DCore::operator>=(const QCircularBuffer<T> &lhs, const QCircularBuffer<T> &rhs) Returns \c true if \a lhs is lexographically less than or equal to \a rhs. */ -/*! \fn bool Qt3DCore::operator<=(const QCircularBuffer<T> &lhs, const QCircularBuffer<T> &rhs) +/* \fn bool Qt3DCore::operator<=(const QCircularBuffer<T> &lhs, const QCircularBuffer<T> &rhs) Returns \c true if \a lhs is lexographically less than or equal to \a rhs. */ -/*! \typedef Qt3DCore::QCircularBuffer::Iterator +/* \typedef Qt3DCore::QCircularBuffer::Iterator Qt-style synonym for \l iterator. */ -/*! \typedef Qt3DCore::QCircularBuffer::ConstIterator +/* \typedef Qt3DCore::QCircularBuffer::ConstIterator Qt-style synonym for \l const_iterator. */ -/*! \typedef Qt3DCore::QCircularBuffer::const_pointer +/* \typedef Qt3DCore::QCircularBuffer::const_pointer Typedef for const T *. Provided for STL compatibility. */ -/*! \typedef Qt3DCore::QCircularBuffer::const_reference +/* \typedef Qt3DCore::QCircularBuffer::const_reference Typedef for T &. Provided for STL compatibility. */ -/*! \typedef Qt3DCore::QCircularBuffer::difference_type +/* \typedef Qt3DCore::QCircularBuffer::difference_type Typedef for ptrdiff_t. Provided for STL compatibility. */ -/*! \typedef Qt3DCore::QCircularBuffer::pointer +/* \typedef Qt3DCore::QCircularBuffer::pointer Typedef for T *. Provided for STL compatibility. */ -/*! \typedef Qt3DCore::QCircularBuffer::reference +/* \typedef Qt3DCore::QCircularBuffer::reference Typedef for T &. Provided for STL compatibility. */ -/*! \typedef Qt3DCore::QCircularBuffer::size_type +/* \typedef Qt3DCore::QCircularBuffer::size_type Typedef for int. Provided for STL compatibility. */ -/*! \typedef Qt3DCore::QCircularBuffer::value_type +/* \typedef Qt3DCore::QCircularBuffer::value_type Typedef for T. Provided for STL compatibility. */ -/*! \typedef Qt3DCore::QCircularBuffer::array_range +/* \typedef Qt3DCore::QCircularBuffer::array_range Typedef for QPair<T*,int>. The first element is a pointer to the first element of an array of T. The second element is the number @@ -1169,25 +1169,25 @@ \sa data(), dataOne(), dataTwo() */ -/*! \typedef Qt3DCore::QCircularBuffer::const_array_range +/* \typedef Qt3DCore::QCircularBuffer::const_array_range Typedef for QPair<const T*,int>. The first element is a pointer to the first element of an array of const T. The second element is the number of elements in the array. */ -/*! \typedef Qt3DCore::QCircularBuffer::ArrayRange +/* \typedef Qt3DCore::QCircularBuffer::ArrayRange Qt-style synonym for \l array_range. */ -/*! \typedef Qt3DCore::QCircularBuffer::ConstArrayRange +/* \typedef Qt3DCore::QCircularBuffer::ConstArrayRange Qt-style synonym for \l const_array_range. */ -/*! \class Qt3DCore::QCircularBuffer::iterator +/* \class Qt3DCore::QCircularBuffer::iterator \inmodule Qt3DCore \brief The Qt3DCore::QCircularBuffer::iterator class provides an STL-style non-const iterator for QCircularBuffer. @@ -1197,33 +1197,33 @@ \sa begin(), end(), const_iterator */ -/*! \typedef Qt3DCore::QCircularBuffer::iterator::iterator_category +/* \typedef Qt3DCore::QCircularBuffer::iterator::iterator_category A synonym for \e {std::random_access_iterator_tag} indicating this iterator is a random access iterator. */ -/*! \typedef Qt3DCore::QCircularBuffer::iterator::difference_type +/* \typedef Qt3DCore::QCircularBuffer::iterator::difference_type \internal */ -/*! \typedef Qt3DCore::QCircularBuffer::iterator::value_type +/* \typedef Qt3DCore::QCircularBuffer::iterator::value_type \internal */ -/*! \typedef Qt3DCore::QCircularBuffer::iterator::pointer +/* \typedef Qt3DCore::QCircularBuffer::iterator::pointer \internal */ -/*! \typedef Qt3DCore::QCircularBuffer::iterator::reference +/* \typedef Qt3DCore::QCircularBuffer::iterator::reference \internal */ -/*! \fn Qt3DCore::QCircularBuffer::iterator::iterator() +/* \fn Qt3DCore::QCircularBuffer::iterator::iterator() Constructs an uninitialized iterator. @@ -1234,12 +1234,12 @@ \sa begin(), end() */ -/*! \fn Qt3DCore::QCircularBuffer::iterator::iterator(QCircularBuffer<T> *buffer, int index) +/* \fn Qt3DCore::QCircularBuffer::iterator::iterator(QCircularBuffer<T> *buffer, int index) \internal */ -/*! \fn T &Qt3DCore::QCircularBuffer::iterator::operator*() const +/* \fn T &Qt3DCore::QCircularBuffer::iterator::operator*() const Returns a modifiable reference to the current item. @@ -1249,14 +1249,14 @@ \sa operator->() */ -/*! \fn T *Qt3DCore::QCircularBuffer::iterator::operator->() const +/* \fn T *Qt3DCore::QCircularBuffer::iterator::operator->() const Returns a pointer to the current item. \sa operator*() */ -/*! \fn T &Qt3DCore::QCircularBuffer::iterator::operator[](int j) const +/* \fn T &Qt3DCore::QCircularBuffer::iterator::operator[](int j) const Returns a modifiable reference to the item at position *this + \a{j}. @@ -1267,7 +1267,7 @@ \sa operator+() */ -/*! +/* \fn bool Qt3DCore::QCircularBuffer::iterator::operator==(const iterator &other) const Returns \c true if \a other points to the same item as this @@ -1276,7 +1276,7 @@ \sa operator!=() */ -/*! +/* \fn bool Qt3DCore::QCircularBuffer::iterator::operator!=(const iterator &other) const Returns \c true if \a other points to a different item than this @@ -1285,35 +1285,35 @@ \sa operator==() */ -/*! +/* \fn bool Qt3DCore::QCircularBuffer::iterator::operator<(const iterator& other) const Returns \c true if the item pointed to by this iterator occurs before the item pointed to by the \a other iterator. */ -/*! +/* \fn bool Qt3DCore::QCircularBuffer::iterator::operator<=(const iterator& other) const Returns \c true if the item pointed to by this iterator occurs before or at the same position as the item pointed to by the \a other iterator. */ -/*! +/* \fn bool Qt3DCore::QCircularBuffer::iterator::operator>(const iterator& other) const Returns \c true if the item pointed to by this iterator occurs after the item pointed to by the \a other iterator. */ -/*! +/* \fn bool Qt3DCore::QCircularBuffer::iterator::operator>=(const iterator& other) const Returns \c true if the item pointed to by this iterator occurs after or at the same position as the item pointed to by the \a other iterator. */ -/*! \fn Qt3DCore::QCircularBuffer::iterator &Qt3DCore::QCircularBuffer::iterator::operator++() +/* \fn Qt3DCore::QCircularBuffer::iterator &Qt3DCore::QCircularBuffer::iterator::operator++() The prefix ++ operator (\c{++it}) advances the iterator to the next item in the circular buffer and returns an iterator to the new current @@ -1324,7 +1324,7 @@ \sa operator--() */ -/*! \fn Qt3DCore::QCircularBuffer::iterator Qt3DCore::QCircularBuffer::iterator::operator++(int) +/* \fn Qt3DCore::QCircularBuffer::iterator Qt3DCore::QCircularBuffer::iterator::operator++(int) \overload @@ -1333,7 +1333,7 @@ current item. */ -/*! \fn Qt3DCore::QCircularBuffer::iterator &Qt3DCore::QCircularBuffer::iterator::operator--() +/* \fn Qt3DCore::QCircularBuffer::iterator &Qt3DCore::QCircularBuffer::iterator::operator--() The prefix -- operator (\c{--it}) makes the preceding item the current item, and returns an iterator to the new current item. @@ -1343,7 +1343,7 @@ \sa operator++() */ -/*! \fn Qt3DCore::QCircularBuffer::iterator Qt3DCore::QCircularBuffer::iterator::operator--(int) +/* \fn Qt3DCore::QCircularBuffer::iterator Qt3DCore::QCircularBuffer::iterator::operator--(int) \overload @@ -1351,7 +1351,7 @@ the current item, and returns an iterator to the previously current item. */ -/*! \fn Qt3DCore::QCircularBuffer::iterator &Qt3DCore::QCircularBuffer::iterator::operator+=(int j) +/* \fn Qt3DCore::QCircularBuffer::iterator &Qt3DCore::QCircularBuffer::iterator::operator+=(int j) Advances the iterator by \a j items. (If \a j is negative, the iterator goes backward.) @@ -1359,7 +1359,7 @@ \sa operator-=(), operator+() */ -/*! \fn Qt3DCore::QCircularBuffer::iterator &Qt3DCore::QCircularBuffer::iterator::operator-=(int j) +/* \fn Qt3DCore::QCircularBuffer::iterator &Qt3DCore::QCircularBuffer::iterator::operator-=(int j) Makes the iterator go back by \a j items. (If \a j is negative, the iterator goes forward.) @@ -1367,7 +1367,7 @@ \sa operator+=(), operator-() */ -/*! \fn Qt3DCore::QCircularBuffer::iterator Qt3DCore::QCircularBuffer::iterator::operator+(int j) const +/* \fn Qt3DCore::QCircularBuffer::iterator Qt3DCore::QCircularBuffer::iterator::operator+(int j) const Returns an iterator to the item at \a j positions forward from this iterator. (If \a j is negative, the iterator goes backward.) @@ -1375,7 +1375,7 @@ \sa operator-(), operator+=() */ -/*! \fn Qt3DCore::QCircularBuffer::iterator Qt3DCore::QCircularBuffer::iterator::operator-(int j) const +/* \fn Qt3DCore::QCircularBuffer::iterator Qt3DCore::QCircularBuffer::iterator::operator-(int j) const Returns an iterator to the item at \a j positions backward from this iterator. (If \a j is negative, the iterator goes forward.) @@ -1383,14 +1383,14 @@ \sa operator+(), operator-=() */ -/*! \fn int Qt3DCore::QCircularBuffer::iterator::operator-(iterator other) const +/* \fn int Qt3DCore::QCircularBuffer::iterator::operator-(iterator other) const Returns the number of items between the item pointed to by \a other and the item pointed to by this iterator. */ -/*! \class Qt3DCore::QCircularBuffer::const_iterator +/* \class Qt3DCore::QCircularBuffer::const_iterator \inmodule Qt3DCore \brief The Qt3DCore::QCircularBuffer::const_iterator class provides an STL-style const iterator for QCircularBuffer. @@ -1400,33 +1400,33 @@ \sa constBegin(), constEnd(), iterator */ -/*! \typedef Qt3DCore::QCircularBuffer::const_iterator::iterator_category +/* \typedef Qt3DCore::QCircularBuffer::const_iterator::iterator_category A synonym for \e {std::random_access_iterator_tag} indicating this iterator is a random access iterator. */ -/*! \typedef Qt3DCore::QCircularBuffer::const_iterator::difference_type +/* \typedef Qt3DCore::QCircularBuffer::const_iterator::difference_type \internal */ -/*! \typedef Qt3DCore::QCircularBuffer::const_iterator::value_type +/* \typedef Qt3DCore::QCircularBuffer::const_iterator::value_type \internal */ -/*! \typedef Qt3DCore::QCircularBuffer::const_iterator::pointer +/* \typedef Qt3DCore::QCircularBuffer::const_iterator::pointer \internal */ -/*! \typedef Qt3DCore::QCircularBuffer::const_iterator::reference +/* \typedef Qt3DCore::QCircularBuffer::const_iterator::reference \internal */ -/*! \fn Qt3DCore::QCircularBuffer::const_iterator::const_iterator() +/* \fn Qt3DCore::QCircularBuffer::const_iterator::const_iterator() Constructs an uninitialized const iterator. @@ -1437,26 +1437,26 @@ \sa begin(), end() */ -/*! \fn Qt3DCore::QCircularBuffer::const_iterator::const_iterator(const iterator &other) +/* \fn Qt3DCore::QCircularBuffer::const_iterator::const_iterator(const iterator &other) \internal */ -/*! \fn const T &Qt3DCore::QCircularBuffer::const_iterator::operator*() const +/* \fn const T &Qt3DCore::QCircularBuffer::const_iterator::operator*() const Returns a const reference to the current item. \sa operator->() */ -/*! \fn const T *Qt3DCore::QCircularBuffer::const_iterator::operator->() const +/* \fn const T *Qt3DCore::QCircularBuffer::const_iterator::operator->() const Returns a pointer to the current item. \sa operator*() */ -/*! \fn const T &Qt3DCore::QCircularBuffer::const_iterator::operator[](int j) const +/* \fn const T &Qt3DCore::QCircularBuffer::const_iterator::operator[](int j) const Returns a const reference to the item at position *this + \a{j}. @@ -1467,7 +1467,7 @@ \sa operator+() */ -/*! +/* \fn bool Qt3DCore::QCircularBuffer::const_iterator::operator==(const const_iterator &other) const Returns \c true if \a other points to the same item as this @@ -1476,7 +1476,7 @@ \sa operator!=() */ -/*! +/* \fn bool Qt3DCore::QCircularBuffer::const_iterator::operator!=(const const_iterator &other) const Returns \c true if \a other points to a different item than this @@ -1485,35 +1485,35 @@ \sa operator==() */ -/*! +/* \fn bool Qt3DCore::QCircularBuffer::const_iterator::operator<(const const_iterator& other) const Returns \c true if the item pointed to by this iterator occurs before the item pointed to by the \a other iterator. */ -/*! +/* \fn bool Qt3DCore::QCircularBuffer::const_iterator::operator<=(const const_iterator& other) const Returns \c true if the item pointed to by this iterator occurs before, or at the same position as the item pointed to by the \a other iterator. */ -/*! +/* \fn bool Qt3DCore::QCircularBuffer::const_iterator::operator>(const const_iterator& other) const Returns \c true if the item pointed to by this iterator occurs after the item pointed to by the \a other iterator. */ -/*! +/* \fn bool Qt3DCore::QCircularBuffer::const_iterator::operator>=(const const_iterator& other) const Returns \c true if the item pointed to by this iterator occurs after, or at the same position as the item pointed to by the \a other iterator. */ -/*! \fn Qt3DCore::QCircularBuffer::const_iterator &Qt3DCore::QCircularBuffer::const_iterator::operator++() +/* \fn Qt3DCore::QCircularBuffer::const_iterator &Qt3DCore::QCircularBuffer::const_iterator::operator++() The prefix ++ operator (\c{++it}) advances the iterator to the next item in the circular buffer and returns an iterator to the new current @@ -1524,7 +1524,7 @@ \sa operator--() */ -/*! \fn Qt3DCore::QCircularBuffer::const_iterator Qt3DCore::QCircularBuffer::const_iterator::operator++(int) +/* \fn Qt3DCore::QCircularBuffer::const_iterator Qt3DCore::QCircularBuffer::const_iterator::operator++(int) \overload @@ -1533,7 +1533,7 @@ current item. */ -/*! \fn Qt3DCore::QCircularBuffer::const_iterator &Qt3DCore::QCircularBuffer::const_iterator::operator--() +/* \fn Qt3DCore::QCircularBuffer::const_iterator &Qt3DCore::QCircularBuffer::const_iterator::operator--() The prefix -- operator (\c{--it}) makes the preceding item the current and returns an iterator to the new current item. @@ -1543,7 +1543,7 @@ \sa operator++() */ -/*! \fn Qt3DCore::QCircularBuffer::const_iterator Qt3DCore::QCircularBuffer::const_iterator::operator--(int) +/* \fn Qt3DCore::QCircularBuffer::const_iterator Qt3DCore::QCircularBuffer::const_iterator::operator--(int) \overload @@ -1551,7 +1551,7 @@ current and returns an iterator to the previously current item. */ -/*! \fn Qt3DCore::QCircularBuffer::const_iterator &Qt3DCore::QCircularBuffer::const_iterator::operator+=(int j) +/* \fn Qt3DCore::QCircularBuffer::const_iterator &Qt3DCore::QCircularBuffer::const_iterator::operator+=(int j) Advances the iterator by \a j items. (If \a j is negative, the iterator goes backward.) @@ -1559,7 +1559,7 @@ \sa operator-=(), operator+() */ -/*! \fn Qt3DCore::QCircularBuffer::const_iterator &Qt3DCore::QCircularBuffer::const_iterator::operator-=(int j) +/* \fn Qt3DCore::QCircularBuffer::const_iterator &Qt3DCore::QCircularBuffer::const_iterator::operator-=(int j) Makes the iterator go back by \a j items. (If \a j is negative, the iterator goes forward.) @@ -1567,7 +1567,7 @@ \sa operator+=(), operator-() */ -/*! \fn Qt3DCore::QCircularBuffer::const_iterator Qt3DCore::QCircularBuffer::const_iterator::operator+(int j) const +/* \fn Qt3DCore::QCircularBuffer::const_iterator Qt3DCore::QCircularBuffer::const_iterator::operator+(int j) const Returns an iterator to the item at \a j positions forward from this iterator. (If \a j is negative, the iterator goes backward.) @@ -1575,7 +1575,7 @@ \sa operator-(), operator+=() */ -/*! \fn Qt3DCore::QCircularBuffer::const_iterator Qt3DCore::QCircularBuffer::const_iterator::operator-(int j) const +/* \fn Qt3DCore::QCircularBuffer::const_iterator Qt3DCore::QCircularBuffer::const_iterator::operator-(int j) const Returns an iterator to the item at \a j positions backward from this iterator. (If \a j is negative, the iterator goes forward.) @@ -1583,7 +1583,7 @@ \sa operator+(), operator-=() */ -/*! \fn int Qt3DCore::QCircularBuffer::const_iterator::operator-(const_iterator other) const +/* \fn int Qt3DCore::QCircularBuffer::const_iterator::operator-(const_iterator other) const Returns the number of items between the item pointed to by \a other and the item pointed to by this iterator. diff --git a/src/doc/src/qt3d-index.qdoc b/src/doc/src/qt3d-index.qdoc index 41006a059..3c2630c22 100644 --- a/src/doc/src/qt3d-index.qdoc +++ b/src/doc/src/qt3d-index.qdoc @@ -50,7 +50,7 @@ \annotatedlist qt3d-modules - For Qt Quick applications, Qt3D provides the following QML modules: + For Qt Quick applications, Qt 3D provides the following QML modules: \annotatedlist qt3d-qmlmodules @@ -61,7 +61,7 @@ \l qmake \c .pro file: \badcode - QT += 3dcore 3drender 3dinput 3dcollision 3dlogic + QT += 3dcore 3drender 3dinput 3dlogic \endcode To include the definitions of the modules' classes, use the following @@ -71,21 +71,20 @@ #include <Qt3DCore> #include <Qt3DRender> #include <Qt3DInput> - #include <Qt3DCollision> #include <Qt3DLogic> \endcode A Qt Quick application requires also additional dependencies: \badcode - QT += 3dcore 3drenderer 3dinput 3dcollision qml quick 3dquick + QT += 3dcore 3drenderer 3dinput qml quick 3dquick \endcode \section1 Overview - The high level design and motivation for Qt3D is described in the \l {Qt 3D - Overview}. The Qt 3D Renderer aspect offers support for data-driven - configuration as described in \l {Qt 3D Renderer Framegraph}. + The high level design and motivation for Qt 3D is described in the \l {Qt 3D + Overview}. The Qt 3D Render aspect offers support for data-driven + configuration as described in \l {Qt 3D Render Framegraph}. \section1 Reference \list diff --git a/src/doc/src/qt3d-module.qdoc b/src/doc/src/qt3d-module.qdoc index 8fdcbcd62..f6dc6934d 100644 --- a/src/doc/src/qt3d-module.qdoc +++ b/src/doc/src/qt3d-module.qdoc @@ -66,9 +66,6 @@ \section2 Qt 3D Core Module \generatelist {classesbymodule Qt3DCore} - \section2 Qt 3D Collision Module - \generatelist {classesbymodule Qt3DCollision} - \section2 Qt 3D Input Module \generatelist {classesbymodule Qt3DInput} @@ -107,7 +104,6 @@ following import statements: \badcode - import Qt3D.Collision 2.0 import Qt3D.Render 2.0 import Qt3D.Input 2.0 import Qt3D.Logic 2.0 @@ -118,9 +114,6 @@ \section2 Qt 3D Core Module \generatelist {qmltypesbymodule Qt3D.Core} - \section2 Qt 3D Collision Module - \generatelist {qmltypesbymodule Qt3D.Collision} - \section2 Qt 3D Input Module \generatelist {qmltypesbymodule Qt3D.Input} diff --git a/src/doc/src/qt3d-overview.qdoc b/src/doc/src/qt3d-overview.qdoc index 986f27910..7e9c7b4c3 100644 --- a/src/doc/src/qt3d-overview.qdoc +++ b/src/doc/src/qt3d-overview.qdoc @@ -45,7 +45,7 @@ applications. Qt 3D provides a fully configurable renderer that enables developers to - quickly implement any rendering pipeline that they need. Further, Qt3D + quickly implement any rendering pipeline that they need. Further, Qt 3D provides a generic framework for near-realtime simulations beyond rendering. Qt 3D is cleanly separated into a core and any number of \e aspects that can @@ -160,13 +160,13 @@ and the fragment's depth can be compared with the result of the sampling. If the fragment is further away, then it is in shadow; otherwise it is lit. - For example code, see the \l {Qt3D: Shadow Map QML Example}. + For example code, see the \l {Qt 3D: Shadow Map QML Example}. \section2 Instanced Rendering \e Instancing is a way of getting the GPU to draw many copies (instances) of a base object that varies in some way for each copy. Often, in position, - orientation, color, material properties, scale, and so on. Qt3D provides an + orientation, color, material properties, scale, and so on. Qt 3D provides an API similar to the Qt Quick \l Repeater element. In this case, the delegate is the base object and the model provides the per-instance data. So whereas an entity with a \l Mesh component attached eventually gets transformed into @@ -186,7 +186,7 @@ To combine support for both C++ and QML APIs with having a fully configurable renderer, the concept of a \e framegraph was introduced. While a \e scenegraph is a data-driven description of \e what to render, a \l - {Qt 3D Renderer Framegraph}{framegraph} is a data-driven description of \e + {Qt 3D Render Framegraph}{framegraph} is a data-driven description of \e how to render it. A framegraph enables developers to choose between a simple forward renderer, @@ -199,7 +199,7 @@ \section1 3D Extensions - Beyond the essentials of displaying 3D content on the screen, Qt3D is + Beyond the essentials of displaying 3D content on the screen, Qt 3D is extensible and flexible enough to act as a host for following types of extensions related to the 3D objects: @@ -314,7 +314,7 @@ ignores it. Qt 3D builds custom entities by aggregating components that provide - additional capabilities. The Qt3D engine uses aspects to process and + additional capabilities. The Qt 3D engine uses aspects to process and update entities with specific components. For example, a physics aspect looks for entities that have some kind of diff --git a/src/doc/src/qt3dcollision-module.qdoc b/src/doc/src/qt3dcollision-module.qdoc deleted file mode 100644 index 9f51d7dba..000000000 --- a/src/doc/src/qt3dcollision-module.qdoc +++ /dev/null @@ -1,74 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the documentation of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:FDL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU Free Documentation License Usage -** Alternatively, this file may be used under the terms of the GNU Free -** Documentation License version 1.3 as published by the Free Software -** Foundation and appearing in the file included in the packaging of -** this file. Please review the following information to ensure -** the GNU Free Documentation License version 1.3 requirements -** will be met: https://www.gnu.org/licenses/fdl-1.3.html. -** $QT_END_LICENSE$ -** -****************************************************************************/ - -/*! - \module Qt3DCollision - \title Qt 3D Collision C++ Classes - \brief The Qt 3D Collision module enables collision detection. - \ingroup modules - \ingroup qt3d-modules - \qtvariable 3dcollision - - To use classes from this module, add this directive into the C++ files: - - \code - #include <Qt3DCollision> - \endcode - - To link against the corresponding C++ libraries, add the following to your qmake project file: - - \badcode - QT += 3dcollision - \endcode - -*/ - -/*! - \namespace Qt3DCollision - \inmodule Qt3DCollision - \ingroup qt3d-namespaces - - \brief Contains classes that enable collision detection. -*/ - -/*! - \qmlmodule Qt3D.Collision 2.0 - \title Qt 3D Collision QML Types - \ingroup qmlmodules - \ingroup qt3d-qmlmodules - - \brief Provides QML types to synchronize frames with the 3D backend. - - To import and use the module's QML types, use the following statement: - - \badcode - import Qt3D.Collision 2.0 - \endcode - - \section1 QML Types -*/ - diff --git a/src/doc/src/qt3drender-module.qdoc b/src/doc/src/qt3drender-module.qdoc index 734280e5d..6599c2e11 100644 --- a/src/doc/src/qt3drender-module.qdoc +++ b/src/doc/src/qt3drender-module.qdoc @@ -40,14 +40,15 @@ /*! \module Qt3DRender \title Qt 3D Render C++ Classes - \brief The Qt 3D Render module contains functionality to support 2D and 3D rendering using Qt3D. + \brief The Qt 3D Render module contains functionality to support 2D and 3D + rendering using Qt 3D. \ingroup modules \ingroup qt3d-modules \qtvariable 3drender The Qt 3D Render module provides an aspect, components, and other supporting types necessary - to implement 2D and 3D rendering as part of the Qt3D framework. + to implement 2D and 3D rendering as part of the Qt 3D framework. To use classes from this module, add this directive into the C++ files: @@ -66,7 +67,7 @@ \section1 Overview The Qt 3D Render aspect offers support for data-driven configuration as described - in \l {Qt3D Render Framegraph}. + in \l {Qt 3D Render Framegraph}. \section1 Reference \list diff --git a/src/input/backend/keyboardcontroller_p.h b/src/input/backend/keyboardcontroller_p.h index f874c4afd..7803a6099 100644 --- a/src/input/backend/keyboardcontroller_p.h +++ b/src/input/backend/keyboardcontroller_p.h @@ -72,7 +72,7 @@ public: KeyboardController(); void updateFromPeer(Qt3DCore::QNode *peer) Q_DECL_OVERRIDE; - void cleanup(); + void cleanup() Q_DECL_OVERRIDE; void requestFocusForInput(const Qt3DCore::QNodeId &inputId); void setInputHandler(InputHandler *handler); diff --git a/src/input/frontend/qabstractphysicaldevice.cpp b/src/input/frontend/qabstractphysicaldevice.cpp index f12f787b7..74f25d4fa 100644 --- a/src/input/frontend/qabstractphysicaldevice.cpp +++ b/src/input/frontend/qabstractphysicaldevice.cpp @@ -46,11 +46,28 @@ QT_BEGIN_NAMESPACE namespace Qt3DInput { +/*! \internal */ QAbstractPhysicalDevicePrivate::QAbstractPhysicalDevicePrivate() : m_axisSettings() { } +/*! + * \qmltype AbstractPhysicalDevice + * \instantiates Qt3DInput::QAbstractPhysicalDevice + * \inqmlmodule Qt3D.Input + * \since 5.6 + * \TODO + * + */ + +/*! + * \class Qt3DInput::QAbstractPhysicalDevice + * \inmodule Qt3DInput + * \since 5.6 + * \TODO + * + */ QAbstractPhysicalDevice::QAbstractPhysicalDevice(Qt3DCore::QNode *parent) : Qt3DCore::QNode(*new QAbstractPhysicalDevicePrivate, parent) { diff --git a/src/input/frontend/qaction.cpp b/src/input/frontend/qaction.cpp index c31030086..32aed0225 100644 --- a/src/input/frontend/qaction.cpp +++ b/src/input/frontend/qaction.cpp @@ -57,6 +57,22 @@ public: QVector<QAbstractActionInput *> m_inputs; }; +/*! + * \qmltype Action + * \inqmlmodule Qt3D.Input + * \since 5.6 + * \TODO + * + */ + +/*! + * \class Qt3DInput::QAction + * \inmodule Qt3DInput + * \since 5.6 + * \TODO + * + */ + QAction::QAction(Qt3DCore::QNode *parent) : Qt3DCore::QNode(*new QActionPrivate(), parent) { diff --git a/src/input/frontend/qactioninput.cpp b/src/input/frontend/qactioninput.cpp index 3a1a9cacb..6fd520669 100644 --- a/src/input/frontend/qactioninput.cpp +++ b/src/input/frontend/qactioninput.cpp @@ -57,6 +57,23 @@ public: QAbstractPhysicalDevice *m_sourceDevice; }; +/*! + * \qmltype ActionInput + * \instantiates Qt3DInput::QActionInput + * \inqmlmodule Qt3D.Input + * \since 5.5 + * \TODO + * + */ + +/*! + * \class Qt3DInput::QActionInput + * \inmodule Qt3DInput + * \since 5.5 + * \TODO + * + */ + QActionInput::QActionInput(Qt3DCore::QNode *parent) : Qt3DInput::QAbstractActionInput(*new QActionInputPrivate(), parent) { diff --git a/src/input/frontend/qaxis.cpp b/src/input/frontend/qaxis.cpp index 819a8ecca..b463f041e 100644 --- a/src/input/frontend/qaxis.cpp +++ b/src/input/frontend/qaxis.cpp @@ -56,6 +56,22 @@ public: QVector<QAxisInput *> m_inputs; }; +/*! + * \qmltype Axis + * \inqmlmodule Qt3D.Input + * \since 5.5 + * \TODO + * + */ + +/*! + * \class Qt3DInput::QAxis + * \inmodule Qt3DInput + * \since 5.5 + * \TODO + * + */ + QAxis::QAxis(Qt3DCore::QNode *parent) : Qt3DCore::QNode(*new QAxisPrivate(), parent) { diff --git a/src/input/frontend/qaxisactionhandler.cpp b/src/input/frontend/qaxisactionhandler.cpp index bc161e70a..584937f82 100644 --- a/src/input/frontend/qaxisactionhandler.cpp +++ b/src/input/frontend/qaxisactionhandler.cpp @@ -48,12 +48,30 @@ QT_BEGIN_NAMESPACE namespace Qt3DInput { +/*! \internal */ QAxisActionHandlerPrivate::QAxisActionHandlerPrivate() : Qt3DCore::QComponentPrivate() , m_logicalDevice(Q_NULLPTR) { } +/*! + * \qmltype AxisActionHandler + * \instantiates Qt3DInput::QAxisActionHandler + * \inqmlmodule Qt3D.Input + * \since 5.5 + * \TODO + * + */ + +/*! + * \class Qt3DInput::QAxisActionHandler + * \inmodule Qt3DInput + * \since 5.5 + * \TODO + * + */ + QAxisActionHandler::QAxisActionHandler(Qt3DCore::QNode *parent) : Qt3DCore::QComponent(*new QAxisActionHandlerPrivate, parent) { diff --git a/src/input/frontend/qaxisinput.cpp b/src/input/frontend/qaxisinput.cpp index ff9f6a611..6a81b22b0 100644 --- a/src/input/frontend/qaxisinput.cpp +++ b/src/input/frontend/qaxisinput.cpp @@ -61,7 +61,22 @@ public: int m_axis; }; - +/*! + * \qmltype AxisInput + * \instantiates Qt3DInput::QAxisInput + * \inqmlmodule Qt3D.Input + * \since 5.5 + * \TODO + * + */ + +/*! + * \class Qt3DInput::QAxisInput + * \inmodule Qt3DInput + * \since 5.5 + * \TODO + * + */ QAxisInput::QAxisInput(Qt3DCore::QNode *parent) : QNode(*new QAxisInputPrivate(), parent) { diff --git a/src/input/frontend/qaxissetting.cpp b/src/input/frontend/qaxissetting.cpp index e6b3ef704..61e36713b 100644 --- a/src/input/frontend/qaxissetting.cpp +++ b/src/input/frontend/qaxissetting.cpp @@ -59,6 +59,24 @@ public: bool m_filter; }; +/*! + * \qmltype AxisSetting + * \instantiates Qt3DInput::QAxisSetting + * \inqmlmodule Qt3D.Input + * \since 5.5 + * \TODO + * + */ + +/*! + * \class Qt3DInput::QAxisSetting + * \inmodule Qt3DInput + * \since 5.5 + * \TODO + * + */ + + QAxisSetting::QAxisSetting(Qt3DCore::QNode *parent) : QNode(*new QAxisSettingPrivate(), parent) { diff --git a/src/input/frontend/qinputaspect.cpp b/src/input/frontend/qinputaspect.cpp index 8fd9052fd..20b3e2a74 100644 --- a/src/input/frontend/qinputaspect.cpp +++ b/src/input/frontend/qinputaspect.cpp @@ -93,10 +93,6 @@ using namespace Qt3DCore; namespace Qt3DInput { -/*! - \class Qt3DInput::QInputAspectPrivate - \internal -*/ QInputAspectPrivate::QInputAspectPrivate() : QAbstractAspectPrivate() , m_inputHandler(new Input::InputHandler()) diff --git a/src/input/frontend/qkeyboardcontroller.cpp b/src/input/frontend/qkeyboardcontroller.cpp index 41001f076..1923c655c 100644 --- a/src/input/frontend/qkeyboardcontroller.cpp +++ b/src/input/frontend/qkeyboardcontroller.cpp @@ -49,10 +49,6 @@ using namespace Qt3DCore; namespace Qt3DInput { -/*! - \class Qt3DInput::QKeyboardControllerPrivate - \internal -*/ QKeyboardControllerPrivate::QKeyboardControllerPrivate() : QAbstractPhysicalDevicePrivate() { diff --git a/src/input/frontend/qkeyboardinput.cpp b/src/input/frontend/qkeyboardinput.cpp index a0b06217e..4b9e3fab5 100644 --- a/src/input/frontend/qkeyboardinput.cpp +++ b/src/input/frontend/qkeyboardinput.cpp @@ -48,10 +48,6 @@ using namespace Qt3DCore; namespace Qt3DInput { -/*! - \class Qt3DInput::QKeyboardInputPrivate - \internal -*/ QKeyboardInputPrivate::QKeyboardInputPrivate() : QComponentPrivate() , m_controller(Q_NULLPTR) diff --git a/src/input/frontend/qlogicaldevice.cpp b/src/input/frontend/qlogicaldevice.cpp index 088e45b0d..ef3c90fa7 100644 --- a/src/input/frontend/qlogicaldevice.cpp +++ b/src/input/frontend/qlogicaldevice.cpp @@ -58,6 +58,22 @@ public: QVector<QAxis *> m_axes; }; +/*! + * \qmltype LogicalDevice + * \inqmlmodule Qt3D.Input + * \since 5.5 + * \TODO + * + */ + +/*! + * \class Qt3DInput::QLogicalDevice + * \inmodule Qt3DInput + * \since 5.5 + * \TODO + * + */ + QLogicalDevice::QLogicalDevice(Qt3DCore::QNode *parent) : Qt3DCore::QNode(*new QLogicalDevicePrivate(), parent) { diff --git a/src/input/frontend/qmousecontroller.cpp b/src/input/frontend/qmousecontroller.cpp index caa9bb009..71899f303 100644 --- a/src/input/frontend/qmousecontroller.cpp +++ b/src/input/frontend/qmousecontroller.cpp @@ -46,12 +46,21 @@ QT_BEGIN_NAMESPACE namespace Qt3DInput { - +/*! \internal */ QMouseControllerPrivate::QMouseControllerPrivate() : QAbstractPhysicalDevicePrivate() , m_sensitivity(0.1f) { } +/*! + * \qmltype MouseController + * \instantiates Qt3DInput::QMouseController + * \inqmlmodule Qt3D.Input + * \since 5.5 + * \brief Delegates mouse events to the attached MouseInput objects. + * \TODO + * \sa MouseInput + */ /*! * \class Qt3DInput::QMouseController diff --git a/src/input/frontend/qmouseevent.cpp b/src/input/frontend/qmouseevent.cpp index 5cdc2b30d..cacfa9fda 100644 --- a/src/input/frontend/qmouseevent.cpp +++ b/src/input/frontend/qmouseevent.cpp @@ -51,6 +51,20 @@ namespace Qt3DInput { // These can always be added in follow up commits once the input API takes shape /*! + * \qmltype MouseEvent + * \instantiates Qt3DInput::QMouseEvent + * \inqmlmodule Qt3D.Input + * \since 5.5 + * \brief Provides parameters that describe a mouse event. + * + * Mouse events occur when a mouse button is pressed and the ray + * traversing the view, originating from the mouse position intersects with one + * or more elements of the scene. + * + * \sa KeyEvent, WheelEvent, MouseInput + */ + +/*! * \class Qt3DInput::QMouseEvent * \inmodule Qt3DInput * @@ -161,6 +175,18 @@ QMouseEvent::Modifiers QMouseEvent::modifier() const } } +/*! + * \qmltype WheelEvent + * \instantiates Qt3DInput::QWheelEvent + * \inqmlmodule Qt3D.Input + * \since 5.5 + * \brief Contains parameters that describe a mouse wheel event. + * + * Mouse wheel events occur when the mouse wheel is rotated. + * + * \sa KeyEvent, MouseEvent, MouseInput + * + */ /*! * \class Qt3DInput::QWheelEvent diff --git a/src/input/frontend/qmouseinput.cpp b/src/input/frontend/qmouseinput.cpp index d05efd875..2de9d3f08 100644 --- a/src/input/frontend/qmouseinput.cpp +++ b/src/input/frontend/qmouseinput.cpp @@ -48,7 +48,7 @@ QT_BEGIN_NAMESPACE using namespace Qt3DCore; namespace Qt3DInput { - +/*! \internal */ QMouseInputPrivate::QMouseInputPrivate() : QComponentPrivate() , m_controller(Q_NULLPTR) @@ -58,10 +58,21 @@ QMouseInputPrivate::QMouseInputPrivate() } /*! + * \qmltype MouseInput + * \instantiates Qt3DInput::QMouseInput + * \inqmlmodule Qt3D.Input + * \since 5.5 + * \brief Provides mouse event notification + * + * \TODO + * \sa MouseController + */ + +/*! * \class Qt3DInput::QMouseInput * \inmodule Qt3DInput * - * \brief Provides a mean of being notified about mouse events when attached to + * \brief Provides a means of being notified about mouse events when attached to * a QMouseController instance. * * \since 5.5 diff --git a/src/logic/qlogicaspect.cpp b/src/logic/qlogicaspect.cpp index b1a3bb23d..fef964b56 100644 --- a/src/logic/qlogicaspect.cpp +++ b/src/logic/qlogicaspect.cpp @@ -58,10 +58,6 @@ using namespace Qt3DCore; namespace Qt3DLogic { -/*! - \class Qt3DLogic::QLogicAspectPrivate - \internal -*/ QLogicAspectPrivate::QLogicAspectPrivate() : QAbstractAspectPrivate() , m_time(0) diff --git a/src/logic/qlogiccomponent.cpp b/src/logic/qlogiccomponent.cpp index 3c60b68de..2ea9b03a1 100644 --- a/src/logic/qlogiccomponent.cpp +++ b/src/logic/qlogiccomponent.cpp @@ -44,10 +44,6 @@ QT_BEGIN_NAMESPACE namespace Qt3DLogic { -/*! - \class Qt3DLogic::QLogicComponentPrivate - \internal -*/ QLogicComponentPrivate::QLogicComponentPrivate() : QComponentPrivate() { diff --git a/src/quick3d/quick3d/items/quick3dentityloader.cpp b/src/quick3d/quick3d/items/quick3dentityloader.cpp index 501024bbd..eb403ff6d 100644 --- a/src/quick3d/quick3d/items/quick3dentityloader.cpp +++ b/src/quick3d/quick3d/items/quick3dentityloader.cpp @@ -146,10 +146,6 @@ void Quick3DEntityLoader::copy(const QNode *ref) d_func()->m_entity->setParent(this); } -/*! - \class Qt3DCore::Quick::Quick3DEntityLoaderPrivate - \internal -*/ Quick3DEntityLoaderPrivate::Quick3DEntityLoaderPrivate() : QEntityPrivate(), m_incubator(Q_NULLPTR), diff --git a/src/quick3d/quick3d/items/quick3dnodeinstantiator.cpp b/src/quick3d/quick3d/items/quick3dnodeinstantiator.cpp index 213446a70..32a82ad98 100644 --- a/src/quick3d/quick3d/items/quick3dnodeinstantiator.cpp +++ b/src/quick3d/quick3d/items/quick3dnodeinstantiator.cpp @@ -81,7 +81,6 @@ public: }; /*! - \class Qt3DCore::Quick::Quick3DNodeInstantiatorPrivate \internal */ Quick3DNodeInstantiatorPrivate::Quick3DNodeInstantiatorPrivate() diff --git a/src/quick3d/quick3d/qqmlaspectengine.cpp b/src/quick3d/quick3d/qqmlaspectengine.cpp index a791877ca..931096bb6 100644 --- a/src/quick3d/quick3d/qqmlaspectengine.cpp +++ b/src/quick3d/quick3d/qqmlaspectengine.cpp @@ -48,10 +48,6 @@ QT_BEGIN_NAMESPACE namespace Qt3DCore { namespace Quick { -/*! - \class Qt3DCore::Quick::QQmlAspectEnginePrivate - \internal -*/ QQmlAspectEnginePrivate::QQmlAspectEnginePrivate() : QObjectPrivate() , m_qmlEngine(new QQmlEngine()) diff --git a/src/quick3d/quick3d/qquaternionanimation.cpp b/src/quick3d/quick3d/qquaternionanimation.cpp index b049381d3..25cad523b 100644 --- a/src/quick3d/quick3d/qquaternionanimation.cpp +++ b/src/quick3d/quick3d/qquaternionanimation.cpp @@ -44,9 +44,8 @@ QT_BEGIN_NAMESPACE /*! \qmltype QuaternionAnimation - \instantiates QQuaternionAnimation \inherits PropertyAnimation - \inqmlmodule Qt3D + \inqmlmodule Qt3D.Core \since 5.6 \brief A PropertyAnimation for quaternions. diff --git a/src/render/defaults/qdiffusemapmaterial.cpp b/src/render/defaults/qdiffusemapmaterial.cpp index 532cb7092..22937ce3b 100644 --- a/src/render/defaults/qdiffusemapmaterial.cpp +++ b/src/render/defaults/qdiffusemapmaterial.cpp @@ -56,10 +56,6 @@ QT_BEGIN_NAMESPACE namespace Qt3DRender { -/*! - \class Qt3DRender::QDiffuseMapMaterialPrivate - \internal -*/ QDiffuseMapMaterialPrivate::QDiffuseMapMaterialPrivate() : QMaterialPrivate() , m_diffuseMapEffect(new QEffect()) diff --git a/src/render/defaults/qdiffusespecularmapmaterial.cpp b/src/render/defaults/qdiffusespecularmapmaterial.cpp index b401239a3..2a24d417d 100644 --- a/src/render/defaults/qdiffusespecularmapmaterial.cpp +++ b/src/render/defaults/qdiffusespecularmapmaterial.cpp @@ -56,10 +56,6 @@ QT_BEGIN_NAMESPACE namespace Qt3DRender { -/*! - \class Qt3DRender::QDiffuseSpecularMapMaterialPrivate - \internal -*/ QDiffuseSpecularMapMaterialPrivate::QDiffuseSpecularMapMaterialPrivate() : QMaterialPrivate() , m_diffuseSpecularMapEffect(new QEffect()) diff --git a/src/render/defaults/qforwardrenderer.cpp b/src/render/defaults/qforwardrenderer.cpp index 934456631..15dbdbf26 100644 --- a/src/render/defaults/qforwardrenderer.cpp +++ b/src/render/defaults/qforwardrenderer.cpp @@ -51,10 +51,6 @@ QT_BEGIN_NAMESPACE namespace Qt3DRender { -/*! - \class Qt3DRender::QForwardRendererPrivate - \internal -*/ QForwardRendererPrivate::QForwardRendererPrivate() : QTechniqueFilterPrivate() , m_surfaceSelector(new QRenderSurfaceSelector) diff --git a/src/render/defaults/qgoochmaterial.cpp b/src/render/defaults/qgoochmaterial.cpp index 027544c3d..ac5c44eb6 100644 --- a/src/render/defaults/qgoochmaterial.cpp +++ b/src/render/defaults/qgoochmaterial.cpp @@ -52,10 +52,6 @@ QT_BEGIN_NAMESPACE namespace Qt3DRender { -/*! - \class Qt3DRender::QGoochMaterialPrivate - \internal -*/ QGoochMaterialPrivate::QGoochMaterialPrivate() : QMaterialPrivate() , m_effect(new QEffect) diff --git a/src/render/defaults/qnormaldiffusemapalphamaterial.cpp b/src/render/defaults/qnormaldiffusemapalphamaterial.cpp index bca337627..075c55d5d 100644 --- a/src/render/defaults/qnormaldiffusemapalphamaterial.cpp +++ b/src/render/defaults/qnormaldiffusemapalphamaterial.cpp @@ -59,10 +59,6 @@ QT_BEGIN_NAMESPACE namespace Qt3DRender { -/*! - \class Qt3DRender::QNormalDiffuseMapAlphaMaterialPrivate - \internal -*/ QNormalDiffuseMapAlphaMaterialPrivate::QNormalDiffuseMapAlphaMaterialPrivate() : QNormalDiffuseMapMaterialPrivate() , m_alphaCoverage(new QAlphaCoverage()) diff --git a/src/render/defaults/qnormaldiffusemapmaterial.cpp b/src/render/defaults/qnormaldiffusemapmaterial.cpp index a299d58c5..1af69b29a 100644 --- a/src/render/defaults/qnormaldiffusemapmaterial.cpp +++ b/src/render/defaults/qnormaldiffusemapmaterial.cpp @@ -56,10 +56,6 @@ QT_BEGIN_NAMESPACE namespace Qt3DRender { -/*! - \class Qt3DRender::QNormalDiffuseMapMaterialPrivate - \internal -*/ QNormalDiffuseMapMaterialPrivate::QNormalDiffuseMapMaterialPrivate() : QMaterialPrivate() , m_normalDiffuseEffect(new QEffect()) diff --git a/src/render/defaults/qnormaldiffusespecularmapmaterial.cpp b/src/render/defaults/qnormaldiffusespecularmapmaterial.cpp index e128352a5..99fed1f98 100644 --- a/src/render/defaults/qnormaldiffusespecularmapmaterial.cpp +++ b/src/render/defaults/qnormaldiffusespecularmapmaterial.cpp @@ -56,10 +56,6 @@ QT_BEGIN_NAMESPACE namespace Qt3DRender { -/*! - \class Qt3DRender::QNormalDiffuseSpecularMapMaterialPrivate - \internal -*/ QNormalDiffuseSpecularMapMaterialPrivate::QNormalDiffuseSpecularMapMaterialPrivate() : QMaterialPrivate() , m_normalDiffuseSpecularEffect(new QEffect()) diff --git a/src/render/defaults/qpervertexcolormaterial.cpp b/src/render/defaults/qpervertexcolormaterial.cpp index 7f6a88d36..caba25882 100644 --- a/src/render/defaults/qpervertexcolormaterial.cpp +++ b/src/render/defaults/qpervertexcolormaterial.cpp @@ -55,10 +55,6 @@ QT_BEGIN_NAMESPACE namespace Qt3DRender { -/*! - \class Qt3DRender::QPerVertexColorMaterialPrivate - \internal -*/ QPerVertexColorMaterialPrivate::QPerVertexColorMaterialPrivate() : QMaterialPrivate() , m_vertexEffect(new QEffect()) diff --git a/src/render/defaults/qphongalphamaterial.cpp b/src/render/defaults/qphongalphamaterial.cpp index 5dc3c7b4e..78480f53b 100644 --- a/src/render/defaults/qphongalphamaterial.cpp +++ b/src/render/defaults/qphongalphamaterial.cpp @@ -58,10 +58,6 @@ QT_BEGIN_NAMESPACE namespace Qt3DRender { -/*! - \class Qt3DRender::QPhongAlphaMaterialPrivate - \internal -*/ QPhongAlphaMaterialPrivate::QPhongAlphaMaterialPrivate() : QMaterialPrivate() , m_phongEffect(new QEffect()) @@ -200,8 +196,7 @@ void QPhongAlphaMaterialPrivate::handleAlphaChanged(const QVariant &var) \class Qt3DRender::QPhongAlphaMaterial \brief The QPhongAlphaMaterial class provides a default implementation of - the phong lighting effect with alpha -. + the phong lighting effect with alpha. \inmodule Qt3DRenderer \since 5.5 @@ -221,7 +216,7 @@ void QPhongAlphaMaterialPrivate::handleAlphaChanged(const QVariant &var) */ /*! - \fn Qt3DRender::QPhongAlphaMaterial::QPhongAlphaMaterial(QNode *parent) + \fn Qt3DRender::QPhongAlphaMaterial::QPhongAlphaMaterial(Qt3DCore::QNode *parent) Constructs a new QPhongAlphaMaterial instance with parent object \a parent. */ @@ -233,8 +228,6 @@ QPhongAlphaMaterial::QPhongAlphaMaterial(QNode *parent) } /*! - \fn Qt3DRender::QPhongAlphaMaterial::~QPhongAlphaMaterial() - Destroys the QPhongAlphaMaterial. */ QPhongAlphaMaterial::~QPhongAlphaMaterial() @@ -264,7 +257,7 @@ QColor QPhongAlphaMaterial::diffuse() const } /*! - \property QColor Qt3DRender::QPhongAlphaMaterial::specular + \property Qt3DRender::QPhongAlphaMaterial::specular Holds the specular color. */ diff --git a/src/render/defaults/qphongmaterial.cpp b/src/render/defaults/qphongmaterial.cpp index f5c4cd0ca..3e70f707e 100644 --- a/src/render/defaults/qphongmaterial.cpp +++ b/src/render/defaults/qphongmaterial.cpp @@ -55,10 +55,6 @@ QT_BEGIN_NAMESPACE namespace Qt3DRender { -/*! - \class Qt3DRender::QPhongMaterialPrivate - \internal -*/ QPhongMaterialPrivate::QPhongMaterialPrivate() : QMaterialPrivate() , m_phongEffect(new QEffect()) diff --git a/src/render/defaults/qskyboxentity.cpp b/src/render/defaults/qskyboxentity.cpp index eb71f3f95..e14651787 100644 --- a/src/render/defaults/qskyboxentity.cpp +++ b/src/render/defaults/qskyboxentity.cpp @@ -60,10 +60,6 @@ using namespace Qt3DCore; namespace Qt3DRender { -/*! - * \class Qt3DRender::QSkyboxEntityPrivate - * \internal - */ QSkyboxEntityPrivate::QSkyboxEntityPrivate() : QEntityPrivate() , m_effect(new QEffect()) diff --git a/src/render/framegraph/qcameraselector.cpp b/src/render/framegraph/qcameraselector.cpp index 813ec2663..4dbea3c89 100644 --- a/src/render/framegraph/qcameraselector.cpp +++ b/src/render/framegraph/qcameraselector.cpp @@ -58,10 +58,6 @@ QCameraSelector::QCameraSelector(QCameraSelectorPrivate &dd, QNode *parent) { } -/*! - \class Qt3DRender::QCameraSelectorPrivate - \internal -*/ QCameraSelectorPrivate::QCameraSelectorPrivate() : QFrameGraphNodePrivate() , m_camera(Q_NULLPTR) diff --git a/src/render/framegraph/qclearbuffer.cpp b/src/render/framegraph/qclearbuffer.cpp index bdc4c1737..80a6a418c 100644 --- a/src/render/framegraph/qclearbuffer.cpp +++ b/src/render/framegraph/qclearbuffer.cpp @@ -45,10 +45,6 @@ QT_BEGIN_NAMESPACE namespace Qt3DRender { -/*! - \class Qt3DRender::QClearBufferPrivate - \internal -*/ QClearBufferPrivate::QClearBufferPrivate() : QFrameGraphNodePrivate() , m_buffersType(QClearBuffer::None) diff --git a/src/render/framegraph/qframegraph.cpp b/src/render/framegraph/qframegraph.cpp index 57c70c746..9b18b2cd4 100644 --- a/src/render/framegraph/qframegraph.cpp +++ b/src/render/framegraph/qframegraph.cpp @@ -47,10 +47,6 @@ QT_BEGIN_NAMESPACE namespace Qt3DRender { -/*! - \class Qt3DRender::QFrameGraphPrivate - \internal -*/ QFrameGraphPrivate::QFrameGraphPrivate() : QComponentPrivate() , m_activeFrameGraph(Q_NULLPTR) diff --git a/src/render/framegraph/qframegraphnode.cpp b/src/render/framegraph/qframegraphnode.cpp index 836c5972c..d78040149 100644 --- a/src/render/framegraph/qframegraphnode.cpp +++ b/src/render/framegraph/qframegraphnode.cpp @@ -44,10 +44,6 @@ QT_BEGIN_NAMESPACE namespace Qt3DRender { -/*! - \class Qt3DRender::QFrameGraphNodePrivate - \internal -*/ QFrameGraphNodePrivate::QFrameGraphNodePrivate() : QNodePrivate() , m_enabled(true) diff --git a/src/render/framegraph/qframegraphselector.cpp b/src/render/framegraph/qframegraphselector.cpp index 9d7e58869..e5a4e463a 100644 --- a/src/render/framegraph/qframegraphselector.cpp +++ b/src/render/framegraph/qframegraphselector.cpp @@ -44,10 +44,6 @@ QT_BEGIN_NAMESPACE namespace Qt3DRender { -/*! - \class Qt3DRender::QFrameGraphSelectorPrivate - \internal -*/ QFrameGraphSelectorPrivate::QFrameGraphSelectorPrivate() : QFrameGraphNodePrivate() { diff --git a/src/render/framegraph/qlayerfilter.cpp b/src/render/framegraph/qlayerfilter.cpp index 196fb3289..b58922dab 100644 --- a/src/render/framegraph/qlayerfilter.cpp +++ b/src/render/framegraph/qlayerfilter.cpp @@ -45,10 +45,6 @@ QT_BEGIN_NAMESPACE namespace Qt3DRender { -/*! - \class Qt3DRender::QLayerFilterPrivate - \internal -*/ QLayerFilterPrivate::QLayerFilterPrivate() : QFrameGraphNodePrivate() { diff --git a/src/render/framegraph/qrenderpassfilter.cpp b/src/render/framegraph/qrenderpassfilter.cpp index 3069ea04d..1b58eee71 100644 --- a/src/render/framegraph/qrenderpassfilter.cpp +++ b/src/render/framegraph/qrenderpassfilter.cpp @@ -50,10 +50,6 @@ using namespace Qt3DCore; namespace Qt3DRender { -/*! - \class Qt3DRender::QRenderPassFilterPrivate - \internal -*/ QRenderPassFilter::QRenderPassFilter(QNode *parent) : QFrameGraphNode(*new QRenderPassFilterPrivate, parent) diff --git a/src/render/framegraph/qrendertargetselector.cpp b/src/render/framegraph/qrendertargetselector.cpp index 1607b9be8..d97064d3a 100644 --- a/src/render/framegraph/qrendertargetselector.cpp +++ b/src/render/framegraph/qrendertargetselector.cpp @@ -49,10 +49,6 @@ using namespace Qt3DCore; namespace Qt3DRender { -/*! - \class Qt3DRender::QRenderTargetSelectorPrivate - \internal -*/ QRenderTargetSelectorPrivate::QRenderTargetSelectorPrivate() : QFrameGraphNodePrivate() , m_target(Q_NULLPTR) diff --git a/src/render/framegraph/qsortcriterion.cpp b/src/render/framegraph/qsortcriterion.cpp index 06a2f89d8..c83647854 100644 --- a/src/render/framegraph/qsortcriterion.cpp +++ b/src/render/framegraph/qsortcriterion.cpp @@ -45,10 +45,6 @@ QT_BEGIN_NAMESPACE namespace Qt3DRender { -/*! - \class Qt3DRender::QSortCriterionPrivate - \internal -*/ QSortCriterionPrivate::QSortCriterionPrivate() : QNodePrivate() , m_sort(QSortCriterion::StateChangeCost) diff --git a/src/render/framegraph/qsortmethod.cpp b/src/render/framegraph/qsortmethod.cpp index bea446945..f0edc4f04 100644 --- a/src/render/framegraph/qsortmethod.cpp +++ b/src/render/framegraph/qsortmethod.cpp @@ -49,10 +49,6 @@ using namespace Qt3DCore; namespace Qt3DRender { -/*! - \class Qt3DRender::QSortMethodPrivate - \internal -*/ QSortMethodPrivate::QSortMethodPrivate() : QFrameGraphNodePrivate() { diff --git a/src/render/framegraph/qstateset.cpp b/src/render/framegraph/qstateset.cpp index bfe7d82fe..48ca6fcd1 100644 --- a/src/render/framegraph/qstateset.cpp +++ b/src/render/framegraph/qstateset.cpp @@ -49,10 +49,6 @@ using namespace Qt3DCore; namespace Qt3DRender { -/*! - \class Qt3DRender::QStateSetPrivate - \internal -*/ QStateSetPrivate::QStateSetPrivate() : QFrameGraphNodePrivate() { diff --git a/src/render/framegraph/qtechniquefilter.cpp b/src/render/framegraph/qtechniquefilter.cpp index 578ba2f0c..ea0c2bb87 100644 --- a/src/render/framegraph/qtechniquefilter.cpp +++ b/src/render/framegraph/qtechniquefilter.cpp @@ -50,10 +50,6 @@ using namespace Qt3DCore; namespace Qt3DRender { -/*! - \class Qt3DRender::QTechniqueFilterPrivate - \internal -*/ QTechniqueFilterPrivate::QTechniqueFilterPrivate() : QFrameGraphNodePrivate() { diff --git a/src/render/framegraph/qviewport.cpp b/src/render/framegraph/qviewport.cpp index 80297424f..8aee112e4 100644 --- a/src/render/framegraph/qviewport.cpp +++ b/src/render/framegraph/qviewport.cpp @@ -46,10 +46,6 @@ QT_BEGIN_NAMESPACE namespace Qt3DRender { -/*! - \class Qt3DRender::QViewportPrivate - \internal -*/ QViewportPrivate::QViewportPrivate() : QFrameGraphNodePrivate() , m_rect(QRectF(0.0f, 0.0f, 1.0f, 1.0f)) diff --git a/src/render/frontend/qcameralens.cpp b/src/render/frontend/qcameralens.cpp index 9587a266e..5946341c8 100644 --- a/src/render/frontend/qcameralens.cpp +++ b/src/render/frontend/qcameralens.cpp @@ -428,6 +428,7 @@ QMatrix4x4 QCameraLens::projectionMatrix() const \inqmlmodule Qt3D.Core \inherits Component3D \since 5.5 + \brief Provides the projection matrix that is used to define a Camera for 3D scene. */ /*! diff --git a/src/render/frontend/qlayer.cpp b/src/render/frontend/qlayer.cpp index 116e964d6..34bfdbddc 100644 --- a/src/render/frontend/qlayer.cpp +++ b/src/render/frontend/qlayer.cpp @@ -44,10 +44,6 @@ QT_BEGIN_NAMESPACE namespace Qt3DRender { -/*! - \class Qt3DRender::QLayerPrivate - \internal -*/ QLayerPrivate::QLayerPrivate() : QComponentPrivate() { diff --git a/src/render/frontend/qrenderaspect.cpp b/src/render/frontend/qrenderaspect.cpp index fb99d0640..184c3b433 100644 --- a/src/render/frontend/qrenderaspect.cpp +++ b/src/render/frontend/qrenderaspect.cpp @@ -149,10 +149,6 @@ using namespace Qt3DCore; namespace Qt3DRender { -/*! - \class Qt3DRender::QRenderAspectPrivate - \internal -*/ QRenderAspectPrivate::QRenderAspectPrivate(QRenderAspect::RenderType type) : QAbstractAspectPrivate() , m_nodeManagers(new Render::NodeManagers()) diff --git a/src/render/frontend/qrenderattachment.cpp b/src/render/frontend/qrenderattachment.cpp index 05d0682ee..7236d0e5a 100644 --- a/src/render/frontend/qrenderattachment.cpp +++ b/src/render/frontend/qrenderattachment.cpp @@ -45,10 +45,6 @@ QT_BEGIN_NAMESPACE namespace Qt3DRender { -/*! - \class Qt3DRender::QRenderAttachmentPrivate - \internal -*/ QRenderAttachmentPrivate::QRenderAttachmentPrivate() : QNodePrivate() , m_texture(Q_NULLPTR) diff --git a/src/render/frontend/qrendertarget.cpp b/src/render/frontend/qrendertarget.cpp index c92cfe9aa..f0091b449 100644 --- a/src/render/frontend/qrendertarget.cpp +++ b/src/render/frontend/qrendertarget.cpp @@ -48,10 +48,6 @@ using namespace Qt3DCore; namespace Qt3DRender { -/*! - \class Qt3DRender::QRenderTargetPrivate - \internal -*/ QRenderTargetPrivate::QRenderTargetPrivate() : QComponentPrivate() { diff --git a/src/render/geometry/qabstractattribute.cpp b/src/render/geometry/qabstractattribute.cpp index 9c37d69f9..579ca6aaa 100644 --- a/src/render/geometry/qabstractattribute.cpp +++ b/src/render/geometry/qabstractattribute.cpp @@ -47,10 +47,6 @@ QT_BEGIN_NAMESPACE namespace Qt3DRender { -/*! - \class Qt3DRender::QAbstractAttributePrivate - \internal -*/ QAbstractAttributePrivate::QAbstractAttributePrivate() : QNodePrivate() , m_buffer(Q_NULLPTR) @@ -65,16 +61,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) { @@ -87,11 +156,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) { @@ -105,6 +180,9 @@ QAbstractAttribute::QAbstractAttribute(QAbstractAttributePrivate &dd, QAbstractB d->m_byteStride = stride; } +/*! + * \internal + */ void QAbstractAttribute::copy(const QNode *ref) { QNode::copy(ref); @@ -120,54 +198,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 7f7c11654..7cabeee56 100644 --- a/src/render/geometry/qabstractbuffer.cpp +++ b/src/render/geometry/qabstractbuffer.cpp @@ -44,32 +44,61 @@ QT_BEGIN_NAMESPACE namespace Qt3DRender { -/*! - \class Qt3DCore::QAbstractBufferPrivate - \internal -*/ QAbstractBufferPrivate::QAbstractBufferPrivate() : QNodePrivate() { } +/*! + * \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); @@ -77,6 +106,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); @@ -87,6 +119,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 4d60e2981..cb62b379e 100644 --- a/src/render/geometry/qboundingvolumespecifier.cpp +++ b/src/render/geometry/qboundingvolumespecifier.cpp @@ -56,11 +56,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 a582c1f32..965af0994 100644 --- a/src/render/geometry/qbuffer.cpp +++ b/src/render/geometry/qbuffer.cpp @@ -48,10 +48,6 @@ using namespace Qt3DCore; namespace Qt3DRender { -/*! - \class Qt3DRender::QBufferPrivate - \internal -*/ QBufferPrivate::QBufferPrivate() : QAbstractBufferPrivate() , m_usage(QBuffer::StaticDraw) @@ -59,7 +55,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) { @@ -67,12 +146,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) { @@ -80,6 +164,9 @@ QBuffer::QBuffer(QBufferPrivate &dd, QBuffer::BufferType ty, QNode *parent) d->m_type = ty; } +/*! + * \internal + */ void QBuffer::copy(const QNode *ref) { QAbstractBuffer::copy(ref); @@ -90,6 +177,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); @@ -100,6 +190,11 @@ void QBuffer::sceneChangeEvent(const QSceneChangePtr &change) } } +/*! + * \property QBuffer::usage + * + * Holds the buffer usage. + */ QBuffer::UsageType QBuffer::usage() const { Q_D(const QBuffer); @@ -115,12 +210,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); @@ -135,6 +238,9 @@ void QBuffer::setBufferFunctor(const QBufferFunctorPtr &functor) } } +/*! + * \return the buffer functor. + */ QBufferFunctorPtr QBuffer::bufferFunctor() const { Q_D(const QBuffer); @@ -142,12 +248,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) { @@ -158,10 +266,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 6d38186b5..64c6f5b24 100644 --- a/src/render/geometry/qcuboidgeometry.cpp +++ b/src/render/geometry/qcuboidgeometry.cpp @@ -492,6 +492,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) { @@ -499,6 +582,9 @@ QCuboidGeometry::QCuboidGeometry(QNode *parent) d->init(); } +/*! + * \internal + */ QCuboidGeometry::QCuboidGeometry(QCuboidGeometryPrivate &dd, QNode *parent) : QGeometry(dd, parent) { @@ -506,11 +592,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); @@ -524,6 +616,9 @@ void QCuboidGeometry::updateIndices() } +/*! + * Updates vertices based on mesh resolutions. + */ void QCuboidGeometry::updateVertices() { Q_D(QCuboidGeometry); @@ -604,66 +699,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 692fbff12..bcde6efe9 100644 --- a/src/render/geometry/qcuboidmesh.cpp +++ b/src/render/geometry/qcuboidmesh.cpp @@ -44,6 +44,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) { @@ -57,6 +112,9 @@ QCuboidMesh::QCuboidMesh(QNode *parent) QGeometryRenderer::setGeometry(geometry); } +/*! + * Destroys this cube mesh. + */ QCuboidMesh::~QCuboidMesh() { QNode::cleanup(); @@ -67,6 +125,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(); @@ -77,6 +140,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(); @@ -87,6 +155,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(); @@ -97,6 +170,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(); @@ -107,6 +185,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(); @@ -117,6 +200,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 83321dbe4..4e8986863 100644 --- a/src/render/geometry/qcylindergeometry.cpp +++ b/src/render/geometry/qcylindergeometry.cpp @@ -345,6 +345,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) { @@ -352,6 +416,9 @@ QCylinderGeometry::QCylinderGeometry(QNode *parent) d->init(); } +/*! + * \internal + */ QCylinderGeometry::QCylinderGeometry(QCylinderGeometryPrivate &dd, QNode *parent) :QGeometry(dd, parent) { @@ -359,11 +426,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); @@ -375,6 +448,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); @@ -426,48 +502,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 97d728871..0bd528c9a 100644 --- a/src/render/geometry/qcylindermesh.cpp +++ b/src/render/geometry/qcylindermesh.cpp @@ -54,6 +54,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) { @@ -66,6 +109,9 @@ QCylinderMesh::QCylinderMesh(QNode *parent) QGeometryRenderer::setGeometry(geometry); } +/*! + * Destroys this cylinder mesh. + */ QCylinderMesh::~QCylinderMesh() { QNode::cleanup(); @@ -91,21 +137,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 b9e585f06..afce50db6 100644 --- a/src/render/geometry/qgeometry.cpp +++ b/src/render/geometry/qgeometry.cpp @@ -50,6 +50,9 @@ using namespace Qt3DCore; namespace Qt3DRender { +/*! + * \internal + */ void QGeometryPrivate::_q_boundingVolumeSpecifierChanged(QAbstractAttribute *) { if (m_changeArbiter != Q_NULLPTR) { @@ -63,6 +66,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) { @@ -71,6 +110,9 @@ QGeometry::QGeometry(QNode *parent) this, SLOT(_q_boundingVolumeSpecifierChanged(QAbstractAttribute *))); } +/*! + * \internal + */ QGeometry::QGeometry(QGeometryPrivate &dd, QNode *parent) : QNode(dd, parent) { @@ -79,11 +121,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); @@ -106,6 +154,9 @@ void QGeometry::addAttribute(QAbstractAttribute *attribute) } } +/*! + * Removes the given \a attribute from this geometry. + */ void QGeometry::removeAttribute(QAbstractAttribute *attribute) { Q_D(QGeometry); @@ -127,24 +178,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 ac8b8119a..413bc37eb 100644 --- a/src/render/geometry/qgeometryrenderer.cpp +++ b/src/render/geometry/qgeometryrenderer.cpp @@ -62,69 +62,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); @@ -230,6 +363,9 @@ void QGeometryRenderer::setPrimitiveType(QGeometryRenderer::PrimitiveType primit emit primitiveTypeChanged(primitiveType); } +/*! + * Sets the geometry \a functor. + */ void QGeometryRenderer::setGeometryFunctor(const QGeometryFunctorPtr &functor) { Q_D(QGeometryRenderer); @@ -244,6 +380,9 @@ void QGeometryRenderer::setGeometryFunctor(const QGeometryFunctorPtr &functor) } } +/*! + * \internal + */ void QGeometryRenderer::copy(const QNode *ref) { QComponent::copy(ref); @@ -259,6 +398,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 4cc6af8dc..edeac6f55 100644 --- a/src/render/geometry/qmesh.cpp +++ b/src/render/geometry/qmesh.cpp @@ -66,20 +66,50 @@ private: }; -/*! - \class Qt3DRender::QMeshPrivate - \internal -*/ QMeshPrivate::QMeshPrivate() : QGeometryRendererPrivate() { } +/*! + * \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(); @@ -102,6 +132,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); @@ -119,12 +154,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) @@ -132,6 +175,9 @@ MeshFunctor::MeshFunctor(const QUrl &sourcePath, const QString& subMesh) { } +/*! + * \internal + */ QGeometry *MeshFunctor::operator()() { if (m_sourcePath.isEmpty()) { @@ -156,6 +202,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 5d7dcfebc..8abf07a81 100644 --- a/src/render/geometry/qplanegeometry.cpp +++ b/src/render/geometry/qplanegeometry.cpp @@ -204,6 +204,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) { @@ -211,6 +275,9 @@ QPlaneGeometry::QPlaneGeometry(QPlaneGeometry::QNode *parent) d->init(); } +/*! + * \internal + */ QPlaneGeometry::QPlaneGeometry(QPlaneGeometryPrivate &dd, QNode *parent) : QGeometry(dd, parent) { @@ -218,11 +285,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); @@ -235,6 +308,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); @@ -276,48 +352,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 07d128f75..5efa33116 100644 --- a/src/render/geometry/qplanemesh.cpp +++ b/src/render/geometry/qplanemesh.cpp @@ -44,6 +44,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) { @@ -54,6 +91,9 @@ QPlaneMesh::QPlaneMesh(QNode *parent) QGeometryRenderer::setGeometry(geometry); } +/*! + * Destroys this plane mesh. + */ QPlaneMesh::~QPlaneMesh() { QNode::cleanup(); @@ -64,6 +104,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(); @@ -74,6 +119,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(); @@ -84,6 +134,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 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); diff --git a/src/render/geometry/qspheremesh.cpp b/src/render/geometry/qspheremesh.cpp index d6ca6cafa..a31370eb4 100644 --- a/src/render/geometry/qspheremesh.cpp +++ b/src/render/geometry/qspheremesh.cpp @@ -45,6 +45,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) { @@ -56,6 +99,9 @@ QSphereMesh::QSphereMesh(QNode *parent) QGeometryRenderer::setGeometry(geometry); } +/*! + * Destroys this sphere mesh. + */ QSphereMesh::~QSphereMesh() { QNode::cleanup(); @@ -81,21 +127,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 f66cd2dc8..af77e7e95 100644 --- a/src/render/geometry/qtorusgeometry.cpp +++ b/src/render/geometry/qtorusgeometry.cpp @@ -260,6 +260,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) { @@ -267,6 +331,9 @@ QTorusGeometry::QTorusGeometry(QNode *parent) d->init(); } +/*! + * \internal + */ QTorusGeometry::QTorusGeometry(QTorusGeometryPrivate &dd, QNode *parent) : QGeometry(dd, parent) { @@ -274,11 +341,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); @@ -289,6 +362,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); @@ -340,48 +416,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 1a06494b5..4d9161f7e 100644 --- a/src/render/geometry/qtorusmesh.cpp +++ b/src/render/geometry/qtorusmesh.cpp @@ -49,6 +49,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) { @@ -61,6 +104,9 @@ QTorusMesh::QTorusMesh(QNode *parent) QGeometryRenderer::setGeometry(geometry); } +/*! + * Destroys this torus mesh. + */ QTorusMesh::~QTorusMesh() { QGeometryRenderer::cleanup(); @@ -86,21 +132,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/io/qabstractsceneloader.cpp b/src/render/io/qabstractsceneloader.cpp index 7f5c61e1b..213486864 100644 --- a/src/render/io/qabstractsceneloader.cpp +++ b/src/render/io/qabstractsceneloader.cpp @@ -47,10 +47,6 @@ QT_BEGIN_NAMESPACE namespace Qt3DRender { -/*! - \class Qt3DRender::QAbstractSceneLoaderPrivate - \internal -*/ QAbstractSceneLoaderPrivate::QAbstractSceneLoaderPrivate() : QComponentPrivate() , m_status(QAbstractSceneLoader::Loading) diff --git a/src/render/lights/qdirectionallight.cpp b/src/render/lights/qdirectionallight.cpp index 22b3421dd..b85ff5ac4 100644 --- a/src/render/lights/qdirectionallight.cpp +++ b/src/render/lights/qdirectionallight.cpp @@ -64,10 +64,6 @@ namespace Qt3DRender { * \endcode */ -/*! - \class Qt3DRender::QDirectionalLightPrivate - \internal -*/ QDirectionalLightPrivate::QDirectionalLightPrivate() : QLightPrivate(QLight::DirectionalLight) , m_direction(0.0f, -1.0f, 0.0f) diff --git a/src/render/lights/qlight.cpp b/src/render/lights/qlight.cpp index edba0b4b8..cd68d843c 100644 --- a/src/render/lights/qlight.cpp +++ b/src/render/lights/qlight.cpp @@ -48,16 +48,12 @@ namespace Qt3DRender /*! * \qmltype Light * \inqmlmodule Qt3D.Render - * \instantiates QLight + * \instantiates Qt3DRender::QLight * \brief Encapsulate a QLight object in a Qt 3D scene. * \since 5.6 */ -/*! - \class Qt3DRender::QLightPrivate - \internal -*/ QLightPrivate::QLightPrivate(QLight::Type type) : m_type(type) , m_color(QColor(255, 255, 255)) diff --git a/src/render/lights/qpointlight.cpp b/src/render/lights/qpointlight.cpp index ced3ed681..68db07ecc 100644 --- a/src/render/lights/qpointlight.cpp +++ b/src/render/lights/qpointlight.cpp @@ -61,10 +61,6 @@ namespace Qt3DRender { \endcode */ -/*! - \class Qt3DRender::QPointLightPrivate - \internal -*/ QPointLightPrivate::QPointLightPrivate(QLight::Type type) : QLightPrivate(type) , m_attenuation(0.0f, 0.0f, 0.002f) diff --git a/src/render/lights/qspotlight.cpp b/src/render/lights/qspotlight.cpp index 12778c90b..af245d2da 100644 --- a/src/render/lights/qspotlight.cpp +++ b/src/render/lights/qspotlight.cpp @@ -65,10 +65,6 @@ namespace Qt3DRender { \endcode */ -/*! - \class Qt3DRender::QSpotLightPrivate - \internal -*/ QSpotLightPrivate::QSpotLightPrivate() : QPointLightPrivate(QLight::SpotLight) , m_cutOffAngle(45.0f) diff --git a/src/render/materialsystem/qannotation.cpp b/src/render/materialsystem/qannotation.cpp index 38380ae33..e3ffd148b 100644 --- a/src/render/materialsystem/qannotation.cpp +++ b/src/render/materialsystem/qannotation.cpp @@ -47,10 +47,6 @@ QT_BEGIN_NAMESPACE namespace Qt3DRender { -/*! - \class Qt3DRender::QAnnotationPrivate - \internal -*/ QAnnotationPrivate::QAnnotationPrivate() : QNodePrivate() { diff --git a/src/render/materialsystem/qeffect.cpp b/src/render/materialsystem/qeffect.cpp index aadb43274..fb5612896 100644 --- a/src/render/materialsystem/qeffect.cpp +++ b/src/render/materialsystem/qeffect.cpp @@ -50,10 +50,6 @@ using namespace Qt3DCore; namespace Qt3DRender { -/*! - \class Qt3DRender::QEffectPrivate - \internal -*/ QEffectPrivate::QEffectPrivate() : QNodePrivate() { diff --git a/src/render/materialsystem/qmaterial.cpp b/src/render/materialsystem/qmaterial.cpp index caff5e57d..be4237898 100644 --- a/src/render/materialsystem/qmaterial.cpp +++ b/src/render/materialsystem/qmaterial.cpp @@ -46,6 +46,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 * @@ -69,10 +76,6 @@ using namespace Qt3DCore; namespace Qt3DRender { -/*! - \class Qt3DRender::QMaterialPrivate - \internal -*/ QMaterialPrivate::QMaterialPrivate() : QComponentPrivate() , m_effect(Q_NULLPTR) diff --git a/src/render/materialsystem/qparameter.cpp b/src/render/materialsystem/qparameter.cpp index c3ef446d3..c02993e34 100644 --- a/src/render/materialsystem/qparameter.cpp +++ b/src/render/materialsystem/qparameter.cpp @@ -49,10 +49,6 @@ using namespace Qt3DCore; namespace Qt3DRender { -/*! - \class Qt3DRender::QParameterPrivate - \internal -*/ QParameterPrivate::QParameterPrivate() : QNodePrivate() { diff --git a/src/render/materialsystem/qparametermapping.cpp b/src/render/materialsystem/qparametermapping.cpp index 63704d959..eeaa8a621 100644 --- a/src/render/materialsystem/qparametermapping.cpp +++ b/src/render/materialsystem/qparametermapping.cpp @@ -44,10 +44,6 @@ QT_BEGIN_NAMESPACE namespace Qt3DRender { -/*! - \class Qt3DRender::QParameterMappingPrivate - \internal -*/ QParameterMappingPrivate::QParameterMappingPrivate() : QNodePrivate() , m_bindingType(QParameterMapping::Uniform) @@ -96,7 +92,8 @@ QParameterMapping::QParameterMapping(QNode *parent) \value Attribute \value StandardUniform \value FragmentOutput - + \value UniformBufferObject + \value ShaderStorageBufferObject */ /*! \internal */ diff --git a/src/render/materialsystem/qrenderpass.cpp b/src/render/materialsystem/qrenderpass.cpp index 9587f2955..d62adffe2 100644 --- a/src/render/materialsystem/qrenderpass.cpp +++ b/src/render/materialsystem/qrenderpass.cpp @@ -53,10 +53,6 @@ using namespace Qt3DCore; namespace Qt3DRender { -/*! - \class Qt3DRender::QRenderPassPrivate - \internal -*/ QRenderPassPrivate::QRenderPassPrivate() : QNodePrivate() , m_shader(Q_NULLPTR) diff --git a/src/render/materialsystem/qshaderdata.cpp b/src/render/materialsystem/qshaderdata.cpp index c788c7bfc..d9d38252d 100644 --- a/src/render/materialsystem/qshaderdata.cpp +++ b/src/render/materialsystem/qshaderdata.cpp @@ -44,10 +44,6 @@ QT_BEGIN_NAMESPACE namespace Qt3DRender { -/*! - \class Qt3DRender::QShaderDataPrivate - \internal -*/ QShaderDataPrivate::QShaderDataPrivate() : QComponentPrivate() , m_propertyReader(PropertyReaderInterfacePtr(new QShaderDataPropertyReader())) diff --git a/src/render/materialsystem/qshaderprogram.cpp b/src/render/materialsystem/qshaderprogram.cpp index a4afa9c04..fcb7519d8 100644 --- a/src/render/materialsystem/qshaderprogram.cpp +++ b/src/render/materialsystem/qshaderprogram.cpp @@ -50,10 +50,6 @@ QT_BEGIN_NAMESPACE namespace Qt3DRender { -/*! - \class Qt3DRender::QShaderProgramPrivate - \internal -*/ QShaderProgramPrivate::QShaderProgramPrivate() : QNodePrivate() { diff --git a/src/render/materialsystem/qtechnique.cpp b/src/render/materialsystem/qtechnique.cpp index ba81f3d11..9a632bd3b 100644 --- a/src/render/materialsystem/qtechnique.cpp +++ b/src/render/materialsystem/qtechnique.cpp @@ -50,10 +50,6 @@ using namespace Qt3DCore; namespace Qt3DRender { -/*! - \class Qt3DRender::QTechniquePrivate - \internal -*/ QTechniquePrivate::QTechniquePrivate() : QNodePrivate() { diff --git a/src/render/materialsystem/shader.cpp b/src/render/materialsystem/shader.cpp index 4fd35a327..396533da3 100644 --- a/src/render/materialsystem/shader.cpp +++ b/src/render/materialsystem/shader.cpp @@ -61,7 +61,6 @@ Shader::Shader() , m_program(Q_NULLPTR) , m_isLoaded(false) , m_dna(0) - , m_mutex(new QMutex()) { m_shaderCode.resize(static_cast<int>(QShaderProgram::Compute) + 1); } @@ -70,7 +69,6 @@ Shader::~Shader() { // TO DO: ShaderProgram is leaked as of now // Fix that taking care that they may be shared given a same dna - delete m_mutex; } void Shader::cleanup() @@ -258,7 +256,7 @@ void Shader::updateUniforms(GraphicsContext *ctx, const ShaderParameterPack &pac void Shader::setFragOutputs(const QHash<QString, int> &fragOutputs) { { - QMutexLocker lock(m_mutex); + QMutexLocker lock(&m_mutex); m_fragOutputs = fragOutputs; } updateDNA(); @@ -334,7 +332,7 @@ void Shader::updateDNA() + m_shaderCode[QShaderProgram::Fragment] + m_shaderCode[QShaderProgram::Compute]); - QMutexLocker locker(m_mutex); + QMutexLocker locker(&m_mutex); uint attachmentHash = 0; QHash<QString, int>::const_iterator it = m_fragOutputs.begin(); QHash<QString, int>::const_iterator end = m_fragOutputs.end(); diff --git a/src/render/materialsystem/shader_p.h b/src/render/materialsystem/shader_p.h index 9b666aa35..88694fd98 100644 --- a/src/render/materialsystem/shader_p.h +++ b/src/render/materialsystem/shader_p.h @@ -51,6 +51,7 @@ // We mean it. // +#include <QMutex> #include <QVector> #include <Qt3DRender/private/quniformvalue_p.h> #include <Qt3DRender/private/shadervariables_p.h> @@ -59,7 +60,6 @@ QT_BEGIN_NAMESPACE class QOpenGLShaderProgram; -class QMutex; namespace Qt3DRender { @@ -131,7 +131,7 @@ private: bool m_isLoaded; ProgramDNA m_dna; - QMutex *m_mutex; + QMutex m_mutex; void updateDNA(); diff --git a/src/render/materialsystem/shaderdata.cpp b/src/render/materialsystem/shaderdata.cpp index 2aefce7cb..2301e0984 100644 --- a/src/render/materialsystem/shaderdata.cpp +++ b/src/render/materialsystem/shaderdata.cpp @@ -59,14 +59,12 @@ namespace Render { QList<Qt3DCore::QNodeId> ShaderData::m_updatedShaderData; ShaderData::ShaderData() - : m_mutex(new QMutex) - , m_managers(Q_NULLPTR) + : m_managers(Q_NULLPTR) { } ShaderData::~ShaderData() { - delete m_mutex; } void ShaderData::setManagers(NodeManagers *managers) @@ -144,7 +142,7 @@ bool ShaderData::updateViewTransform(const QMatrix4x4 &viewMatrix) { // We can't perform this only once as we don't know if we would be call as the root or a // nested ShaderData - QMutexLocker lock(m_mutex); + QMutexLocker lock(&m_mutex); // Update transformed properties // We check the matrices and decide if the transform has changed since the previous call to needsUpdate @@ -219,7 +217,7 @@ bool ShaderData::updateWorldTransform(const QMatrix4x4 &worldMatrix) // Called by renderview jobs (several concurrent threads) void ShaderData::markDirty() { - QMutexLocker lock(m_mutex); + QMutexLocker lock(&m_mutex); if (!ShaderData::m_updatedShaderData.contains(peerUuid())) ShaderData::m_updatedShaderData.append(peerUuid()); } diff --git a/src/render/materialsystem/shaderdata_p.h b/src/render/materialsystem/shaderdata_p.h index da8585d36..a77434ce8 100644 --- a/src/render/materialsystem/shaderdata_p.h +++ b/src/render/materialsystem/shaderdata_p.h @@ -103,7 +103,7 @@ protected: PropertyReaderInterfacePtr m_propertyReader; QHash<QString, QVariant> m_nestedShaderDataProperties; QHash<QString, QShaderData::TransformType> m_transformedProperties; - QMutex *m_mutex; + QMutex m_mutex; static QList<Qt3DCore::QNodeId> m_updatedShaderData; QMatrix4x4 m_worldMatrix; QMatrix4x4 m_viewMatrix; diff --git a/src/render/renderstates/qrenderstate.cpp b/src/render/renderstates/qrenderstate.cpp index 9cb719356..52fe5c5cb 100644 --- a/src/render/renderstates/qrenderstate.cpp +++ b/src/render/renderstates/qrenderstate.cpp @@ -45,10 +45,6 @@ QT_BEGIN_NAMESPACE namespace Qt3DRender { -/*! - \class Qt3DRender::QRenderStatePrivate - \internal -*/ QRenderStatePrivate::QRenderStatePrivate(QRenderState::Type type) : QNodePrivate(), m_type(type) diff --git a/src/render/shaders/es2/light.inc.frag100 b/src/render/shaders/es2/light.inc.frag100 index 50adedc76..b4988ad82 100644 --- a/src/render/shaders/es2/light.inc.frag100 +++ b/src/render/shaders/es2/light.inc.frag100 @@ -1,4 +1,4 @@ -const int MAX_LIGHTS = 4; +const int MAX_LIGHTS = 2; // RPi: cannot use more than two as we run out of uniforms const int TYPE_POINT = 0; const int TYPE_DIRECTIONAL = 1; const int TYPE_SPOT = 2; @@ -87,70 +87,6 @@ void adsModelNormalMapped(const in FP vec3 vpos, const in FP vec3 vnormal, const diffuseColor += att * lights[1].intensity * diffuse * lights[1].color; specularColor += att * specular; - - // 2 - if (lightCount < 3) - return; - att = 1.0; - if ( lights[2].type != TYPE_DIRECTIONAL ) { - s = tangentMatrix * ( lights[2].position - vpos ); - if (length( lights[2].attenuation ) != 0.0) { - FP float dist = length(s); - att = 1.0 / (lights[2].attenuation.x + lights[2].attenuation.y * dist + lights[2].attenuation.z * dist * dist); - } - s = normalize( s ); - if ( lights[2].type == TYPE_SPOT ) { - if ( degrees(acos(dot(-s, normalize(lights[2].direction))) ) > lights[2].cutOffAngle) - att = 0.0; - } - } else { - s = normalize( tangentMatrix * -lights[2].direction ); - } - - diffuse = max( dot( s, n ), 0.0 ); - - specular = 0.0; - if (diffuse > 0.0 && shininess > 0.0 && att > 0.0) { - FP vec3 r = reflect( -s, n ); - FP vec3 v = normalize( tangentMatrix * ( eye - vpos ) ); - FP float normFactor = ( shininess + 2.0 ) / 2.0; - specular = normFactor * pow( max( dot( r, v ), 0.0 ), shininess ); - } - - diffuseColor += att * lights[2].intensity * diffuse * lights[2].color; - specularColor += att * specular; - - // 3 - if (lightCount < 4) - return; - att = 1.0; - if ( lights[3].type != TYPE_DIRECTIONAL ) { - s = tangentMatrix * ( lights[3].position - vpos ); - if (length( lights[3].attenuation ) != 0.0) { - FP float dist = length(s); - att = 1.0 / (lights[3].attenuation.x + lights[3].attenuation.y * dist + lights[3].attenuation.z * dist * dist); - } - s = normalize( s ); - if ( lights[3].type == TYPE_SPOT ) { - if ( degrees(acos(dot(-s, normalize(lights[3].direction))) ) > lights[3].cutOffAngle) - att = 0.0; - } - } else { - s = normalize( tangentMatrix * -lights[3].direction ); - } - - diffuse = max( dot( s, n ), 0.0 ); - - specular = 0.0; - if (diffuse > 0.0 && shininess > 0.0 && att > 0.0) { - FP vec3 r = reflect( -s, n ); - FP vec3 v = normalize( tangentMatrix * ( eye - vpos ) ); - FP float normFactor = ( shininess + 2.0 ) / 2.0; - specular = normFactor * pow( max( dot( r, v ), 0.0 ), shininess ); - } - - diffuseColor += att * lights[3].intensity * diffuse * lights[3].color; - specularColor += att * specular; } void adsModel(const in FP vec3 vpos, const in FP vec3 vnormal, const in FP vec3 eye, const in FP float shininess, @@ -225,70 +161,6 @@ void adsModel(const in FP vec3 vpos, const in FP vec3 vnormal, const in FP vec3 diffuseColor += att * lights[1].intensity * diffuse * lights[1].color; specularColor += att * specular; - - // 2 - if (lightCount < 3) - return; - att = 1.0; - if ( lights[2].type != TYPE_DIRECTIONAL ) { - s = lights[2].position - vpos; - if (length( lights[2].attenuation ) != 0.0) { - FP float dist = length(s); - att = 1.0 / (lights[2].attenuation.x + lights[2].attenuation.y * dist + lights[2].attenuation.z * dist * dist); - } - s = normalize( s ); - if ( lights[2].type == TYPE_SPOT ) { - if ( degrees(acos(dot(-s, normalize(lights[2].direction))) ) > lights[2].cutOffAngle) - att = 0.0; - } - } else { - s = normalize( -lights[2].direction ); - } - - diffuse = max( dot( s, n ), 0.0 ); - - specular = 0.0; - if (diffuse > 0.0 && shininess > 0.0 && att > 0.0) { - FP vec3 r = reflect( -s, n ); - FP vec3 v = normalize( eye - vpos ); - FP float normFactor = ( shininess + 2.0 ) / 2.0; - specular = normFactor * pow( max( dot( r, v ), 0.0 ), shininess ); - } - - diffuseColor += att * lights[2].intensity * diffuse * lights[2].color; - specularColor += att * specular; - - // 3 - if (lightCount < 4) - return; - att = 1.0; - if ( lights[3].type != TYPE_DIRECTIONAL ) { - s = lights[3].position - vpos; - if (length( lights[3].attenuation ) != 0.0) { - FP float dist = length(s); - att = 1.0 / (lights[3].attenuation.x + lights[3].attenuation.y * dist + lights[3].attenuation.z * dist * dist); - } - s = normalize( s ); - if ( lights[3].type == TYPE_SPOT ) { - if ( degrees(acos(dot(-s, normalize(lights[3].direction))) ) > lights[3].cutOffAngle) - att = 0.0; - } - } else { - s = normalize( -lights[3].direction ); - } - - diffuse = max( dot( s, n ), 0.0 ); - - specular = 0.0; - if (diffuse > 0.0 && shininess > 0.0 && att > 0.0) { - FP vec3 r = reflect( -s, n ); - FP vec3 v = normalize( eye - vpos ); - FP float normFactor = ( shininess + 2.0 ) / 2.0; - specular = normFactor * pow( max( dot( r, v ), 0.0 ), shininess ); - } - - diffuseColor += att * lights[3].intensity * diffuse * lights[3].color; - specularColor += att * specular; } void adModel(const in FP vec3 vpos, const in FP vec3 vnormal, out FP vec3 diffuseColor) @@ -343,50 +215,4 @@ void adModel(const in FP vec3 vpos, const in FP vec3 vnormal, out FP vec3 diffus diffuse = max( dot( s, n ), 0.0 ); diffuseColor += att * lights[1].intensity * diffuse * lights[1].color; - - // 2 - if (lightCount < 3) - return; - att = 1.0; - if ( lights[2].type != TYPE_DIRECTIONAL ) { - s = lights[2].position - vpos; - if (length( lights[2].attenuation ) != 0.0) { - FP float dist = length(s); - att = 1.0 / (lights[2].attenuation.x + lights[2].attenuation.y * dist + lights[2].attenuation.z * dist * dist); - } - s = normalize( s ); - if ( lights[2].type == TYPE_SPOT ) { - if ( degrees(acos(dot(-s, normalize(lights[2].direction))) ) > lights[2].cutOffAngle) - att = 0.0; - } - } else { - s = normalize( -lights[2].direction ); - } - - diffuse = max( dot( s, n ), 0.0 ); - - diffuseColor += att * lights[2].intensity * diffuse * lights[2].color; - - // 3 - if (lightCount < 4) - return; - att = 1.0; - if ( lights[3].type != TYPE_DIRECTIONAL ) { - s = lights[3].position - vpos; - if (length( lights[3].attenuation ) != 0.0) { - FP float dist = length(s); - att = 1.0 / (lights[3].attenuation.x + lights[3].attenuation.y * dist + lights[3].attenuation.z * dist * dist); - } - s = normalize( s ); - if ( lights[3].type == TYPE_SPOT ) { - if ( degrees(acos(dot(-s, normalize(lights[3].direction))) ) > lights[3].cutOffAngle) - att = 0.0; - } - } else { - s = normalize( -lights[3].direction ); - } - - diffuse = max( dot( s, n ), 0.0 ); - - diffuseColor += att * lights[3].intensity * diffuse * lights[3].color; } diff --git a/src/render/texture/qabstracttextureimage.cpp b/src/render/texture/qabstracttextureimage.cpp index 02cfdab9b..ad631f46a 100644 --- a/src/render/texture/qabstracttextureimage.cpp +++ b/src/render/texture/qabstracttextureimage.cpp @@ -47,10 +47,6 @@ using namespace Qt3DCore; namespace Qt3DRender { -/*! - \class Qt3DRender::QAbstractTextureImagePrivate - \internal -*/ /*! \qmltype AbstractTextureImage diff --git a/src/render/texture/qabstracttextureprovider.cpp b/src/render/texture/qabstracttextureprovider.cpp index 2a679559f..97bf648a1 100644 --- a/src/render/texture/qabstracttextureprovider.cpp +++ b/src/render/texture/qabstracttextureprovider.cpp @@ -48,10 +48,6 @@ using namespace Qt3DCore; namespace Qt3DRender { -/*! - \class Qt3DRender::QAbstractTextureProviderPrivate - \internal -*/ QAbstractTextureProviderPrivate::QAbstractTextureProviderPrivate() : QNodePrivate() , m_target(QAbstractTextureProvider::Target2D) diff --git a/src/render/texture/texture.cpp b/src/render/texture/texture.cpp index 85ed3da96..6c3288720 100644 --- a/src/render/texture/texture.cpp +++ b/src/render/texture/texture.cpp @@ -80,7 +80,6 @@ Texture::Texture() , m_filtersAndWrapUpdated(false) , m_dataUploadRequired(false) , m_unique(false) - , m_lock(new QMutex()) , m_textureDNA(0) , m_textureManager(Q_NULLPTR) , m_textureImageManager(Q_NULLPTR) @@ -91,9 +90,6 @@ Texture::Texture() Texture::~Texture() { - if (m_lock != Q_NULLPTR) - delete m_lock; - m_lock = Q_NULLPTR; } void Texture::cleanup() @@ -133,7 +129,7 @@ void Texture::updateFromPeer(Qt3DCore::QNode *peer) { QAbstractTextureProvider *texture = static_cast<QAbstractTextureProvider *>(peer); - QMutexLocker lock(m_lock); + QMutexLocker lock(&m_lock); if (texture != Q_NULLPTR) { m_isDirty = true; m_width = texture->width(); @@ -176,7 +172,7 @@ QOpenGLTexture *Texture::getOrCreateGLTexture() // we are receiving a sceneChangeEvent that modifies isDirty or one of the properties // at the same time - QMutexLocker lock(m_lock); + QMutexLocker lock(&m_lock); if (m_isDirty) { delete m_gl; m_gl = Q_NULLPTR; @@ -450,7 +446,7 @@ GLint Texture::textureId() // Any Thread bool Texture::isTextureReset() const { - QMutexLocker lock(m_lock); + QMutexLocker lock(&m_lock); return m_isDirty; } @@ -498,7 +494,7 @@ void Texture::setMipLevels(int mipLevels) void Texture::sceneChangeEvent(const Qt3DCore::QSceneChangePtr &e) { // The QOpenGLTexture has to be manipulated from the RenderThread only - QMutexLocker lock(m_lock); + QMutexLocker lock(&m_lock); // We lock here so that we're sure the texture cannot be rebuilt while we are // modifying one of its properties QScenePropertyChangePtr propertyChange = qSharedPointerCast<QScenePropertyChange>(e); diff --git a/src/render/texture/texture_p.h b/src/render/texture/texture_p.h index e7ba71739..f2b6fee9a 100644 --- a/src/render/texture/texture_p.h +++ b/src/render/texture/texture_p.h @@ -151,7 +151,7 @@ private: bool m_formatWasSpecified; bool m_unique; - QMutex *m_lock; + mutable QMutex m_lock; TextureDNA m_textureDNA; TextureManager *m_textureManager; TextureImageManager *m_textureImageManager; |