Oolite 1.91.0.7646-241128-10e222e
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 "OOTypes.h"
29#import "OOMaths.h"
30
31@class OOTexture, OOColor;
32
33
34enum
35{
38};
39
40
42{
43@protected
44 Vector _particlePosition[kFragmentBurstMaxParticles];
45 Vector _particleVelocity[kFragmentBurstMaxParticles];
46 GLfloat _particleColor[kFragmentBurstMaxParticles][4];
47 GLfloat _particleSize[kFragmentBurstMaxParticles];
48 unsigned _count;
49
50 unsigned _particleType;
51
53 double _maxSpeed;
54}
55
56/* Initialize particle effect with particles flying out randomly.
57 Initiali _particleSize[] is equal to speed.
58 */
59- (id) initWithPosition:(HPVector)position
60 velocity:(Vector)velocity
61 count:(unsigned)count
62 minSpeed:(float)minSpeed
63 maxSpeed:(float)maxSpeed
64 duration:(OOTimeDelta)duration
65 baseColor:(GLfloat[4])baseColor;
66
67- (OOTexture *) texture;
68
69@end
70
71
73
74+ (id) fragmentBurstFromEntity:(Entity *)entity;
75
76@end
77
78
80{
81@private
82 GLfloat _baseSize;
83}
84
85+ (id) fragmentBurstFromEntity:(Entity *)entity;
86
87@end
@ kFragmentBurstMaxParticles
@ kBigFragmentBurstMaxParticles
double OOTimeDelta
Definition OOTypes.h:224
OOTimeDelta _timePassed
Vector _particleVelocity[kFragmentBurstMaxParticles]
GLfloat _particleSize[kFragmentBurstMaxParticles]
GLfloat _particleColor[kFragmentBurstMaxParticles][4]
OOTimeDelta _duration
Vector _particlePosition[kFragmentBurstMaxParticles]