Oolite
Loading...
Searching...
No Matches
OOVisualEffectEntity.m
Go to the documentation of this file.
1/*
2
3OOVisualEffectEntity.m
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 impllied 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
27
28#import "OOMaths.h"
30#import "OOShaderMaterial.h"
31#import "Universe.h"
32
34#import "OOConstToJSString.h"
35#import "OOConstToString.h"
36#import "OOStringExpander.h"
37#import "OOStringParsing.h"
38#import "ResourceManager.h"
39
40#import "OOMesh.h"
41
42#import "OOColor.h"
43#import "OOPolygonSprite.h"
44
45#import "OOFlasherEntity.h"
46
47#import "OODebugFlags.h"
48#import "OODebugGLDrawing.h"
49
50#import "OOJSScript.h"
51
53
54#import "MyOpenGLView.h"
55
56@interface OOVisualEffectEntity (Private)
57
58- (void)drawSubEntityImmediate:(bool)immediate translucent:(bool)translucent;
59
60- (void)addSubEntity:(Entity<OOSubEntity>*)subent;
61- (BOOL)setUpOneSubentity:(NSDictionary*)subentDict;
62- (BOOL)setUpOneFlasher:(NSDictionary*)subentDict;
63- (BOOL)setUpOneStandardSubentity:(NSDictionary*)subentDict;
64
65@end
66
67@implementation OOVisualEffectEntity
68
69- (id)init
70{
71 return [self initWithKey:@"" definition:nil];
72}
73
74- (id)initWithKey:(NSString*)key definition:(NSDictionary*)dict
75{
77
78 NSParameterAssert(dict != nil);
79
80 self = [super init];
81 if (self == nil)
82 return nil;
83
84 _effectKey = [key retain];
85
86 if (![self setUpVisualEffectFromDictionary:dict]) {
87 [self release];
88 self = nil;
89 }
90
92
93 return self;
94
96}
97
98- (BOOL)setUpVisualEffectFromDictionary:(NSDictionary*)effectDict
99{
101
104 effectinfoDictionary = [[NSDictionary alloc] init];
105
108
109 collision_radius = 0.0;
110
111 NSString* modelName = [effectDict oo_stringForKey:@"model"];
112 if (modelName != nil) {
113 OOMesh* mesh = [OOMesh meshWithName:modelName
114 cacheKey:_effectKey
115 materialDictionary:[effectDict oo_dictionaryForKey:@"materials"]
116 shadersDictionary:[effectDict oo_dictionaryForKey:@"shaders"]
117 smooth:[effectDict oo_boolForKey:@"smooth" defaultValue:NO]
118 shaderMacros:OODefaultShipShaderMacros()
120 if (mesh == nil)
121 return NO;
122 [self setMesh:mesh];
123 }
124
125 isImmuneToBreakPatternHide = [effectDict oo_boolForKey:@"is_break_pattern"];
126 scaleX = 1.0;
127 scaleY = 1.0;
128 scaleZ = 1.0;
129
130 [self clearSubEntities];
131 [self setUpSubEntities];
132
133 [self setScannerDisplayColor1:nil];
134 [self setScannerDisplayColor2:nil];
135
136 scanClass = CLASS_VISUAL_EFFECT;
137
138 [self setStatus:STATUS_EFFECT];
139
140 _hullHeatLevel = 60.0 / 256.0;
141 _shaderFloat1 = 0.0;
142 _shaderFloat2 = 0.0;
143 _shaderInt1 = 0;
144 _shaderInt2 = 0;
147
148 [self setBeaconCode:[effectDict oo_stringForKey:@"beacon"]];
149 [self setBeaconLabel:[effectDict oo_stringForKey:@"beacon_label" defaultValue:[self beaconCode]]];
150
151 scriptInfo = [[effectDict oo_dictionaryForKey:@"script_info" defaultValue:nil] retain];
152 [self setScript:[effectDict oo_stringForKey:@"script"]];
153
154 return YES;
155
157}
158
174
175- (BOOL)isEffect
176{
177 return YES;
178}
179
181{
182 return YES;
183}
184
186{
187 return NO;
188}
189
191{
192 return (OOMesh*)[self drawable];
193}
194
195- (void)setMesh:(OOMesh*)mesh
196{
197 if (mesh != [self mesh]) {
198 [self setDrawable:mesh];
199 }
200}
201
202- (NSString*)effectKey
203{
204 return _effectKey;
205}
206
208{
209 return [self scaleMax] * _profileRadius;
210}
211
213{
214 [subEntities makeObjectsPerformSelector:@selector(setOwner:) withObject:nil]; // Ensure backlinks are broken
215 [subEntities release];
217
218 // reset size & mass!
219 if ([self mesh]) {
221 } else {
222 collision_radius = 0.0;
223 }
225}
226
228{
229 unsigned int i;
231 NSArray* subs = [effectinfoDictionary oo_arrayForKey:@"subentities"];
232
233 for (i = 0; i < [subs count]; i++) {
234 [self setUpOneSubentity:[subs oo_dictionaryAtIndex:i]];
235 }
236
237 [self setNoDrawDistance];
238
239 return YES;
240}
241
242- (void)removeSubEntity:(Entity<OOSubEntity>*)sub
243{
244 [sub setOwner:nil];
245 [subEntities removeObject:sub];
246}
247
249{
250 GLfloat r = _profileRadius * [self scaleMax];
252}
253
254- (BOOL)setUpOneSubentity:(NSDictionary*)subentDict
255{
256 NSString* type = [subentDict oo_stringForKey:@"type"];
257 if ([type isEqualToString:@"flasher"]) {
258 return [self setUpOneFlasher:subentDict];
259 } else {
260 return [self setUpOneStandardSubentity:subentDict];
261 }
262}
263
264- (BOOL)setUpOneFlasher:(NSDictionary*)subentDict
265{
267 [flasher setPosition:[subentDict oo_hpvectorForKey:@"position"]];
268 [self addSubEntity:flasher];
269 return YES;
270}
271
272- (BOOL)setUpOneStandardSubentity:(NSDictionary*)subentDict
273{
274 OOVisualEffectEntity* subentity = nil;
275 NSString* subentKey = nil;
276 HPVector subPosition;
277 Quaternion subOrientation;
278
279 subentKey = [subentDict oo_stringForKey:@"subentity_key"];
280 if (subentKey == nil) {
281 OOLog(@"setup.visualeffect.badEntry.subentities", @"Failed to set up entity - no subentKey in %@", subentDict);
282 return NO;
283 }
284
285 subentity = [UNIVERSE newVisualEffectWithName:subentKey];
286 if (subentity == nil) {
287 OOLog(@"setup.visualeffect.badEntry.subentities", @"Failed to set up entity %@", subentKey);
288 return NO;
289 }
290
291 subPosition = [subentDict oo_hpvectorForKey:@"position"];
292 subOrientation = [subentDict oo_quaternionForKey:@"orientation"];
293
294 [subentity setPosition:subPosition];
295 [subentity setOrientation:subOrientation];
296
297 [self addSubEntity:subentity];
298
299 [subentity release];
300
301 return YES;
302}
303
304- (void)addSubEntity:(Entity<OOSubEntity>*)sub
305{
306 if (sub == nil)
307 return;
308
309 if (subEntities == nil)
310 subEntities = [[NSMutableArray alloc] init];
311 sub->isSubEntity = YES;
312 // Order matters - need consistent state in setOwner:. -- Ahruman 2008-04-20
313 [subEntities addObject:sub];
314 [sub setOwner:self];
315
316 double distance = HPmagnitude([sub position]) + [sub findCollisionRadius];
317 if (distance > _profileRadius) {
318 _profileRadius = distance;
319 }
320}
321
322- (NSArray*)subEntities
323{
324 return [[subEntities copy] autorelease];
325}
326
327- (NSUInteger)subEntityCount
328{
329 return [subEntities count];
330}
331
333{
334 return [[self subEntities] objectEnumeratorFilteredWithSelector:@selector(isVisualEffect)];
335}
336
337- (BOOL)hasSubEntity:(Entity<OOSubEntity>*)sub
338{
339 return [subEntities containsObject:sub];
340}
341
342- (NSEnumerator*)subEntityEnumerator
343{
344 return [[self subEntities] objectEnumerator];
345}
346
348{
349 return [[self subEntities] objectEnumeratorFilteredWithSelector:@selector(isVisualEffect)];
350}
351
352- (NSEnumerator*)flasherEnumerator
353{
354 return [[self subEntities] objectEnumeratorFilteredWithSelector:@selector(isFlasher)];
355}
356
357- (void)drawSubEntityImmediate:(bool)immediate translucent:(bool)translucent
358{
359 if (cam_zero_distance > no_draw_distance) // this test provides an opportunity to do simple LoD culling
360 {
361 return; // TOO FAR AWAY
362 }
364 // HPVect: camera position
366 OOGLMultModelView(rotMatrix);
367 [self drawImmediate:immediate translucent:translucent];
368
370}
371
372- (void)rescaleBy:(GLfloat)factor
373{
374 if ([self mesh] != nil) {
375 [self setMesh:[[self mesh] meshRescaledBy:factor]];
376 }
377
378 // rescale subentities
380 foreach (se, [self subEntities]) {
381 [se setPosition:HPvector_multiply_scalar([se position], factor)];
382 [se rescaleBy:factor];
383 }
384
385 collision_radius *= factor;
386 _profileRadius *= factor;
387}
388
389- (void)rescaleBy:(GLfloat)factor writeToCache:(BOOL)writeToCache
390{
391 /* Do nothing; this is only needed because of OOEntityWithDrawable
392 implementation requirements */
393}
394
395- (GLfloat)scaleMax
396{
397 GLfloat scale = 1.0;
398 if (scaleX > scaleY) {
399 if (scaleX > scaleZ) {
400 scale *= scaleX;
401 } else {
402 scale *= scaleZ;
403 }
404 } else if (scaleY > scaleZ) {
405 scale *= scaleY;
406 } else {
407 scale *= scaleZ;
408 }
409 return scale;
410}
411
412- (GLfloat)scaleX
413{
414 return scaleX;
415}
416
417- (void)setScaleX:(GLfloat)factor
418{
419 // rescale subentities
421 GLfloat flasher_factor = pow(factor / scaleX, 1.0 / 3.0);
422 foreach (se, [self subEntities]) {
423 HPVector move = [se position];
424 move.x *= factor / scaleX;
425 [se setPosition:move];
426 if ([se isVisualEffect]) {
428 } else {
429 [se rescaleBy:flasher_factor];
430 }
431 }
432
433 scaleX = factor;
434 [self setNoDrawDistance];
435}
436
437- (GLfloat)scaleY
438{
439 return scaleY;
440}
441
442- (void)setScaleY:(GLfloat)factor
443{
444 // rescale subentities
446 GLfloat flasher_factor = pow(factor / scaleY, 1.0 / 3.0);
447 foreach (se, [self subEntities]) {
448 HPVector move = [se position];
449 move.y *= factor / scaleY;
450 [se setPosition:move];
451 if ([se isVisualEffect]) {
453 } else {
454 [se rescaleBy:flasher_factor];
455 }
456 }
457
458 scaleY = factor;
459 [self setNoDrawDistance];
460}
461
462- (GLfloat)scaleZ
463{
464 return scaleZ;
465}
466
467- (void)setScaleZ:(GLfloat)factor
468{
469 // rescale subentities
471 GLfloat flasher_factor = pow(factor / scaleZ, 1.0 / 3.0);
472 foreach (se, [self subEntities]) {
473 HPVector move = [se position];
474 move.z *= factor / scaleZ;
475 [se setPosition:move];
476 if ([se isVisualEffect]) {
478 } else {
479 [se rescaleBy:flasher_factor];
480 }
481 }
482
483 scaleZ = factor;
484 [self setNoDrawDistance];
485}
486
488{
489 return [self scaleMax] * collision_radius;
490}
491
500
501// exposed to shaders
503{
504 return _v_forward;
505}
506
507// exposed to shaders
509{
510 return _v_up;
511}
512
513// exposed to shaders
515{
516 return _v_right;
517}
518
520{
521 return [[scanner_display_color1 retain] autorelease];
522}
523
525{
526 return [[scanner_display_color2 retain] autorelease];
527}
528
529- (void)setScannerDisplayColor1:(OOColor*)color
530{
532
533 if (color == nil)
534 color = [OOColor colorWithDescription:[effectinfoDictionary objectForKey:@"scanner_display_color1"]];
535 scanner_display_color1 = [color retain];
536}
537
538- (void)setScannerDisplayColor2:(OOColor*)color
539{
541
542 if (color == nil)
543 color = [OOColor colorWithDescription:[effectinfoDictionary objectForKey:@"scanner_display_color2"]];
544 scanner_display_color2 = [color retain];
545}
546
547static GLfloat default_color[4] = { 0.0, 0.0, 0.0, 0.0 };
548static GLfloat scripted_color[4] = { 0.0, 0.0, 0.0, 0.0 };
549
550- (GLfloat*)scannerDisplayColorForShip:(BOOL)flash scannerDisplayColor1:(OOColor*)scannerDisplayColor1 scannerDisplayColor2:(OOColor*)scannerDisplayColor2
551{
552
555 [scannerDisplayColor1 getRed:&scripted_color[0] green:&scripted_color[1] blue:&scripted_color[2] alpha:&scripted_color[3]];
556 }
557
559 [scannerDisplayColor2 getRed:&scripted_color[0] green:&scripted_color[1] blue:&scripted_color[2] alpha:&scripted_color[3]];
560 }
561
563 if (flash)
564 [scannerDisplayColor1 getRed:&scripted_color[0] green:&scripted_color[1] blue:&scripted_color[2] alpha:&scripted_color[3]];
565 else
566 [scannerDisplayColor2 getRed:&scripted_color[0] green:&scripted_color[1] blue:&scripted_color[2] alpha:&scripted_color[3]];
567 }
568
569 return scripted_color;
570 }
571
572 return default_color; // transparent black if not specified
573}
574
575- (void)drawImmediate:(bool)immediate translucent:(bool)translucent
576{
578 return; // too far away to draw
579 }
582
583 if ([self mesh] != nil) {
584 [super drawImmediate:immediate translucent:translucent];
585 }
587
588 // Draw subentities.
589 if (!immediate) // TODO: is this relevant any longer?
590 {
591 Entity<OOSubEntity>* subEntity = nil;
592 foreach (subEntity, [self subEntities]) {
593 [subEntity drawSubEntityImmediate:immediate translucent:translucent];
594 }
595 }
596}
597
598- (void)update:(OOTimeDelta)delta_t
599{
600 [super update:delta_t];
601
603 [self doScriptEvent:OOJSID("effectSpawned")];
605 }
606
607 Entity* se = nil;
608 foreach (se, [self subEntities]) {
609 [se update:delta_t];
610 }
611}
612
614{
616}
617
618- (void)setIsBreakPattern:(BOOL)bp
619{
621}
622
623- (NSDictionary*)effectInfoDictionary
624{
626}
627
628/* scripting */
629
630- (void)setScript:(NSString*)script_name
631{
632 NSMutableDictionary* properties = nil;
633
634 properties = [NSMutableDictionary dictionary];
635 [properties setObject:self forKey:@"visualEffect"];
636
637 [script autorelease];
638 script = [OOScript jsScriptFromFileNamed:script_name properties:properties];
639 // does not support legacy scripting
640 if (script == nil) {
641 script = [OOScript jsScriptFromFileNamed:@"oolite-default-effect-script.js" properties:properties];
642 }
643 [script retain];
644}
645
647{
648 return script;
649}
650
651- (NSDictionary*)scriptInfo
652{
653 return (scriptInfo != nil) ? scriptInfo : (NSDictionary*)[NSDictionary dictionary];
654}
655
656// unlikely to need events with arguments
657- (void)doScriptEvent:(OOJSPropID)message
658{
659 JSContext* context = OOJSAcquireContext();
660 [script callMethod:message inContext:context withArguments:NULL count:0 result:NULL];
661 OOJSRelinquishContext(context);
662}
663
664- (void)remove
665{
666 [self doScriptEvent:OOJSID("effectRemoved")];
667 [UNIVERSE removeEntity:(Entity*)self];
668}
669
670/* beacons */
671
672- (NSComparisonResult)compareBeaconCodeWith:(Entity<OOBeaconEntity>*)other
673{
674 return [[self beaconCode] compare:[other beaconCode] options:NSCaseInsensitiveSearch];
675}
676
677- (NSString*)beaconCode
678{
679 return _beaconCode;
680}
681
682- (void)setBeaconCode:(NSString*)bcode
683{
684 if ([bcode length] == 0)
685 bcode = nil;
686
687 if (_beaconCode != bcode) {
688 [_beaconCode release];
689 _beaconCode = [bcode copy];
690
692 }
693 // if not blanking code and label is currently blank, default label to code
694 if (bcode != nil && (_beaconLabel == nil || [_beaconLabel length] == 0)) {
695 [self setBeaconLabel:bcode];
696 }
697}
698
699- (NSString*)beaconLabel
700{
701 return _beaconLabel;
702}
703
704- (void)setBeaconLabel:(NSString*)blabel
705{
706 if ([blabel length] == 0)
707 blabel = nil;
708
709 if (_beaconLabel != blabel) {
710 [_beaconLabel release];
711 _beaconLabel = [OOExpand(blabel) retain];
712 }
713}
714
715- (BOOL)isBeacon
716{
717 return [self beaconCode] != nil;
718}
719
720- (id<OOHUDBeaconIcon>)beaconDrawable
721{
722 if (_beaconDrawable == nil) {
723 NSString* beaconCode = [self beaconCode];
724 NSUInteger length = [beaconCode length];
725
726 if (length > 1) {
727 NSArray* iconData = [[UNIVERSE descriptions] oo_arrayForKey:beaconCode];
728 if (iconData != nil)
729 _beaconDrawable = [[OOPolygonSprite alloc] initWithDataArray:iconData outlineWidth:0.5 name:beaconCode];
730 }
731
732 if (_beaconDrawable == nil) {
733 if (length > 0)
734 _beaconDrawable = [[beaconCode substringToIndex:1] retain];
735 else
736 _beaconDrawable = @"";
737 }
738 }
739
740 return _beaconDrawable;
741}
742
743- (Entity<OOBeaconEntity>*)prevBeacon
744{
746}
747
748- (Entity<OOBeaconEntity>*)nextBeacon
749{
751}
752
753- (void)setPrevBeacon:(Entity<OOBeaconEntity>*)beaconShip
754{
755 if (beaconShip != [self prevBeacon]) {
756 [_prevBeacon release];
757 _prevBeacon = [beaconShip weakRetain];
758 }
759}
760
761- (void)setNextBeacon:(Entity<OOBeaconEntity>*)beaconShip
762{
763 if (beaconShip != [self nextBeacon]) {
764 [_nextBeacon release];
765 _nextBeacon = [beaconShip weakRetain];
766 }
767}
768
770{
771 return NO;
772}
773
774/* Shader bindable uniforms */
775
776// no automatic change of this, but simplifies use of default shader
778{
779 return _hullHeatLevel;
780}
781
782- (void)setHullHeatLevel:(GLfloat)value
783{
785}
786
787- (GLfloat)shaderFloat1
788{
789 return _shaderFloat1;
790}
791
792- (void)setShaderFloat1:(GLfloat)value
793{
794 _shaderFloat1 = value;
795}
796
797- (GLfloat)shaderFloat2
798{
799 return _shaderFloat2;
800}
801
802- (void)setShaderFloat2:(GLfloat)value
803{
804 _shaderFloat2 = value;
805}
806
808{
809 return _shaderInt1;
810}
811
812- (void)setShaderInt1:(int)value
813{
814 _shaderInt1 = value;
815}
816
818{
819 return _shaderInt2;
820}
821
822- (void)setShaderInt2:(int)value
823{
824 _shaderInt2 = value;
825}
826
828{
829 return _shaderVector1;
830}
831
832- (void)setShaderVector1:(Vector)value
833{
834 _shaderVector1 = value;
835}
836
838{
839 return _shaderVector2;
840}
841
842- (void)setShaderVector2:(Vector)value
843{
844 _shaderVector2 = value;
845}
846
847@end
848
849@implementation OOVisualEffectEntity (SubEntityRelationship)
850
851// a slightly misnamed test now things other than ships can have subents
852- (BOOL)isShipWithSubEntityShip:(Entity*)other
853{
854 assert([self isVisualEffect]);
855
856 if (![other isVisualEffect])
857 return NO;
858 if (![other isSubEntity])
859 return NO;
860 if ([other owner] != self)
861 return NO;
862
863#ifndef NDEBUG
864 // Sanity check; this should always be true.
865 if (![self hasSubEntity:(OOVisualEffectEntity*)other]) {
866 OOLogERR(@"visualeffect.subentity.sanityCheck.failed", @"%@ thinks it's a subentity of %@, but the supposed parent does not agree. %@", [other shortDescription], [self shortDescription], @"This is an internal error, please report it.");
867 [other setOwner:nil];
868 return NO;
869 }
870#endif
871
872 return YES;
873}
874
875@end
#define NO_DRAW_DISTANCE_FACTOR
Definition Entity.h:49
OOINLINE float OOClamp_0_1_f(float value) INLINE_CONST_FUNC
#define DESTROY(x)
OOINLINE OOHPScalar HPmagnitude(HPVector vec) INLINE_CONST_FUNC
Definition OOHPVector.h:260
OOINLINE Vector HPVectorToVector(HPVector v) INLINE_CONST_FUNC
Definition OOHPVector.h:175
#define OOJS_PROFILE_EXIT
#define OOJS_PROFILE_ENTER
jsid OOJSPropID
Definition OOJSPropID.h:31
OOINLINE JSContext * OOJSAcquireContext(void)
OOINLINE void OOJSRelinquishContext(JSContext *context)
#define OOLogERR(class, format,...)
Definition OOLogging.h:125
#define OOLog(class, format,...)
Definition OOLogging.h:84
const OOMatrix kIdentityMatrix
Definition OOMatrix.m:28
void OOGLScaleModelView(Vector scale)
void OOGLPushModelView(void)
void OOGLTranslateModelView(Vector vector)
void OOGLMultModelView(OOMatrix matrix)
OOMatrix OOGLPopModelView(void)
return nil
Vector vector_forward_from_quaternion(Quaternion quat) CONST_FUNC
const Quaternion kIdentityQuaternion
Vector vector_up_from_quaternion(Quaternion quat) CONST_FUNC
Vector vector_right_from_quaternion(Quaternion quat) CONST_FUNC
double OOTimeDelta
Definition OOTypes.h:193
OOINLINE Vector make_vector(OOScalar vx, OOScalar vy, OOScalar vz) INLINE_CONST_FUNC
Definition OOVector.h:149
const Vector kZeroVector
Definition OOVector.m:27
OOINLINE OOScalar distance(Vector v1, Vector v2) INLINE_CONST_FUNC
Definition OOVector.h:280
static GLfloat scripted_color[4]
static GLfloat default_color[4]
unsigned isImmuneToBreakPatternHide
Definition Entity.m:1050
GLfloat collision_radius
Definition Entity.h:107
Quaternion orientation
Definition Entity.m:682
unsigned isSubEntity
Definition Entity.m:140
void setOrientation:(Quaternion quat)
Definition Entity.m:676
void update:(OOTimeDelta delta_t)
Definition Entity.m:850
OOScanClass scanClass
Definition Entity.m:743
void setOwner:(Entity *ent)
Definition Entity.m:542
void orientationChanged()
Definition Entity.m:697
void drawSubEntityImmediate:translucent:(bool immediate, [translucent] bool translucent)
GLfloat cam_zero_distance
Definition Entity.h:105
HPVector position
Definition Entity.m:576
GLfloat no_draw_distance
Definition Entity.h:106
OOMatrix rotMatrix
Definition Entity.h:134
id init()
Definition Entity.m:64
void setStatus:(OOEntityStatus stat)
Definition Entity.m:728
void setPosition:(HPVector posn)
Definition Entity.m:608
OOColor * colorWithDescription:(id description)
Definition OOColor.m:135
void getRed:green:blue:alpha:(float *red,[green] float *green,[blue] float *blue,[alpha] float *alpha)
Definition OOColor.m:344
void setDrawable:(OODrawable *drawable)
void drawImmediate:translucent:(bool immediate, [translucent] bool translucent)
instancetype flasherWithDictionary:(NSDictionary *dictionary)
BOOL callMethod:inContext:withArguments:count:result:(jsid methodID,[inContext] JSContext *context,[withArguments] jsval *argv,[count] intN argc,[result] jsval *outResult)
Definition OOJSScript.m:328
OOMesh * meshRescaledBy:(GLfloat scaleFactor)
Definition OOMesh.m:739
instancetype meshWithName:cacheKey:materialDictionary:shadersDictionary:smooth:shaderMacros:shaderBindingTarget:(NSString *name,[cacheKey] NSString *cacheKey,[materialDictionary] NSDictionary *materialDict,[shadersDictionary] NSDictionary *shadersDict,[smooth] BOOL smooth,[shaderMacros] NSDictionary *macros,[shaderBindingTarget] id< OOWeakReferenceSupport > object)
Definition OOMesh.m:223
id jsScriptFromFileNamed:properties:(NSString *fileName,[properties] NSDictionary *properties)
Definition OOScript.m:177
void drawImmediate:translucent:(bool immediate, [translucent] bool translucent)
id< OOHUDBeaconIcon > _beaconDrawable
void setScaleZ:(GLfloat factor)
id initWithKey:definition:(NSString *key,[definition] NSDictionary *dict)
OOWeakReference * _prevBeacon
BOOL setUpOneStandardSubentity:(NSDictionary *subentDict)
BOOL setUpOneSubentity:(NSDictionary *subentDict)
NSEnumerator * flasherEnumerator()
Entity< OOBeaconEntity > * prevBeacon()
Entity< OOBeaconEntity > * nextBeacon()
void setScannerDisplayColor1:(OOColor *color)
void setScannerDisplayColor2:(OOColor *color)
void setScaleY:(GLfloat factor)
void doScriptEvent:(OOJSPropID message)
BOOL setUpOneFlasher:(NSDictionary *subentDict)
void setScaleX:(GLfloat factor)
NSDictionary * effectInfoDictionary()
NSDictionary * effectinfoDictionary
NSEnumerator * visualEffectSubEntityEnumerator()
void setBeaconLabel:(NSString *blabel)
id< OOHUDBeaconIcon > beaconDrawable()
NSEnumerator * subEntityEnumerator()
void setScript:(NSString *script_name)
void addSubEntity:(Entity< OOSubEntity > *sub)
NSEnumerator * effectSubEntityEnumerator()
OOWeakReference * _nextBeacon
void setBeaconCode:(NSString *bcode)
typedef int(ZCALLBACK *close_file_func) OF((voidpf opaque
OOHPScalar x
Definition OOHPVector.h:36
OOHPScalar y
Definition OOHPVector.h:37
OOHPScalar z
Definition OOHPVector.h:38