Oolite 1.91.0.7646-241128-10e222e
Loading...
Searching...
No Matches
OOVisualEffectEntity.h
Go to the documentation of this file.
1/*
2
3 OOVisualEffectEntity.h
4
5 Entity subclass representing a visual effect with a custom mesh
6
7 Oolite
8 Copyright (C) 2004-2013 Giles C Williams and contributors
9
10 This program is free software; you can redistribute it and/or
11 modify it under the terms of the GNU General Public License
12 as published by the Free Software Foundation; either version 2
13 of the License, or (at your option) any later version.
14
15 This program is distributed in the hope that it will be useful,
16 but WITHOUT ANY WARRANTY; without even the implied warranty of
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 GNU General Public License for more details.
19
20 You should have received a copy of the GNU General Public License
21 along with this program; if not, write to the Free Software
22 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
23 MA 02110-1301, USA.
24
25 */
26
28#import "OOPlanetEntity.h"
29#import "OOJSPropID.h"
30#import "HeadUpDisplay.h"
31#import "OOWeakReference.h"
32
34
35
37{
38@private
39 NSMutableArray *subEntities;
41 NSDictionary *effectinfoDictionary;
43 GLfloat _profileRadius; // for frustum culling
48 GLfloat _hullHeatLevel;
56 Vector _v_forward;
57 Vector _v_up;
58 Vector _v_right;
61 NSDictionary *scriptInfo;
63 NSString *_effectKey;
67 // beacons
68 NSString *_beaconCode;
69 NSString *_beaconLabel;
72 id <OOHUDBeaconIcon> _beaconDrawable;
74 // scaling
75 GLfloat scaleX;
76 GLfloat scaleY;
77 GLfloat scaleZ;
79}
80
81- (id)initWithKey:(NSString *)key definition:(NSDictionary *) dict;
82- (BOOL) setUpVisualEffectFromDictionary:(NSDictionary *) effectDict;
83
84- (OOMesh *)mesh;
85- (void)setMesh:(OOMesh *)mesh;
86
87- (NSString *)effectKey;
88
89- (GLfloat)frustumRadius;
90
91- (void) clearSubEntities;
92- (BOOL) setUpSubEntities;
93- (void) removeSubEntity:(Entity<OOSubEntity> *)sub;
94- (void) setNoDrawDistance;
95- (NSArray *)subEntities;
96- (NSUInteger) subEntityCount;
97- (NSEnumerator *) visualEffectSubEntityEnumerator;
98- (BOOL) hasSubEntity:(Entity<OOSubEntity> *)sub;
99
100- (NSEnumerator *)subEntityEnumerator;
101- (NSEnumerator *)effectSubEntityEnumerator;
102- (NSEnumerator *)flasherEnumerator;
103
104- (void) orientationChanged;
105- (Vector) forwardVector;
106- (Vector) rightVector;
107- (Vector) upVector;
108
109- (OOColor *)scannerDisplayColor1;
110- (OOColor *)scannerDisplayColor2;
111- (void)setScannerDisplayColor1:(OOColor *)color;
112- (void)setScannerDisplayColor2:(OOColor *)color;
113- (GLfloat *) scannerDisplayColorForShip:(BOOL)flash :(OOColor *)scannerDisplayColor1 :(OOColor *)scannerDisplayColor2;
114
115- (void) setScript:(NSString *)script_name;
116- (OOJSScript *)script;
117- (NSDictionary *)scriptInfo;
118- (void) doScriptEvent:(jsid)message;
119- (void) remove;
120
121- (GLfloat) scaleMax; // used for calculating frustum cull size
122- (GLfloat) scaleX;
123- (void) setScaleX:(GLfloat)factor;
124- (GLfloat) scaleY;
125- (void) setScaleY:(GLfloat)factor;
126- (GLfloat) scaleZ;
127- (void) setScaleZ:(GLfloat)factor;
128
129// convenience for shaders
130- (GLfloat)hullHeatLevel;
131- (void)setHullHeatLevel:(GLfloat)value;
132// shader properties
133- (GLfloat) shaderFloat1;
134- (void)setShaderFloat1:(GLfloat)value;
135- (GLfloat) shaderFloat2;
136- (void)setShaderFloat2:(GLfloat)value;
137- (int) shaderInt1;
138- (void)setShaderInt1:(int)value;
139- (int) shaderInt2;
140- (void)setShaderInt2:(int)value;
141- (Vector) shaderVector1;
142- (void)setShaderVector1:(Vector)value;
143- (Vector) shaderVector2;
144- (void)setShaderVector2:(Vector)value;
145
146
147- (BOOL) isBreakPattern;
148- (void) setIsBreakPattern:(BOOL)bp;
149
150- (NSDictionary *)effectInfoDictionary;
151
152
153@end
id< OOHUDBeaconIcon > _beaconDrawable
OOWeakReference * _prevBeacon
NSDictionary * effectinfoDictionary
NSMutableArray * subEntities
OOWeakReference * _nextBeacon
typedef int(ZCALLBACK *close_file_func) OF((voidpf opaque