/xbmc/screensavers/rsxs-0.9/src/euphoria/wisp.hh

http://github.com/xbmc/xbmc · C++ Header · 54 lines · 25 code · 7 blank · 22 comment · 0 complexity · 2563e513e1c32600d086f356a59b9243 MD5 · raw file

  1. /*
  2. * Really Slick XScreenSavers
  3. * Copyright (C) 2002-2006 Michael Chapman
  4. *
  5. * This program is free software; you can redistribute it and/or modify
  6. * it under the terms of the GNU General Public License version 2 as
  7. * published by the Free Software Foundation.
  8. *
  9. * This program is distributed in the hope that it will be useful,
  10. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. * GNU General Public License for more details.
  13. *
  14. * You should have received a copy of the GNU General Public License
  15. * along with this program; if not, write to the Free Software
  16. * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  17. *
  18. *****************************************************************************
  19. *
  20. * This is a Linux port of the Really Slick Screensavers,
  21. * Copyright (C) 2002 Terence M. Welsh, available from www.reallyslick.com
  22. */
  23. #ifndef _WISP_HH
  24. #define _WISP_HH
  25. #include <common.hh>
  26. #include <color.hh>
  27. #include <vector.hh>
  28. #define NUMCONSTS 9
  29. class Wisp {
  30. private:
  31. stdx::dim2<Vector> _vertex;
  32. stdx::dim2<Vector> _gridPos;
  33. stdx::dim2<float> _intensity;
  34. float _c[NUMCONSTS]; // constants
  35. float _cr[NUMCONSTS]; // constants' radial position
  36. float _cv[NUMCONSTS]; // constants' change velocities
  37. HSLColor _HSL;
  38. RGBColor _RGB;
  39. float _hueSpeed;
  40. float _saturationSpeed;
  41. public:
  42. Wisp();
  43. void update();
  44. void draw() const;
  45. void drawAsBackground() const;
  46. };
  47. #endif // _WISP_HH