9 #ifndef GlobeEngine_Colortable_h
10 #define GlobeEngine_Colortable_h
12 #include "OpenGL_Includes.h"
25 if (heights.size() > 0) { heights.clear(); }
26 if (colors.size() > 0) { colors.clear(); }
38 void create(std::string _filename);
39 void create(
const std::shared_ptr<HeightColorTable>& _entries);
40 void create(
float _min,
float _max);
54 void setName(std::string _name);
70 void checkForMinMax(
float _value);
71 void calculateMinMaxDiff();
73 void addHeightValue(
float _height);
74 ge::Color4ub addColorFromString(std::string _colorString);
76 unsigned char interpolate(GLubyte a, GLubyte b,
float t);
79 void determineExtension(std::string _filename);
80 void checkForCommaSeparation(std::string _example);
82 std::string objectName;
88 unsigned int pixelCount;
91 char csvSeparationChar;
float getMaxValue() const
Definition: ColorisationTable.cpp:379
std::string getName() const
Definition: ColorisationTable.cpp:388
void clear()
Definition: ColorisationTable.h:24
unsigned char * getByteDataRGBA()
Definition: ColorisationTable.cpp:255
ge::Color4ub getColorForValue(double _value) const
Definition: ColorisationTable.cpp:198
void print()
Definition: ColorisationTable.cpp:397
Definition: AvalancheTrainingSimulationEngine.h:39
ge::Color4ub getColorAtIndex(int _idx) const
Definition: ColorisationTable.cpp:343
float getMinValue() const
Definition: ColorisationTable.cpp:374
Definition: ColorisationTable.h:31
float getValueAtIndex(int _idx) const
Definition: ColorisationTable.cpp:338
unsigned char * getByteDataRGB()
Definition: ColorisationTable.cpp:226
float getValueRange() const
Definition: ColorisationTable.cpp:359
std::vector< float > heights
Definition: ColorisationTable.h:23
void addPairToColorTable(ge::Color4ub _color, float _value)
Definition: ColorisationTable.cpp:79
Definition: Texture.h:376
void clear()
Definition: ColorisationTable.cpp:19
Definition: ColorisationTable.h:20
ColorisationTable()
Definition: ColorisationTable.cpp:10
unsigned char * getByteDataRGBAStaircase()
Definition: ColorisationTable.cpp:267
void create(std::string _filename)
Definition: ColorisationTable.cpp:31
unsigned int getPixelCount() const
Definition: ColorisationTable.cpp:369
~ColorisationTable()
Definition: ColorisationTable.cpp:15
int getTableSize() const
Definition: ColorisationTable.cpp:333
float getTexCoord1DForHeightValue(float _height)
Definition: ColorisationTable.cpp:184
unsigned int size()
Definition: ColorisationTable.cpp:392
void setName(std::string _name)
Definition: ColorisationTable.cpp:384
std::vector< ge::Color4ub > colors
Definition: ColorisationTable.h:22
Definition: VBOVertex.h:228
unsigned char * getByteDataRGBALinear()
Definition: ColorisationTable.cpp:291
void setPixelCount(unsigned int _in)
Definition: ColorisationTable.cpp:364
void setMinMax(float _min, float _max)
Definition: ColorisationTable.cpp:66
void readColorTable(std::string _filename)
Definition: ColorisationTable.cpp:99