Oolite
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
27#pragma once
28
29#import "HeadUpDisplay.h"
31#import "OOJSPropID.h"
32#import "OOPlanetEntity.h"
33#import "OOWeakReference.h"
34
36
38@private
39 NSMutableArray* subEntities;
40
41 NSDictionary* effectinfoDictionary;
42
43 GLfloat _profileRadius; // for frustum culling
44
47
55
59
61 NSDictionary* scriptInfo;
62
63 NSString* _effectKey;
64
66
67 // beacons
68 NSString* _beaconCode;
69 NSString* _beaconLabel;
72 id<OOHUDBeaconIcon> _beaconDrawable;
73
74 // scaling
75 GLfloat scaleX;
76 GLfloat scaleY;
77 GLfloat scaleZ;
78}
79
80- (id)initWithKey:(NSString*)key definition:(NSDictionary*)dict;
81- (BOOL)setUpVisualEffectFromDictionary:(NSDictionary*)effectDict;
82
83- (OOMesh*)mesh;
84- (void)setMesh:(OOMesh*)mesh;
85
86- (NSString*)effectKey;
87
88- (GLfloat)frustumRadius;
89
90- (void)clearSubEntities;
91- (BOOL)setUpSubEntities;
92- (void)removeSubEntity:(Entity<OOSubEntity>*)sub;
93- (void)setNoDrawDistance;
94- (NSArray*)subEntities;
95- (NSUInteger)subEntityCount;
96- (NSEnumerator*)visualEffectSubEntityEnumerator;
97- (BOOL)hasSubEntity:(Entity<OOSubEntity>*)sub;
98
99- (NSEnumerator*)subEntityEnumerator;
100- (NSEnumerator*)effectSubEntityEnumerator;
101- (NSEnumerator*)flasherEnumerator;
102
103- (void)orientationChanged;
107
110- (void)setScannerDisplayColor1:(OOColor*)color;
111- (void)setScannerDisplayColor2:(OOColor*)color;
112- (GLfloat*)scannerDisplayColorForShip:(BOOL)flash scannerDisplayColor1:(OOColor*)scannerDisplayColor1 scannerDisplayColor2:(OOColor*)scannerDisplayColor2;
113
114- (void)setScript:(NSString*)script_name;
116- (NSDictionary*)scriptInfo;
117- (void)doScriptEvent:(OOJSPropID)message;
118- (void)remove;
119
120- (GLfloat)scaleMax; // used for calculating frustum cull size
121- (GLfloat)scaleX;
122- (void)setScaleX:(GLfloat)factor;
123- (GLfloat)scaleY;
124- (void)setScaleY:(GLfloat)factor;
125- (GLfloat)scaleZ;
126- (void)setScaleZ:(GLfloat)factor;
127
128// convenience for shaders
129- (GLfloat)hullHeatLevel;
130- (void)setHullHeatLevel:(GLfloat)value;
131// shader properties
132- (GLfloat)shaderFloat1;
133- (void)setShaderFloat1:(GLfloat)value;
134- (GLfloat)shaderFloat2;
135- (void)setShaderFloat2:(GLfloat)value;
136- (int)shaderInt1;
137- (void)setShaderInt1:(int)value;
138- (int)shaderInt2;
139- (void)setShaderInt2:(int)value;
141- (void)setShaderVector1:(Vector)value;
143- (void)setShaderVector2:(Vector)value;
144
145- (BOOL)isBreakPattern;
146- (void)setIsBreakPattern:(BOOL)bp;
147
148- (NSDictionary*)effectInfoDictionary;
149
150@end
jsid OOJSPropID
Definition OOJSPropID.h:31
id< OOHUDBeaconIcon > _beaconDrawable
OOWeakReference * _prevBeacon
NSEnumerator * flasherEnumerator()
NSDictionary * effectInfoDictionary()
NSDictionary * effectinfoDictionary
NSEnumerator * visualEffectSubEntityEnumerator()
NSEnumerator * subEntityEnumerator()
NSEnumerator * effectSubEntityEnumerator()
OOWeakReference * _nextBeacon
typedef int(ZCALLBACK *close_file_func) OF((voidpf opaque