Oolite
Loading...
Searching...
No Matches
OOExhaustPlumeEntity.h
Go to the documentation of this file.
1
/*
2
3
OOExhaustPlumeEntity.h
4
5
6
Oolite
7
Copyright (C) 2004-2013 Giles C Williams and contributors
8
9
This program is free software; you can redistribute it and/or
10
modify it under the terms of the GNU General Public License
11
as published by the Free Software Foundation; either version 2
12
of the License, or (at your option) any later version.
13
14
This program is distributed in the hope that it will be useful,
15
but WITHOUT ANY WARRANTY; without even the implied warranty of
16
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17
GNU General Public License for more details.
18
19
You should have received a copy of the GNU General Public License
20
along with this program; if not, write to the Free Software
21
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
22
MA 02110-1301, USA.
23
24
*/
25
26
#import "
OOTexture.h
"
27
#import "
ShipEntity.h
"
28
29
typedef
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
enum
{
38
kExhaustFrameCount
= 16
39
};
40
41
@interface
OOExhaustPlumeEntity
:
Entity
<
OOSubEntity
> {
42
@private
43
Vector
_exhaustScale
;
44
OOHPScalar
_vertices
[34 * 3];
45
GLfloat
_glVertices
[34 * 3];
46
GLfloat
_exhaustBaseColors
[34 * 4];
47
Frame
_track
[kExhaustFrameCount];
48
OOTimeAbsolute
_trackTime
;
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
@ kExhaustFrameCount
Definition
OOExhaustPlumeEntity.h:38
OOHPScalar
double OOHPScalar
Definition
OOMaths.h:51
OOTexture.h
OOTimeAbsolute
double OOTimeAbsolute
Definition
OOTypes.h:192
ShipEntity.h
-[Entity(OOExhaustPlume) isExhaust]
BOOL isExhaust()
Definition
OOExhaustPlumeEntity.m:676
Entity
Definition
Entity.h:75
OOExhaustPlumeEntity
Definition
OOExhaustPlumeEntity.h:41
OOExhaustPlumeEntity::_exhaustBaseColors
GLfloat _exhaustBaseColors[34 *4]
Definition
OOExhaustPlumeEntity.h:46
OOExhaustPlumeEntity::_exhaustScale
Vector _exhaustScale
Definition
OOExhaustPlumeEntity.h:43
OOExhaustPlumeEntity::_glVertices
GLfloat _glVertices[34 *3]
Definition
OOExhaustPlumeEntity.h:45
OOExhaustPlumeEntity::_track
Frame _track[kExhaustFrameCount]
Definition
OOExhaustPlumeEntity.h:47
OOExhaustPlumeEntity::_nextFrame
uint8_t _nextFrame
Definition
OOExhaustPlumeEntity.h:49
OOExhaustPlumeEntity::_vertices
OOHPScalar _vertices[34 *3]
Definition
OOExhaustPlumeEntity.h:44
OOExhaustPlumeEntity::_trackTime
OOTimeAbsolute _trackTime
Definition
OOExhaustPlumeEntity.h:48
OOTexture
Definition
OOTexture.h:109
ShipEntity
Definition
ShipEntity.h:183
OOSubEntity-p
Definition
OOEntityWithDrawable.h:32
Frame
Definition
OOExhaustPlumeEntity.h:30
Frame::k
Vector k
Definition
OOExhaustPlumeEntity.h:34
Frame::orientation
Quaternion orientation
Definition
OOExhaustPlumeEntity.h:33
Frame::timeframe
double timeframe
Definition
OOExhaustPlumeEntity.h:31
Frame::position
HPVector position
Definition
OOExhaustPlumeEntity.h:32
HPVector
Definition
OOHPVector.h:35
Quaternion
Definition
OOQuaternion.h:27
Vector
Definition
OOVector.h:31
src
Core
Entities
OOExhaustPlumeEntity.h
Generated by
1.15.0