Oolite
Loading...
Searching...
No Matches
CollisionRegion.m
Go to the documentation of this file.
1/*
2
3CollisionRegion.m
4
5Oolite
6Copyright (C) 2004-2013 Giles C Williams and contributors
7
8This program is free software; you can redistribute it and/or
9modify it under the terms of the GNU General Public License
10as published by the Free Software Foundation; either version 2
11of the License, or (at your option) any later version.
12
13This program is distributed in the hope that it will be useful,
14but WITHOUT ANY WARRANTY; without even the implied warranty of
15MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16GNU General Public License for more details.
17
18You should have received a copy of the GNU General Public License
19along with this program; if not, write to the Free Software
20Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
21MA 02110-1301, USA.
22
23*/
24
25#import "CollisionRegion.h"
26#import "Entity.h"
27#import "OODebugFlags.h"
28#import "OOMaths.h"
29#import "OOPlanetEntity.h"
30#import "OOSunEntity.h"
31#import "PlayerEntity.h"
32#import "ShipEntity.h"
33#import "StationEntity.h"
34#import "Universe.h"
35
36static BOOL positionIsWithinRegion(HPVector position, CollisionRegion* region);
37static BOOL sphereIsWithinRegion(HPVector position, GLfloat rad, CollisionRegion* region);
38static BOOL positionIsWithinBorders(HPVector position, CollisionRegion* region);
39
40@implementation CollisionRegion
41
42// basic alloc/ dealloc routines
43//
44static int crid_counter = 1;
45
46- (id)init // Designated initializer.
47{
48 if ((self = [super init])) {
50 entity_array = (Entity**)malloc(max_entities * sizeof(Entity*));
51 if (entity_array == NULL) {
52 [self release];
53 return nil;
54 }
55
57 }
58 return self;
59}
60
62{
63 if ((self = [self init])) {
64 isUniverse = YES;
65 }
66 return self;
67}
68
69- (id)initAtLocation:(HPVector)locn withRadius:(GLfloat)rad withinRegion:(CollisionRegion*)otherRegion
70{
71 if ((self = [self init])) {
72 location = locn;
73 radius = rad;
75 parentRegion = otherRegion;
76 }
77 return self;
78}
79
80- (void)dealloc
81{
82 free(entity_array);
84
85 [super dealloc];
86}
87
88- (NSString*)description
89{
90 return [NSString stringWithFormat:@"<%@ %p>{ID: %d, %zu subregions, %u ents}", [self class], self, crid, [subregions count], n_entities];
91}
92
94{
95 [subregions makeObjectsPerformSelector:@selector(clearSubregions)];
96 [subregions removeAllObjects];
97}
98
99- (void)addSubregionAtPosition:(HPVector)pos withRadius:(GLfloat)rad
100{
101 // check if this can be fitted within any of the subregions
102 //
103 CollisionRegion* sub = nil;
104 foreach (sub, subregions) {
105 if (sphereIsWithinRegion(pos, rad, sub)) {
106 // if it fits, put it in!
108 return;
109 }
110 if (positionIsWithinRegion(pos, sub)) {
111 // crosses the border of this region already - leave it out
112 return;
113 }
114 }
115 // no subregion fit - move on...
116 //
117 sub = [[CollisionRegion alloc] initAtLocation:pos withRadius:rad withinRegion:self];
118 if (subregions == nil)
119 subregions = [[NSMutableArray alloc] initWithCapacity:32];
120 [subregions addObject:sub];
121 [sub release];
122}
123
124// update routines to check if a position is within the radius or within its borders
125//
126static BOOL positionIsWithinRegion(HPVector position, CollisionRegion* region)
127{
128 if (region == nil)
129 return NO;
130 if (region->isUniverse)
131 return YES;
132
133 HPVector loc = region->location;
134 GLfloat r1 = region->radius;
135
136 if ((position.x < loc.x - r1) || (position.x > loc.x + r1) || (position.y < loc.y - r1) || (position.y > loc.y + r1) || (position.z < loc.z - r1) || (position.z > loc.z + r1)) {
137 return NO;
138 }
139
140 return YES;
141}
142
143static BOOL sphereIsWithinRegion(HPVector position, GLfloat rad, CollisionRegion* region)
144{
145 if (region == nil)
146 return NO;
147 if (region->isUniverse)
148 return YES;
149
150 HPVector loc = region->location;
151 GLfloat r1 = region->radius;
152
153 if ((position.x - rad < loc.x - r1) || (position.x + rad > loc.x + r1) || (position.y - rad < loc.y - r1) || (position.y + rad > loc.y + r1) || (position.z - rad < loc.z - r1) || (position.z + rad > loc.z + r1)) {
154 return NO;
155 }
156
157 return YES;
158}
159
161{
162 if (region == nil)
163 return NO;
164 if (region->isUniverse)
165 return YES;
166
167 HPVector loc = region->location;
168 GLfloat r1 = region->radius + region->border_radius;
169
170 if ((position.x < loc.x - r1) || (position.x > loc.x + r1) || (position.y < loc.y - r1) || (position.y > loc.y + r1) || (position.z < loc.z - r1) || (position.z > loc.z + r1)) {
171 return NO;
172 }
173
174 return YES;
175}
176
177// collision checking
178//
180{
181 [subregions makeObjectsPerformSelector:@selector(clearEntityList)];
182 n_entities = 0;
183 isPlayerInRegion = NO;
184}
185
186- (void)addEntity:(Entity*)ent
187{
188 // expand if necessary
189 //
190 if (n_entities == max_entities) {
191 max_entities = 1 + max_entities * 2;
192 Entity** new_store = (Entity**)realloc(entity_array, max_entities * sizeof(Entity*));
193 if (new_store == NULL) {
194 [NSException raise:NSMallocException format:@"Not enough memory to grow collision region member list."];
195 }
196
197 entity_array = new_store;
198 }
199
200 if ([ent isPlayer])
201 isPlayerInRegion = YES;
202 entity_array[n_entities++] = ent;
203}
204
205- (BOOL)checkEntity:(Entity*)ent
206{
207 HPVector position = ent->position;
208
209 // check subregions
210 CollisionRegion* sub = nil;
211 foreach (sub, subregions) {
212 if (positionIsWithinBorders(position, sub) && [sub checkEntity:ent]) {
213 return YES;
214 }
215 }
216
217 if (!positionIsWithinBorders(position, self)) {
218 return NO;
219 }
220
221 [self addEntity:ent];
222 [ent setCollisionRegion:self];
223 return YES;
224}
225
227{
228 // test for collisions in each subregion
229 [subregions makeObjectsPerformSelector:@selector(findCollisions)];
230
231 // reject trivial cases
232 if (n_entities < 2)
233 return;
234
235 //
236 // According to Shark, when this was in Universe this was where Oolite spent most time!
237 //
238 Entity *e1, *e2;
239 HPVector p1;
240 double dist2, r1, r2, r0, min_dist2;
241 unsigned i;
242 Entity* entities_to_test[n_entities];
243
244 // only check unfiltered entities
245 unsigned n_entities_to_test = 0;
246 for (i = 0; i < n_entities; i++) {
247 e1 = entity_array[i];
248 if (e1->collisionTestFilter != 3) {
249 entities_to_test[n_entities_to_test++] = e1;
250 }
251 }
252
253#ifdef OO_DEBUG_MONITOR_ENABLED
255 OOLog(@"collisionRegion.debug", @"DEBUG in collision region %@ testing %d out of %d entities", self, n_entities_to_test, n_entities);
256 }
257#endif
258
259 if (n_entities_to_test < 2)
260 return;
261
262 // clear collision variables
263 //
264 for (i = 0; i < n_entities_to_test; i++) {
265 e1 = entities_to_test[i];
266 if (e1->hasCollided) {
267 [[e1 collisionArray] removeAllObjects];
268 e1->hasCollided = NO;
269 }
270 if (e1->isShip) {
272 }
273 e1->collider = nil;
274 }
275
278
279 // test each entity in this region against the entities in its collision chain
280 //
281 for (i = 0; i < n_entities_to_test; i++) {
282 e1 = entities_to_test[i];
283 p1 = e1->position;
284 r1 = e1->collision_radius;
285
286 // check against the first in the collision chain
287 e2 = e1->collision_chain;
288 while (e2 != nil) {
290 if (e1->isShip && e2->isShip &&
291 [(ShipEntity*)e1 collisionExceptedFor:(ShipEntity*)e2]) {
292 // nothing happens
293 } else {
294
295 r2 = e2->collision_radius;
296 r0 = r1 + r2;
297 dist2 = HPdistance2(e2->position, p1);
298 min_dist2 = r0 * r0;
299 if (dist2 < PROXIMITY_WARN_DISTANCE2 * min_dist2) {
300#ifdef OO_DEBUG_MONITOR_ENABLED
302 OOLog(@"collisionRegion.debug", @"DEBUG Testing collision between %@ (%@) and %@ (%@)",
303 e1, (e1->collisionTestFilter == 3) ? @"YES" : @"NO", e2, (e2->collisionTestFilter == 3) ? @"YES" : @"NO");
304 }
305#endif
307
308 if (e1->isShip && e2->isShip) {
309 if ((dist2 < PROXIMITY_WARN_DISTANCE2 * r2 * r2) || (dist2 < PROXIMITY_WARN_DISTANCE2 * r1 * r1)) {
310 [(ShipEntity*)e1 setProximityAlert:(ShipEntity*)e2];
311 [(ShipEntity*)e2 setProximityAlert:(ShipEntity*)e1];
312 }
313
314 if (dist2 >= min_dist2) {
315 if (e1->isStation) {
316 StationEntity* se1 = (StationEntity*)e1;
317 [se1 shipIsInDockingCorridor:(ShipEntity*)e2];
318 } else if (e2->isStation) {
319 StationEntity* se2 = (StationEntity*)e2;
320 [se2 shipIsInDockingCorridor:(ShipEntity*)e1];
321 }
322 }
323 }
324 if (dist2 < min_dist2) {
325 BOOL collision = NO;
326
327 if (e1->isStation) {
328 StationEntity* se1 = (StationEntity*)e1;
329 if ([se1 shipIsInDockingCorridor:(ShipEntity*)e2]) {
330 collision = NO;
331 } else {
332 collision = [e1 checkCloseCollisionWith:e2];
333 }
334 } else if (e2->isStation) {
335 StationEntity* se2 = (StationEntity*)e2;
336 if ([se2 shipIsInDockingCorridor:(ShipEntity*)e1]) {
337 collision = NO;
338 } else {
339 collision = [e2 checkCloseCollisionWith:e1];
340 }
341 } else {
342 collision = [e1 checkCloseCollisionWith:e2];
343 }
344
345 if (collision) {
346 // now we have no need to check the e2-e1 collision
347 if (e1->collider) {
348 [[e1 collisionArray] addObject:e1->collider];
349 } else {
350 [[e1 collisionArray] addObject:e2];
351 }
352 e1->hasCollided = YES;
353
354 if (e2->collider) {
355 [[e2 collisionArray] addObject:e2->collider];
356 } else {
357 [[e2 collisionArray] addObject:e1];
358 }
359 e2->hasCollided = YES;
360 }
361 }
362 }
363 }
364 // check the next in the collision chain
365 e2 = e2->collision_chain;
366 }
367 }
368
369#ifdef OO_DEBUG_MONITOR_ENABLED
371 OOLog(@"collisionRegion.debug", @"Collision test checks %d, within range %d, for %d entities", checks_this_tick, checks_within_range, n_entities_to_test);
372 }
373#endif
374}
375
376// an outValue of 1 means it's just being occluded.
377static BOOL entityByEntityOcclusionToValue(Entity* e1, Entity* e2, OOSunEntity* the_sun, float* outValue)
378{
379 if (EXPECT_NOT(e1 == e2)) {
380 // you can't shade self
381 return NO;
382 }
383 return shadowAtPointOcclusionToValue(e1->position, e1->collision_radius, e2, the_sun, outValue);
384}
385
386// an outValue of 1 means it's just being occluded.
387BOOL shadowAtPointOcclusionToValue(HPVector e1pos, GLfloat e1rad, Entity* e2, OOSunEntity* the_sun, float* outValue)
388{
389 *outValue = 1.5f; // initial 'fully lit' value
390
391 GLfloat cr_e2;
392 if ([e2 isShip]) {
393 cr_e2 = e2->collision_radius * 0.90f;
394 // 10% smaller shadow for ships
395 } else {
396 cr_e2 = e2->collision_radius;
397 }
398 if (cr_e2 < e1rad) {
399 // smaller can't shade bigger
400 return NO;
401 }
402
403 // tested in construction of e2 list
404 // if (e2->isSunlit == NO)
405 // return NO; // things already /in/ shade can't shade things more.
406 //
407 // check projected sizes of discs
408 GLfloat d2_sun = HPdistance2(e1pos, the_sun->position);
409 GLfloat d2_e2sun = HPdistance2(e2->position, the_sun->position);
410 GLfloat d2_e2 = HPdistance2(e1pos, e2->position);
411
412 if (d2_e2sun > d2_sun) {
413 // you are nearer the sun than the potential occluder, so it
414 // probably can't shade you
415 if (d2_e2 < cr_e2 * cr_e2 && [e2 isShip]) {
416 // exception: if within the collision radius of the other
417 // object, might still be shadowed by it.
418 GLfloat bbx = 0.0f, bby = 0.0f, bbz = 0.0f;
420 bounding_box_get_dimensions(bb, &bbx, &bby, &bbz);
421 float minbb = bbx;
422 if (bby < minbb) {
423 minbb = bby;
424 }
425 if (bbz < minbb) {
426 minbb = bbz;
427 }
428 minbb -= e1rad; // subtract object's size
429 /* closer to the object than the shortest axis. This check
430 * branch is basically for docking at a rock hermit facing
431 * away from the sun, but it checks the shortest bounding
432 * box size rather than the collision radius to avoid
433 * getting weird shadowing effects around large planar
434 * entities like the OXP Torus Station.
435 *
436 * Well... more weird shadowing effects than there already
437 * are, anyway.
438 *
439 * There are more accurate ways to check "sphere inside
440 * bounding box" but this seems accurate enough and is
441 * simpler.
442 *
443 * - CIM
444 */
445 if (d2_e2 < minbb * minbb) {
446 *outValue = 0.1;
447 return YES;
448 }
449 }
450 return NO;
451 }
452
453 GLfloat cr_sun = the_sun->collision_radius;
454
455 GLfloat cr2_sun_scaled = cr_sun * cr_sun * d2_e2 / d2_sun;
456 if (cr_e2 * cr_e2 < cr2_sun_scaled) {
457 // if solar disc projected to the distance of e2 > collision radius it can't be shaded by e2
458 return NO;
459 }
460
461 // check angles subtended by sun and occluder
462 // double theta_sun = asin( cr_sun / sqrt(d2_sun)); // 1/2 angle subtended by sun
463 // double theta_e2 = asin( cr_e2 / sqrt(d2_e2)); // 1/2 angle subtended by e2
464 // find the difference between the angles subtended by occluder and sun
465 float d2_e = sqrt(d2_e2);
466 float theta_diff;
467 if (d2_e < cr_e2) {
468 // then we're "inside" the object. Calculate as if we were on
469 // the edge of it to avoid taking asin(x>1)
470 theta_diff = asin(1) - asin(cr_sun / sqrt(d2_sun));
471 } else {
472 theta_diff = asin(cr_e2 / d2_e) - asin(cr_sun / sqrt(d2_sun));
473 }
474
475 HPVector p_sun = the_sun->position;
476 HPVector p_e2 = e2->position;
477 HPVector p_e1 = e1pos;
478 Vector v_sun = HPVectorToVector(HPvector_subtract(p_sun, p_e1));
479 v_sun = vector_normal_or_zbasis(v_sun);
480
481 Vector v_e2 = HPVectorToVector(HPvector_subtract(p_e2, p_e1));
482 v_e2 = vector_normal_or_xbasis(v_e2);
483
484 float phi = acos(dot_product(v_sun, v_e2)); // angle between sun and e2 from e1's viewpoint
485 *outValue = (phi / theta_diff); // 1 means just occluded, < 1 means in shadow
486
487 if (phi > theta_diff) {
488 // sun is not occluded
489 return NO;
490 }
491
492 // all tests done e1 is in shade!
493 return YES;
494}
495
496static inline BOOL testEntityOccludedByEntity(Entity* e1, Entity* e2, OOSunEntity* the_sun)
497{
498 float tmp; // we're not interested in the amount of occlusion just now.
499 return entityByEntityOcclusionToValue(e1, e2, the_sun, &tmp);
500}
501
503{
504 // reject trivial cases
505 if (n_entities < 2)
506 return;
507
508 //
509 // Copy/pasting the collision code to detect occlusion!
510 //
511 unsigned i, j;
512
513 if ([UNIVERSE reducedDetail])
514 return; // don't do this in reduced detail mode
515
516 OOSunEntity* the_sun = [UNIVERSE sun];
517
518 if (the_sun == nil) {
519 return; // sun is required
520 }
521
522 unsigned ent_count = UNIVERSE->n_entities;
523 Entity** uni_entities = UNIVERSE->sortedEntities; // grab the public sorted list
524 Entity* planets[ent_count];
525 unsigned n_planets = 0;
526 Entity* ships[ent_count];
527 unsigned n_ships = 0;
528
529 for (i = 0; i < ent_count; i++) {
530 if (uni_entities[i]->isSunlit) {
531 // get a list of planet entities because they can shade across regions
532 if ([uni_entities[i] isPlanet]) {
533 // don't bother retaining - nothing will happen to them!
534 planets[n_planets++] = uni_entities[i];
535 }
536
537 // and a list of shipentities large enough that they might cast a noticeable shadow
538 // if we can't see it, it can't be shadowing anything important
539 else if ([uni_entities[i] isShip] &&
540 [uni_entities[i] isVisible] && uni_entities[i]->collision_radius >= MINIMUM_SHADOWING_ENTITY_RADIUS) {
541 ships[n_ships++] = uni_entities[i]; // don't bother retaining - nothing will happen to them!
542 }
543 }
544 }
545
546 // test for shadows in each subregion
547 [subregions makeObjectsPerformSelector:@selector(findShadowedEntities)];
548
549 // test each entity in this region against the others
550 for (i = 0; i < n_entities; i++) {
551 Entity* e1 = entity_array[i];
552 if (![e1 isVisible]) {
553 continue; // don't check shading of objects we can't see
554 }
555 BOOL occluder_moved = NO;
556 if ([e1 status] == STATUS_COCKPIT_DISPLAY) {
557 e1->isSunlit = YES;
559 continue; // don't check shading in demo mode
560 }
561 Entity* occluder = nil;
562 if (e1->isSunlit == NO) {
563 occluder = [UNIVERSE entityForUniversalID:e1->shadingEntityID];
564 if (occluder != nil) {
565 occluder_moved = occluder->hasMoved;
566 }
567 }
568 if (([e1 isShip] || [e1 isPlanet]) && (e1->hasMoved || occluder_moved)) {
569 e1->isSunlit = YES; // sunlit by default
571 //
572 // check demo mode here..
573 if ([e1 isPlayer] && ([(PlayerEntity*)e1 showDemoShips])) {
574 continue; // don't check shading in demo mode
575 }
576
577 // test last occluder (most likely case)
578 if (occluder) {
579 if (testEntityOccludedByEntity(e1, occluder, the_sun)) {
580 e1->isSunlit = NO;
582 }
583 }
584 if (!e1->isSunlit) {
585 // no point in continuing tests
586 continue;
587 }
588
589 // test planets
590 for (j = 0; j < n_planets; j++) {
591 float occlusionNumber;
592 if (entityByEntityOcclusionToValue(e1, planets[j], the_sun, &occlusionNumber)) {
593 e1->isSunlit = NO;
595 break;
596 }
597 if ([e1 isPlayer]) {
598 [(PlayerEntity*)e1 setOcclusionLevel:occlusionNumber];
599 }
600 }
601 if (!e1->isSunlit) {
602 // no point in continuing tests
603 continue;
604 }
605
606 // test local entities
607 for (j = 0; j < n_ships; j++) {
608 if (testEntityOccludedByEntity(e1, ships[j], the_sun)) {
609 e1->isSunlit = NO;
611 break;
612 }
613 }
614 }
615 }
616}
617
619{
620 return [NSString stringWithFormat:@"p%u - c%u", checks_this_tick, checks_within_range];
621}
622
623- (NSString*)debugOut
624{
625 NSMutableString* result = [[NSMutableString alloc] initWithFormat:@"%d:", n_entities];
626 CollisionRegion* sub = nil;
627 foreach (sub, subregions) {
628 [result appendString:[sub debugOut]];
629 }
630 return [result autorelease];
631}
632
633@end
#define MINIMUM_SHADOWING_ENTITY_RADIUS
#define COLLISION_MAX_ENTITIES
#define COLLISION_REGION_BORDER_RADIUS
BOOL shadowAtPointOcclusionToValue(HPVector e1pos, GLfloat e1rad, Entity *e2, OOSunEntity *the_sun, float *outValue)
static int crid_counter
static BOOL positionIsWithinBorders(HPVector position, CollisionRegion *region)
static BOOL positionIsWithinRegion(HPVector position, CollisionRegion *region)
static BOOL sphereIsWithinRegion(HPVector position, GLfloat rad, CollisionRegion *region)
OOINLINE void bounding_box_get_dimensions(BoundingBox bb, GLfloat *xSize, GLfloat *ySize, GLfloat *zSize) ALWAYS_INLINE_FUNC
#define gDebugFlags
@ DEBUG_COLLISIONS
Definition OODebugFlags.h:6
#define DESTROY(x)
#define EXPECT_NOT(x)
OOINLINE HPVector HPvector_subtract(HPVector a, HPVector b) INLINE_CONST_FUNC
Definition OOHPVector.h:236
OOINLINE Vector HPVectorToVector(HPVector v) INLINE_CONST_FUNC
Definition OOHPVector.h:175
OOINLINE OOHPScalar HPdistance2(HPVector v1, HPVector v2) INLINE_CONST_FUNC
Definition OOHPVector.h:293
#define OOLog(class, format,...)
Definition OOLogging.h:84
return nil
@ NO_TARGET
Definition OOTypes.h:169
OOINLINE Vector vector_normal_or_zbasis(Vector vec) INLINE_CONST_FUNC
Definition OOVector.h:265
OOINLINE OOScalar dot_product(Vector first, Vector second) INLINE_CONST_FUNC
Definition OOVector.h:299
OOINLINE Vector vector_normal_or_xbasis(Vector vec) INLINE_CONST_FUNC
Definition OOVector.h:255
#define UNIVERSE
Definition Universe.h:827
#define PROXIMITY_WARN_DISTANCE2
Definition Universe.h:100
NSString * description()
NSString * collisionDescription()
void addEntity:(Entity *ent)
NSString * debugOut()
static BOOL positionIsWithinBorders(HPVector position, CollisionRegion *region)
static BOOL positionIsWithinRegion(HPVector position, CollisionRegion *region)
void addSubregionAtPosition:withRadius:(HPVector pos,[withRadius] GLfloat rad)
static BOOL entityByEntityOcclusionToValue(Entity *e1, Entity *e2, OOSunEntity *the_sun, float *outValue)
NSMutableArray * subregions
CollisionRegion * parentRegion
Entity ** entity_array
unsigned checks_this_tick
static BOOL sphereIsWithinRegion(HPVector position, GLfloat rad, CollisionRegion *region)
unsigned checks_within_range
static BOOL testEntityOccludedByEntity(Entity *e1, Entity *e2, OOSunEntity *the_sun)
BOOL shadowAtPointOcclusionToValue(HPVector e1pos, GLfloat e1rad, Entity *e2, OOSunEntity *the_sun, float *outValue)
GLfloat collision_radius
Definition Entity.h:107
OOUniversalID universalID
Definition Entity.m:522
NSMutableArray * collisionArray()
Definition Entity.m:845
unsigned hasMoved
Definition Entity.h:92
unsigned isShip
Definition Entity.m:125
unsigned collisionTestFilter
Definition Entity.h:96
unsigned hasCollided
Definition Entity.h:94
unsigned isStation
Definition Entity.m:135
HPVector position
Definition Entity.m:576
OOUniversalID shadingEntityID
Definition Entity.h:122
BOOL checkCloseCollisionWith:(Entity *other)
Definition Entity.m:883
Entity * collider
Definition Entity.h:124
Entity * collision_chain
Definition Entity.h:120
void setCollisionRegion:(CollisionRegion *region)
Definition Entity.m:510
unsigned isSunlit
Definition Entity.m:160
void setOcclusionLevel:(float level)
BOOL checkCloseCollisionWith:(Entity *other)
BoundingBox totalBoundingBox
void setProximityAlert:(ShipEntity *targetEntity)
BOOL shipIsInDockingCorridor:(ShipEntity *ship)
OOHPScalar x
Definition OOHPVector.h:36
OOHPScalar y
Definition OOHPVector.h:37
OOHPScalar z
Definition OOHPVector.h:38