From 4c066a82962a9a0634dcfe0a305de7b2a4cacc5b Mon Sep 17 00:00:00 2001 From: Samuel Fadel Date: Sat, 16 Jan 2016 20:55:45 +0100 Subject: Added the Colormap component. * The Colormap component is a simple rect with a texture mapped that displays a ColorScale with a fixed number of samples. This number of samples is exported as a member const, which is used on other components (such as VoronoiSplat). * The texture mapping is reflecting the colormap lookup used in VoronoiSplat. * The ColorScale class now has a method for sampling the color scale and outputs the samples to iterator-style objects, providing easy intergration with existing code. --- voronoisplat.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'voronoisplat.h') diff --git a/voronoisplat.h b/voronoisplat.h index fb93f09..6061ef3 100644 --- a/voronoisplat.h +++ b/voronoisplat.h @@ -31,7 +31,7 @@ public: signals: void sitesChanged(const arma::mat &sites); void valuesChanged(const arma::vec &values); - void colormapChanged(const ColorScale *scale); + void colormapChanged(const ColorScale &scale); public slots: // 'points' should be a 2D points matrix (each point in a row) @@ -41,7 +41,7 @@ public slots: void setValues(const arma::vec &values); // Set colormap data based on the given color scale - void setColormap(const ColorScale *scale); + void setColormap(const ColorScale &scale); private: std::vector m_sites, m_values, m_cmap; -- cgit v1.2.3