Go to
the documentation of this file.
00001 #if !defined CONVOLUTION_KERNEL_
00002 #define CONVOLUTION_KERNEL_
00003
00081
00082
00083 namespace mudbox {
00084
00085 class ConvolutionKernel {
00086 private:
00087 float *m_Kernel;
00088 short *m_fixedKernel;
00089 int m_Size;
00090
00091 bool m_Generated;
00092
00093 float m_Sharpness;
00094 float m_Radius;
00095 float m_Sigma;
00096
00097 void Generate(void);
00098 void makeFixed(void);
00099
00100 public:
00102 ConvolutionKernel(const ConvolutionKernel &k);
00103
00106 ConvolutionKernel(float *kernel, int size);
00107
00109 ConvolutionKernel(float sharpness = 0.5f,
00110 float radius = 1.5f,
00111 float sigma = (1.0f/3.0f));
00112
00114 ~ConvolutionKernel();
00115
00116 void setSharpness(float val);
00117 void setRadius(float val);
00118 void setSigma(float val);
00119
00121 void setKernel(float *f, int Size);
00122
00123 float getSharpness() const { return m_Sharpness; }
00124 float getRadius() const { return m_Radius; }
00125 float getSigma() const { return m_Sigma; }
00126
00128 bool isGenerated(void) const { return m_Generated; }
00129
00131 int getSize (void) const { return m_Size; }
00132
00134 void getKernel(float *targetBuffer) const;
00135
00137 const float *getKernel(void) const { return m_Kernel; }
00138
00145 const short *getFixedKernel(void) const { return m_fixedKernel; }
00146
00148 void logPrintKernel(void) const;
00149 };
00150
00151
00152
00153
00154
00155
00156
00157
00158
00159
00160
00161
00162
00163
00164
00165
00166
00167
00168
00169
00170 #endif
00171
00172 };
00173