Oolite 1.91.0.7646-241128-10e222e
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 "ShipEntity.h"
27#import "OOTexture.h"
28
29typedef struct
30{
31 double timeframe; // universal time for this frame
32 HPVector position;
33 Quaternion orientation;
34 Vector k; // direction vectors
35} Frame;
36
37
38enum
39{
41};
42
43
45{
46@private
47 Vector _exhaustScale;
49 GLfloat _glVertices[34 * 3];
50 GLfloat _exhaustBaseColors[34 * 4];
51 Frame _track[kExhaustFrameCount];
53 uint8_t _nextFrame;
55
56+ (id) exhaustForShip:(ShipEntity *)ship withDefinition:(NSArray *)definition andScale:(float)scale;
57- (id) initForShip:(ShipEntity *)ship withDefinition:(NSArray *)definition andScale:(float)scale;
58
59- (void) resetPlume;
60
61- (Vector) scale;
62- (void) setScale:(Vector)scale;
63
64- (OOTexture *) texture;
65
66+ (void) setUpTexture;
67+ (OOTexture *) plumeTexture;
68+ (void) resetGraphicsState;
69
70@end
71
72
73@interface Entity (OOExhaustPlume)
75- (BOOL)isExhaust;
76
77@end
@ kExhaustFrameCount
double OOHPScalar
Definition OOMaths.h:69
double OOTimeAbsolute
Definition OOTypes.h:223
GLfloat _exhaustBaseColors[34 *4]
Frame _track[kExhaustFrameCount]
OOHPScalar _vertices[34 *3]
Quaternion orientation
HPVector position