remove overlay picks from stats qml

This commit is contained in:
SamGondelman 2019-02-07 14:23:34 -08:00
parent e74ff18bef
commit c217f8d80f
4 changed files with 16 additions and 16 deletions

View file

@ -129,11 +129,11 @@ Item {
}
StatText {
visible: root.expanded
text: "Intersection calls: Entities/Overlays/Avatars/HUD\n " +
"Styluses:\t" + root.stylusPicksUpdated.x + "/" + root.stylusPicksUpdated.y + "/" + root.stylusPicksUpdated.z + "/" + root.stylusPicksUpdated.w + "\n " +
"Rays:\t" + root.rayPicksUpdated.x + "/" + root.rayPicksUpdated.y + "/" + root.rayPicksUpdated.z + "/" + root.rayPicksUpdated.w + "\n " +
"Parabolas:\t" + root.parabolaPicksUpdated.x + "/" + root.parabolaPicksUpdated.y + "/" + root.parabolaPicksUpdated.z + "/" + root.parabolaPicksUpdated.w + "\n " +
"Colliders:\t" + root.collisionPicksUpdated.x + "/" + root.collisionPicksUpdated.y + "/" + root.collisionPicksUpdated.z + "/" + root.collisionPicksUpdated.w
text: "Intersection calls: Entities/Avatars/HUD\n " +
"Styluses:\t" + root.stylusPicksUpdated.x + "/" + root.stylusPicksUpdated.y + "/" + root.stylusPicksUpdated.z + "\n " +
"Rays:\t" + root.rayPicksUpdated.x + "/" + root.rayPicksUpdated.y + "/" + root.rayPicksUpdated.z + "\n " +
"Parabolas:\t" + root.parabolaPicksUpdated.x + "/" + root.parabolaPicksUpdated.y + "/" + root.parabolaPicksUpdated.z + "\n " +
"Colliders:\t" + root.collisionPicksUpdated.x + "/" + root.collisionPicksUpdated.y + "/" + root.collisionPicksUpdated.z
}
}
}

View file

@ -158,7 +158,7 @@ void Stats::updateStats(bool force) {
STAT_UPDATE(rayPicksCount, totalPicks[PickQuery::Ray]);
STAT_UPDATE(parabolaPicksCount, totalPicks[PickQuery::Parabola]);
STAT_UPDATE(collisionPicksCount, totalPicks[PickQuery::Collision]);
std::vector<QVector4D> updatedPicks = pickManager->getUpdatedPickCounts();
std::vector<QVector3D> updatedPicks = pickManager->getUpdatedPickCounts();
STAT_UPDATE(stylusPicksUpdated, updatedPicks[PickQuery::Stylus]);
STAT_UPDATE(rayPicksUpdated, updatedPicks[PickQuery::Ray]);
STAT_UPDATE(parabolaPicksUpdated, updatedPicks[PickQuery::Parabola]);

View file

@ -171,10 +171,10 @@ private: \
* @property {number} rayPicksCount - <em>Read-only.</em>
* @property {number} parabolaPicksCount - <em>Read-only.</em>
* @property {number} collisionPicksCount - <em>Read-only.</em>
* @property {Vec4} stylusPicksUpdated - <em>Read-only.</em>
* @property {Vec4} rayPicksUpdated - <em>Read-only.</em>
* @property {Vec4} parabolaPicksUpdated - <em>Read-only.</em>
* @property {Vec4} collisionPicksUpdated - <em>Read-only.</em>
* @property {Vec3} stylusPicksUpdated - <em>Read-only.</em>
* @property {Vec3} rayPicksUpdated - <em>Read-only.</em>
* @property {Vec3} parabolaPicksUpdated - <em>Read-only.</em>
* @property {Vec3} collisionPicksUpdated - <em>Read-only.</em>
*/
// Properties from x onwards are QQuickItem properties.
@ -296,10 +296,10 @@ class Stats : public QQuickItem {
STATS_PROPERTY(int, rayPicksCount, 0)
STATS_PROPERTY(int, parabolaPicksCount, 0)
STATS_PROPERTY(int, collisionPicksCount, 0)
STATS_PROPERTY(QVector4D, stylusPicksUpdated, QVector4D(0, 0, 0, 0))
STATS_PROPERTY(QVector4D, rayPicksUpdated, QVector4D(0, 0, 0, 0))
STATS_PROPERTY(QVector4D, parabolaPicksUpdated, QVector4D(0, 0, 0, 0))
STATS_PROPERTY(QVector4D, collisionPicksUpdated, QVector4D(0, 0, 0, 0))
STATS_PROPERTY(QVector3D, stylusPicksUpdated, QVector3D(0, 0, 0))
STATS_PROPERTY(QVector3D, rayPicksUpdated, QVector3D(0, 0, 0))
STATS_PROPERTY(QVector3D, parabolaPicksUpdated, QVector3D(0, 0, 0))
STATS_PROPERTY(QVector3D, collisionPicksUpdated, QVector3D(0, 0, 0))
public:
static Stats* getInstance();

View file

@ -61,14 +61,14 @@ public:
bool getForceCoarsePicking() { return _forceCoarsePicking; }
const std::vector<QVector4D>& getUpdatedPickCounts() { return _updatedPickCounts; }
const std::vector<QVector3D>& getUpdatedPickCounts() { return _updatedPickCounts; }
const std::vector<int>& getTotalPickCounts() { return _totalPickCounts; }
public slots:
void setForceCoarsePicking(bool forceCoarsePicking) { _forceCoarsePicking = forceCoarsePicking; }
protected:
std::vector<QVector4D> _updatedPickCounts { PickQuery::NUM_PICK_TYPES };
std::vector<QVector3D> _updatedPickCounts { PickQuery::NUM_PICK_TYPES };
std::vector<int> _totalPickCounts { 0, 0, 0, 0 };
bool _forceCoarsePicking { false };