Oolite
Loading...
Searching...
No Matches
OOParticleSystem.h
Go to the documentation of this file.
1/*
2
3OOParticleSystem.h
4
5
6Oolite
7Copyright (C) 2004-2013 Giles C Williams and contributors
8
9This program is free software; you can redistribute it and/or
10modify it under the terms of the GNU General Public License
11as published by the Free Software Foundation; either version 2
12of the License, or (at your option) any later version.
13
14This program is distributed in the hope that it will be useful,
15but WITHOUT ANY WARRANTY; without even the implied warranty of
16MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17GNU General Public License for more details.
18
19You should have received a copy of the GNU General Public License
20along with this program; if not, write to the Free Software
21Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
22MA 02110-1301, USA.
23
24*/
25
26#import "Entity.h"
27
28#import "OOMaths.h"
29#import "OOTypes.h"
30
31@class OOTexture, OOColor;
32
33enum {
36};
37
39@protected
40 Vector _particlePosition[kFragmentBurstMaxParticles];
41 Vector _particleVelocity[kFragmentBurstMaxParticles];
42 GLfloat _particleColor[kFragmentBurstMaxParticles][4];
43 GLfloat _particleSize[kFragmentBurstMaxParticles];
44 unsigned _count;
45
46 unsigned _particleType;
47
49 double _maxSpeed;
50}
51
52/* Initialize particle effect with particles flying out randomly.
53 Initiali _particleSize[] is equal to speed.
54 */
55- (id)initWithPosition:(HPVector)position
56 velocity:(Vector)velocity
57 count:(unsigned)count
58 minSpeed:(float)minSpeed
59 maxSpeed:(float)maxSpeed
60 duration:(OOTimeDelta)duration
61 baseColor:(GLfloat[4])baseColor;
62
63- (OOTexture*)texture;
64
65@end
66
68
69+ (id)fragmentBurstFromEntity:(Entity*)entity;
70
71@end
72
74@private
75 GLfloat _baseSize;
76}
77
78+ (id)fragmentBurstFromEntity:(Entity*)entity;
79
80@end
@ kFragmentBurstMaxParticles
@ kBigFragmentBurstMaxParticles
double OOTimeDelta
Definition OOTypes.h:193
OOTimeDelta _timePassed
Vector _particleVelocity[kFragmentBurstMaxParticles]
GLfloat _particleSize[kFragmentBurstMaxParticles]
GLfloat _particleColor[kFragmentBurstMaxParticles][4]
OOTimeDelta _duration
Vector _particlePosition[kFragmentBurstMaxParticles]