xref: /haiku/src/add-ons/screen_savers/gravity/Particle.h (revision 8cd10c710fcecc63e86ac1d9db3db25e176d0c3e)
1*8cd10c71STri-Edge AI /*
2*8cd10c71STri-Edge AI  * Copyright 2012-2013 Tri-Edge AI <triedgeai@gmail.com>
3*8cd10c71STri-Edge AI  * All rights reserved. Distributed under the terms of the MIT license.
4*8cd10c71STri-Edge AI  */
5*8cd10c71STri-Edge AI #ifndef PARTICLE_H
6*8cd10c71STri-Edge AI #define PARTICLE_H
7*8cd10c71STri-Edge AI 
8*8cd10c71STri-Edge AI 
9*8cd10c71STri-Edge AI #include <GLView.h>
10*8cd10c71STri-Edge AI 
11*8cd10c71STri-Edge AI class BList;
12*8cd10c71STri-Edge AI 
13*8cd10c71STri-Edge AI 
14*8cd10c71STri-Edge AI class Particle
15*8cd10c71STri-Edge AI {
16*8cd10c71STri-Edge AI public:
17*8cd10c71STri-Edge AI 	static	BList* 	list;
18*8cd10c71STri-Edge AI 
19*8cd10c71STri-Edge AI 	static	void 	Initialize(int32 size, int32 shade);
20*8cd10c71STri-Edge AI 	static	void 	Terminate();
21*8cd10c71STri-Edge AI 	static	void 	Tick();
22*8cd10c71STri-Edge AI 
23*8cd10c71STri-Edge AI 			float 	x;
24*8cd10c71STri-Edge AI 			float 	y;
25*8cd10c71STri-Edge AI 			float 	z;
26*8cd10c71STri-Edge AI 			float 	r;
27*8cd10c71STri-Edge AI 
28*8cd10c71STri-Edge AI 			float 	vx;
29*8cd10c71STri-Edge AI 			float 	vy;
30*8cd10c71STri-Edge AI 			float 	vz;
31*8cd10c71STri-Edge AI 			float 	vr;
32*8cd10c71STri-Edge AI 
33*8cd10c71STri-Edge AI 			float 	red;
34*8cd10c71STri-Edge AI 			float 	green;
35*8cd10c71STri-Edge AI 			float 	blue;
36*8cd10c71STri-Edge AI 
37*8cd10c71STri-Edge AI private:
38*8cd10c71STri-Edge AI 			void 	_Logic();
39*8cd10c71STri-Edge AI 			void 	_Render() const;
40*8cd10c71STri-Edge AI 
41*8cd10c71STri-Edge AI };
42*8cd10c71STri-Edge AI 
43*8cd10c71STri-Edge AI 
44*8cd10c71STri-Edge AI #endif
45