Oolite
Loading...
Searching...
No Matches
OOExhaustPlumeEntity.h
Go to the documentation of this file.
1/*
2
3OOExhaustPlumeEntity.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 "OOTexture.h"
27#import "ShipEntity.h"
28
29typedef struct
30{
31 double timeframe; // universal time for this frame
34 Vector k; // direction vectors
35} Frame;
36
37enum {
39};
40
42@private
45 GLfloat _glVertices[34 * 3];
46 GLfloat _exhaustBaseColors[34 * 4];
47 Frame _track[kExhaustFrameCount];
49 uint8_t _nextFrame;
50}
51
52+ (id)exhaustForShip:(ShipEntity*)ship withDefinition:(NSArray*)definition andScale:(float)scale;
53- (id)initForShip:(ShipEntity*)ship withDefinition:(NSArray*)definition andScale:(float)scale;
54
55- (void)resetPlume;
56
57- (Vector)scale;
58- (void)setScale:(Vector)scale;
59
60- (OOTexture*)texture;
61
62+ (void)setUpTexture;
63+ (OOTexture*)plumeTexture;
64+ (void)resetGraphicsState;
65
66@end
67
68@interface Entity (OOExhaustPlume)
69
70- (BOOL)isExhaust;
71
72@end
@ kExhaustFrameCount
double OOHPScalar
Definition OOMaths.h:51
double OOTimeAbsolute
Definition OOTypes.h:192
GLfloat _exhaustBaseColors[34 *4]
Frame _track[kExhaustFrameCount]
OOHPScalar _vertices[34 *3]
Quaternion orientation
HPVector position