/xbmc/screensavers/rsxs-0.9/src/flux/flux.hh

http://github.com/xbmc/xbmc · C++ Header · 66 lines · 36 code · 8 blank · 22 comment · 0 complexity · 8f1edb2297fc25a1fc7d1a4a58c39595 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 _FLUX_HH
  24. #define _FLUX_HH
  25. #include <common.hh>
  26. #define NUMCONSTS 8
  27. namespace Hack {
  28. enum GeometryType {
  29. POINTS_GEOMETRY,
  30. SPHERES_GEOMETRY,
  31. LIGHTS_GEOMETRY
  32. };
  33. extern unsigned int numFluxes;
  34. extern unsigned int numTrails;
  35. extern unsigned int trailLength;
  36. extern GeometryType geometry;
  37. extern float size;
  38. extern unsigned int complexity;
  39. extern unsigned int randomize;
  40. extern float expansion;
  41. extern float rotation;
  42. extern float wind;
  43. extern float instability;
  44. extern float blur;
  45. };
  46. class Trail;
  47. class Flux {
  48. private:
  49. std::vector<Trail> _trails;
  50. unsigned int _randomize;
  51. float _c[NUMCONSTS]; // constants
  52. float _cv[NUMCONSTS]; // constants' change velocities
  53. float _oldDistance;
  54. public:
  55. Flux();
  56. void update(float, float);
  57. };
  58. #endif // _FLUX_HH