root/OpenSceneGraph/trunk/examples/osgoit/HeatMap.h @ 13556

Revision 13556, 0.8 kB (checked in by robert, 34 hours ago)

From Alberto Luaces,"the current code uses the preprocessor for generating the plugin path in
a way that when CMAKE_INSTALL_PREFIX contains something along the lines
of

/usr/x86_64-linux-gnu/

it gets substituted as

/usr/x86_64-1-gnu/

that is, the string is preprocessed again, thereby making changes to
anything that matches any defined symbol, as "linux" in this example
(https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=763816).

Quoting that path directly in CMake scripts solves that problem.
"

Line 
1
2#ifndef HEATMAP_H
3#define HEATMAP_H
4
5#include <osg/Geode>
6#include <osg/Uniform>
7#include <osg/Texture2D>
8#include <osg/Texture1D>
9
10class Heatmap : public osg::Geode
11{
12public:
13    Heatmap(float width, float depth, float maxheight, unsigned int K, unsigned int N, float maximum, float transparency);
14    ~Heatmap();
15
16    void setData(float *buffer, float maxheight, float maximum, float transparency);
17
18protected:
19    unsigned int m_K;
20    unsigned int m_N;
21    float *m_data;
22    osg::ref_ptr<osg::Image> m_img2;
23    osg::ref_ptr<osg::Texture2D> m_tex2;
24
25    osg::ref_ptr<osg::Image> colorimg;
26    osg::ref_ptr<osg::Texture1D> colortex;
27
28    osg::Uniform *maximumUniform;
29    osg::Uniform *maxheightUniform;
30    osg::Uniform *transparencyUniform;
31};
32
33#endif // #ifndef HEATMAP_H
Note: See TracBrowser for help on using the browser.