//------------------------------------------------------------------------------ // gso_Shaper class -- // (C) Piero Giubilato 2008-2010, Berkeley Lab -- //------------------------------------------------------------------------------ //______________________________________________________________________________ // {Trace} // [File name] "gso_Shaper.h" // [Author] "Piero Giubilato" // [Version] "1.1" // [Modified by] "Piero Giubilato" // [Last revision] "12 Mar 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, bool extra = true); 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); static void shape_Exp(Float_t* map, UChar_t* mask, UInt_t width, UInt_t height, UInt_t direction, Float_t flatness = 1); static void shape_Ring(Float_t* map, UChar_t* mask, UInt_t width, UInt_t height, Float_t rIn, Float_t rOut, Float_t flatness = 1, bool fill = false); static void shape_Notch(Float_t* map, UChar_t* mask, UInt_t width, UInt_t height, UInt_t direction, Float_t rIn, Float_t rOut, Float_t flatness = 1, bool fill = false); // 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* t_Map, UChar_t* s_Map, UInt_t width, UInt_t height); static void map_Copy(UChar_t* t_Map, UInt_t t_Width, UInt_t t_Height, UInt_t t_Left, UInt_t t_Top, UChar_t* s_Map, UInt_t s_Width, UInt_t s_Height); static void map_From(UChar_t* t_Map, UInt_t t_Width, UInt_t t_Height, UChar_t* s_Map, UInt_t s_Width, UInt_t s_Height, UInt_t s_Left, UInt_t s_Top); static void map_Sum(UChar_t* t_Map, UChar_t* t_Mask, UChar_t* s_Map, UChar_t* s_Mask, UInt_t width, UInt_t height, Float_t scale); static void map_Sum(UChar_t* t_Map, UChar_t* s_MapA, UChar_t* s_MaskA, UChar_t* s_MapB, UChar_t* s_MaskB, UInt_t width, UInt_t height, Float_t scale); }; // Overloading check #endif