38 return m_loggingInterval;
43 if (m_loggingInterval == interval)
46 m_loggingInterval = interval;
71 return m_particlesMax;
87 return m_particlesUsed;
114 return m_timeAverage;
130 return m_timeDeviation;
133void QQuick3DParticleSystemLogging::updateTimes(
qint64 time)
135 m_time = float(
time / 1000000.0) / m_updates;
137 m_totalTimesList.
append(m_time);
140 const int MAX_TIMES = 100;
141 if (m_totalTimesList.
size() > MAX_TIMES)
144 auto sortedTimes = m_totalTimesList;
145 std::sort(sortedTimes.begin(), sortedTimes.end());
150 if (sortedTimes.size() > 5) {
152 const int skipAmount = roundf(0.25f *
float(sortedTimes.size()));
153 const int maxItem = sortedTimes.size() - skipAmount;
155 double totalTime = 0.0;
156 float maxTime = 0.0f;
157 float minTime = FLT_MAX;
158 for (
int i = skipAmount;
i < maxItem;
i++) {
159 const float time = sortedTimes.at(
i);
161 minTime = std::min(minTime,
time);
162 maxTime = std::max(maxTime,
time);
165 m_timeAverage = float(totalTime / countAmount);
166 m_timeDeviation = maxTime - minTime;
168 Q_EMIT timeDeviationChanged();
173void QQuick3DParticleSystemLogging::resetData()
179 m_timeAverage = 0.0f;
180 m_timeDeviation = 0.0f;
181 m_totalTimesList.
clear();
187 Q_EMIT timeDeviationChanged();
qsizetype size() const noexcept
void removeFirst() noexcept
void append(parameter_type t)
float timeDeviation
\qmlproperty real ParticleSystem3DLogging::timeDeviation
void particlesMaxChanged()
void loggingIntervalChanged()
void particlesUsedChanged()
QQuick3DParticleSystemLogging(QObject *parent=nullptr)
\qmltype ParticleSystem3DLogging \inherits QtObject \inqmlmodule QtQuick3D.Particles3D
void setLoggingInterval(int interval)
void timeAverageChanged()
Combined button and popup list for selecting options.
IUIAutomationTreeWalker __RPC__deref_out_opt IUIAutomationElement ** parent