//------------------------------------------------------------------------------ // gso_Shaper class -- // (C) Piero Giubilato 2009, Berkeley Lab -- //------------------------------------------------------------------------------ //______________________________________________________________________________ // {Trace} // [File name] "gso_Shaper.h" // [Author] "Piero Giubilato" // [Version] "0.1" // [Modified by] "Piero Giubilato" // [Last revision] "21 Jan 2009" // [Language] "C++" // [Compiler] "Visual C++ 9.x" // [Member of] "Cool SEAL" // [Project] "SEAL" // [Description] "Header for the gso_Shaper class" // [Key documentation] // "Visual C++ Reference Help" // "Root reference guide" // {Trace} //______________________________________________________________________________ // Overloading check #ifndef gso_Shaper_H #define gso_Shaper_H // Standard libs // Root components #include // Application components #include "gso_renderer.h" //______________________________________________________________________________ class gso_Shaper { private: // Force a singleton gso_Shaper (); ~gso_Shaper (); gso_Shaper (const gso_Shaper&) {}; gso_Shaper& operator=(gso_Shaper&) {}; public: // Shapes generation static void shape_Button(Float_t* map, UChar_t* mask, UInt_t width, UInt_t height, Float_t roundness = 0, Float_t flatness = 1); static void shape_Dome(Float_t* map, UChar_t* mask, UInt_t width, UInt_t height, Float_t radius, Float_t flatness = 1); static void shape_Funnel(Float_t* map, UChar_t* mask, UInt_t width, UInt_t height, Float_t radius, Float_t flatness = 1); // Shapes manipulation static void shape_Render(UChar_t* col_Map, Float_t* shape_Map, UChar_t* mask, UInt_t width, UInt_t height, gso_Material* mat, UInt_t backColor); // Shapes linear algebra static void shape_scale_Z(Float_t* map, UInt_t width, UInt_t height, Float_t scale); static void shape_scale_Z(Float_t* target_Map, Float_t* source_Map, UInt_t width, UInt_t height, Float_t scale); static void shape_shift_Z(Float_t* map, UInt_t width, UInt_t height, Float_t shift); static void shape_shift_Z(Float_t* target_map, Float_t* source_Map, UInt_t width, UInt_t height, Float_t shift); static void shape_ss_Z(Float_t* target_map, Float_t* source_Map, UInt_t width, UInt_t height, Float_t scale, Float_t shift); // Masks linear algebra static void mask_Grow(UChar_t* mask, UInt_t width, UInt_t height); static void mask_Invert(UChar_t* mask, UInt_t width, UInt_t height); static void mask_Invert(UChar_t* target_Mask, UChar_t* source_Mask, UInt_t width, UInt_t height); // PixMap linear algebra static void map_Pixel(UChar_t* pixel, UInt_t color); static void map_Pixel(UInt_t* pixel_Color, UInt_t color); static void map_Flat(UChar_t* map, UInt_t width, UInt_t height, UInt_t color); static void map_Copy(UChar_t* target_Map, UChar_t* source_Map, UInt_t width, UInt_t height); static void map_Sum(UChar_t* target_Map, UChar_t* target_Mask, UChar_t* sum_Map, UChar_t* sum_Mask, UInt_t width, UInt_t height, Float_t scale); static void map_Sum(UChar_t* target_Map, UChar_t* sum_MapA, UChar_t* sum_MaskA, UChar_t* sum_MapB, UChar_t* sum_MaskB, UInt_t width, UInt_t height, Float_t scale); }; // Overloading check #endif