aboutsummaryrefslogtreecommitdiff
path: root/scatterplot.h
diff options
context:
space:
mode:
authorSamuel Fadel <samuelfadel@gmail.com>2015-10-05 13:02:23 -0300
committerSamuel Fadel <samuelfadel@gmail.com>2015-10-05 13:02:23 -0300
commite1e268ebbcd8f0d29b8faa187dde6981f82b027f (patch)
treee0d8d819c781e595fd9347ead8c1bdc4ddec0767 /scatterplot.h
parent33bc0020b7c4f47eeedb92365c2578614d61fb97 (diff)
Initial (rudimentary) animation implementation.
Animation plays when setXY() is called on Scatterplot, providing a "smooth" transition for the new position of each point.
Diffstat (limited to 'scatterplot.h')
-rw-r--r--scatterplot.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/scatterplot.h b/scatterplot.h
index 2dc031a..63a7e6e 100644
--- a/scatterplot.h
+++ b/scatterplot.h
@@ -44,7 +44,11 @@ private:
void updateGeometry();
void updateMaterials();
- arma::mat m_xy;
+ void resetAnimation();
+ void startAnimation();
+ void animationTick();
+
+ arma::mat m_oldXY, m_xy;
LinearScale m_sx, m_sy;
enum InteractionState {
@@ -63,6 +67,7 @@ private:
arma::vec m_colorData;
ColorScale *m_colorScale;
+ float m_t;
};
#endif // SCATTERPLOT_H