00001 #ifndef CURVATURE_TEXTURE_H_IS_INCLUDED 00002 #define CURVATURE_TEXTURE_H_IS_INCLUDED 00003 00004 /*! 00005 * \file curvature_texture.H 00006 * \brief Contains the definitions of the classes that implement the curvature 00007 * visualization gTexture. 00008 * 00009 */ 00010 00011 #include "gtex/basic_texture.H" 00012 00013 /*! 00014 * \brief gTexture that implements curvature visualization for a mesh. 00015 * 00016 */ 00017 class CurvatureTexture : public BasicTexture { 00018 00019 public: 00020 00021 //! \name Constructors 00022 //@{ 00023 00024 CurvatureTexture(Patch* patch = 0, StripCB* cb=0); 00025 00026 //@} 00027 00028 //! \name RTTI Related 00029 //@{ 00030 00031 DEFINE_RTTI_METHODS3("Curvature", CurvatureTexture*, 00032 BasicTexture, CDATA_ITEM *); 00033 00034 //@} 00035 00036 //! \name GTexture Virtual Methods 00037 //@{ 00038 00039 virtual int draw(CVIEWptr& v); 00040 00041 //@} 00042 00043 //! \name DATA_ITEM Virtual Methods 00044 //@{ 00045 00046 virtual DATA_ITEM *dup() const { return new CurvatureTexture; } 00047 00048 //@} 00049 00050 //! \brief Numerical constants for different curvature filters. 00051 enum curvature_filter_t { 00052 FILTER_NONE = 0, 00053 FILTER_GAUSSIAN = 1, 00054 FILTER_MEAN = 2, 00055 FILTER_RADIAL = 3 00056 }; 00057 00058 //! \name Style Parameter Accessors 00059 //@{ 00060 00061 static bool get_draw_radial_curv() 00062 { return draw_radial_curv; } 00063 static void set_draw_radial_curv(bool draw_radial_curv_in) 00064 { draw_radial_curv = draw_radial_curv_in; } 00065 static bool get_draw_mean_curv() 00066 { return draw_mean_curv; } 00067 static void set_draw_mean_curv(bool draw_mean_curv_in) 00068 { draw_mean_curv = draw_mean_curv_in; } 00069 static bool get_draw_gaussian_curv() 00070 { return draw_gaussian_curv; } 00071 static void set_draw_gaussian_curv(bool draw_gaussian_curv_in) 00072 { draw_gaussian_curv = draw_gaussian_curv_in; } 00073 00074 static curvature_filter_t get_radial_filter() 00075 { return radial_filter; } 00076 static void set_radial_filter(curvature_filter_t radial_filter_in) 00077 { radial_filter = radial_filter_in; } 00078 static curvature_filter_t get_mean_filter() 00079 { return mean_filter; } 00080 static void set_mean_filter(curvature_filter_t mean_filter_in) 00081 { mean_filter = mean_filter_in; } 00082 static curvature_filter_t get_gaussian_filter() 00083 { return gaussian_filter; } 00084 static void set_gaussian_filter(curvature_filter_t gaussian_filter_in) 00085 { gaussian_filter = gaussian_filter_in; } 00086 00087 static float get_sugcontour_thresh() 00088 { return sugcontour_thresh; } 00089 static void set_sugcontour_thresh(float sugcontour_thresh_in) 00090 { sugcontour_thresh = sugcontour_thresh_in; } 00091 00092 //@} 00093 00094 private: 00095 00096 static bool draw_radial_curv; //!< Draw radial curvature? 00097 static bool draw_mean_curv; //!< Draw mean curvature? 00098 static bool draw_gaussian_curv; //!< Draw gaussian curvature? 00099 00100 static curvature_filter_t radial_filter; //!< Radial curvature filter 00101 static curvature_filter_t mean_filter; //!< Mean curvature filter 00102 static curvature_filter_t gaussian_filter; //!< Gaussian curvature filter 00103 00104 static float sugcontour_thresh; //!< Suggestive contour threshold 00105 00106 }; 00107 00108 #endif // CURVATURE_TEXTURE_H_IS_INCLUDED