From e1e268ebbcd8f0d29b8faa187dde6981f82b027f Mon Sep 17 00:00:00 2001 From: Samuel Fadel Date: Mon, 5 Oct 2015 13:02:23 -0300 Subject: Initial (rudimentary) animation implementation. Animation plays when setXY() is called on Scatterplot, providing a "smooth" transition for the new position of each point. --- scatterplot.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'scatterplot.h') 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 -- cgit v1.2.3