From 7ad4b526899f8bc764192e88e65306c788a9ed32 Mon Sep 17 00:00:00 2001 From: Samuel Fadel Date: Fri, 15 Jan 2016 22:35:13 +0100 Subject: VoronoiSplat & Scatterplot: splatting is now a separate component. The change was due to future functionality requirements, this separation provides grater flexibility. As a nice side effect, the cropping bug when first rendering the splat is now gone. --- scatterplot.h | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) (limited to 'scatterplot.h') diff --git a/scatterplot.h b/scatterplot.h index 6510c54..656ed09 100644 --- a/scatterplot.h +++ b/scatterplot.h @@ -1,16 +1,16 @@ #ifndef SCATTERPLOT_H #define SCATTERPLOT_H -#include -#include #include #include -#include + +#include #include "colorscale.h" #include "scale.h" -class Scatterplot : public QQuickItem +class Scatterplot + : public QQuickItem { Q_OBJECT public: @@ -31,7 +31,6 @@ signals: void colorDataChanged(const arma::vec &colorData) const; void opacityDataChanged(const arma::vec &opacityData) const; void selectionChanged(const QSet &selection) const; - void displaySplatChanged(bool displaySplat) const; void scaleChanged(const LinearScale &sx, const LinearScale &sy) const; public slots: @@ -39,7 +38,6 @@ public slots: void setColorData(const arma::vec &colorData); void setOpacityData(const arma::vec &opacityData); void setSelection(const QSet &selection); - void setDisplaySplat(bool displaySplat); void setScale(const LinearScale &sx, const LinearScale &sy); protected: @@ -50,15 +48,14 @@ protected: private: QSGNode *newSceneGraph(); - QSGNode *newSplatNode(); QSGNode *newGlyphTree(); - bool updateSelection(bool mergeSelection); void applyManipulation(); - void updateSplat(QSGNode *node); void updateGlyphs(QSGNode *node); + bool updateSelection(bool mergeSelection); + arma::mat m_xy; void autoScale(); @@ -79,7 +76,6 @@ private: bool m_shouldUpdateGeometry, m_shouldUpdateMaterials; - bool m_displaySplat; ColorScale *m_colorScale; arma::vec m_colorData; -- cgit v1.2.3