PageRenderTime 59ms CodeModel.GetById 43ms app.highlight 9ms RepoModel.GetById 4ms app.codeStats 0ms

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