Oolite 1.91.0.7650-250121-affa790
Loading...
Searching...
No Matches
Entity Class Reference

#include <Entity.h>

+ Inheritance diagram for Entity:
+ Collaboration diagram for Entity:

Instance Methods

(NSUInteger) - sessionID
 
(BOOL) - isShip
 
(BOOL) - isDock
 
(BOOL) - isStation
 
(BOOL) - isSubEntity
 
(BOOL) - isPlayer
 
(BOOL) - isPlanet
 
(BOOL) - isSun
 
(BOOL) - isSunlit
 
(BOOL) - isStellarObject
 
(BOOL) - isSky
 
(BOOL) - isWormhole
 
(BOOL) - isEffect
 
(BOOL) - isVisualEffect
 
(BOOL) - isWaypoint
 
(BOOL) - validForAddToUniverse
 
(void) - addToLinkedLists
 
(void) - removeFromLinkedLists
 
(void) - updateLinkedLists
 
(void) - wasAddedToUniverse
 
(void) - wasRemovedFromUniverse
 
(void) - warnAboutHostiles
 
(CollisionRegion *) - collisionRegion
 
(void) - setCollisionRegion:
 
(void) - setUniversalID:
 
(OOUniversalID- universalID
 
(BOOL) - throwingSparks
 
(void) - setThrowSparks:
 
(void) - throwSparks
 
(void) - setOwner:
 
(id) - owner
 
(ShipEntity *) - parentEntity
 
(ShipEntity *) - rootShipEntity
 
(void) - setPosition:
 
(void) - setPositionX:y:z:
 
(HPVector) - position
 
(Vector) - cameraRelativePosition
 
(GLfloat) - cameraRangeFront
 
(GLfloat) - cameraRangeBack
 
(void) - updateCameraRelativePosition
 
(Vector) - vectorTo:
 
(HPVector) - absolutePositionForSubentity
 
(HPVector) - absolutePositionForSubentityOffset:
 
(double) - zeroDistance
 
(double) - camZeroDistance
 
(NSComparisonResult) - compareZeroDistance:
 
(BoundingBox) - boundingBox
 
(GLfloat) - mass
 
(Quaternion) - orientation
 
(void) - setOrientation:
 
(Quaternion) - normalOrientation
 
(void) - setNormalOrientation:
 
(void) - orientationChanged
 
(void) - setVelocity:
 
(Vector) - velocity
 
(double) - speed
 
(GLfloat) - distanceTravelled
 
(void) - setDistanceTravelled:
 
(void) - setStatus:
 
(OOEntityStatus- status
 
(void) - setScanClass:
 
(OOScanClass- scanClass
 
(void) - setEnergy:
 
(GLfloat) - energy
 
(void) - setMaxEnergy:
 
(GLfloat) - maxEnergy
 
(void) - applyRoll:andClimb:
 
(void) - applyRoll:climb:andYaw:
 
(void) - moveForward:
 
(OOMatrix) - rotationMatrix
 
(OOMatrix) - drawRotationMatrix
 
(OOMatrix) - transformationMatrix
 
(OOMatrix) - drawTransformationMatrix
 
(BOOL) - canCollide
 
(GLfloat) - collisionRadius
 
(GLfloat) - frustumRadius
 
(void) - setCollisionRadius:
 
(NSMutableArray *) - collisionArray
 
(void) - update:
 
(void) - applyVelocity:
 
(BOOL) - checkCloseCollisionWith:
 
(void) - takeEnergyDamage:from:becauseOf:weaponIdentifier:
 
(void) - dumpState
 
(void) - dumpSelfState
 
(double) - findCollisionRadius
 
(void) - drawImmediate:translucent:
 
(BOOL) - isVisible
 
(BOOL) - isInSpace
 
(BOOL) - isImmuneToBreakPatternHide
 
(GLfloat) - universalTime
 
(GLfloat) - spawnTime
 
(GLfloat) - timeElapsedSinceSpawn
 
(void) - setAtmosphereFogging:
 
(OOColor *) - fogUniform
 
(NSString *) - descriptionForObjDumpBasic
 
(NSString *) - descriptionForObjDump
 
(NSSet *) - allTextures
 
(id) - init [implementation]
 
(void) - dealloc [implementation]
 
(NSString *) - descriptionComponents [implementation]
 
(BOOL) - checkLinkedLists [implementation]
 
(id< OOWeakReferenceSupport >) - superShaderBindingTarget [implementation]
 
(Vector) - relativePosition [implementation]
 
(void) - subEntityReallyDied: [implementation]
 
(BOOL) - isBreakPattern
 
(void) - inspect [implementation]
 
(BOOL) - isECMBlast
 
(NSArray *) - debugInspectorModules [implementation]
 
(NSString *) - inspScanClassLine
 
(NSString *) - inspStatusLine
 
(NSString *) - inspRetainCountLine
 
(NSString *) - inspPositionLine
 
(NSString *) - inspVelocityLine
 
(NSString *) - inspOrientationLine
 
(NSString *) - inspEnergyLine
 
(NSString *) - inspOwnerLine
 
(NSString *) - inspTargetLine
 
(NSString *) - inspDescription [implementation]
 
(NSString *) - inspBasicIdentityLine [implementation]
 
(BOOL) - isExhaust
 
(BOOL) - isFlasher
 
(BOOL) - isVisibleToScripts
 
(NSString *) - oo_jsClassName
 
(void) - getJSClass:andPrototype:
 
(void) - deleteJSSelf
 
(jsval) - oo_jsValueInContext: [implementation]
 
(BOOL) - isCascadeWeapon
 
(BOOL) - isPlayerLikeShip
 
(GLfloat) - clock [implementation]
 
(unsigned) - pseudoFixedD100 [implementation]
 
(unsigned) - pseudoFixedD256 [implementation]
 
(unsigned) - systemGovernment [implementation]
 
(unsigned) - systemEconomy [implementation]
 
(unsigned) - systemTechLevel [implementation]
 
(unsigned) - systemPopulation [implementation]
 
(unsigned) - systemProductivity [implementation]
 
(BOOL) - isShipWithSubEntityShip:
 
(void) - drawSubEntityImmediate:translucent: [implementation]
 
- Instance Methods inherited from OOWeakRefObject
(id) - weakSelf
 
(id) - weakRetain [implementation]
 
(void) - weakRefDied: [implementation]
 
- Instance Methods inherited from <OOWeakReferenceSupport>
(id) - OO_RETURNS_RETAINED
 

Public Attributes

OOUniversalID universalID
 
unsigned isShip: 1
 
unsigned isStation: 1
 
unsigned isPlayer: 1
 
unsigned isWormhole: 1
 
unsigned isSubEntity: 1
 
unsigned hasMoved: 1
 
unsigned hasRotated: 1
 
unsigned hasCollided: 1
 
unsigned isSunlit: 1
 
unsigned collisionTestFilter: 2
 
unsigned throw_sparks: 1
 
unsigned isImmuneToBreakPatternHide: 1
 
unsigned isExplicitlyNotMainStation: 1
 
unsigned isVisualEffect: 1
 
OOScanClass scanClass
 
GLfloat zero_distance
 
GLfloat cam_zero_distance
 
GLfloat no_draw_distance
 
GLfloat collision_radius
 
HPVector position
 
Vector cameraRelativePosition
 
Quaternion orientation
 
OOColoratmosphereFogging
 
int zero_index
 
Entityx_previous
 
Entityx_next
 
Entityy_previous
 
Entityy_next
 
Entityz_previous
 
Entityz_next
 
Entitycollision_chain
 
OOUniversalID shadingEntityID
 
Entitycollider
 
CollisionRegioncollisionRegion
 

Protected Attributes

HPVector lastPosition
 
Quaternion lastOrientation
 
GLfloat distanceTravelled
 
OOMatrix rotMatrix
 
Vector velocity
 
GLfloat energy
 
GLfloat maxEnergy
 
BoundingBox boundingBox
 
GLfloat mass
 
NSMutableArray * collidingEntities
 
OOTimeAbsolute spawnTime
 
struct JSObject * _jsSelf
 
- Protected Attributes inherited from OOWeakRefObject
OOWeakReferenceweakSelf
 

Private Attributes

NSUInteger _sessionID
 
OOWeakReference_owner
 
OOEntityStatus _status
 

Detailed Description

Definition at line 78 of file Entity.h.

Method Documentation

◆ absolutePositionForSubentity

- (HPVector) absolutePositionForSubentity

◆ absolutePositionForSubentityOffset:

- (HPVector) absolutePositionForSubentityOffset: (HPVector) offset

Definition at line 675 of file Entity.m.

675 :(HPVector) offset
676{
677 HPVector abspos = HPvector_add(position, OOHPVectorMultiplyMatrix(offset, rotMatrix));
678 Entity *last = nil;
679 Entity *father = [self parentEntity];
680
681 while (father != nil && father != last)
682 {
683 abspos = HPvector_add(OOHPVectorMultiplyMatrix(abspos, [father drawRotationMatrix]), [father position]);
684 last = father;
685 if (![last isSubEntity]) break;
686 father = [father owner];
687 }
688 return abspos;
689}
HPVector OOHPVectorMultiplyMatrix(HPVector v, OOMatrix m)
Definition OOMatrix.m:145
return nil
unsigned isSubEntity
Definition Entity.m:149
HPVector position
Definition Entity.m:612
OOMatrix rotMatrix
Definition Entity.h:138
id owner()
Definition Entity.m:583
OOMatrix drawRotationMatrix()
Definition Entity.m:879
voidpf uLong offset
Definition ioapi.h:140

References drawRotationMatrix, isSubEntity, nil, OOHPVectorMultiplyMatrix(), owner, parentEntity, position, and rotMatrix.

Referenced by absolutePositionForSubentity, Universe::firstShipHitByLaserFromShip:inDirection:offset:gettingRangeFound:, and OOLaserShotEntity::initLaserFromShip:direction:offset:.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ addToLinkedLists

- (void) addToLinkedLists

Definition at line 228 of file Entity.m.

229{
230#ifndef NDEBUG
232 OOLog(kOOLogEntityAddToList, @"DEBUG adding entity %@ to linked lists", self);
233#endif
234 //
235 // insert at the start
236 if (UNIVERSE)
237 {
238 x_previous = nil; x_next = UNIVERSE->x_list_start;
239 // move UP the list
240 while ((x_next)&&(x_next->position.x - x_next->collision_radius < position.x - collision_radius))
241 {
243 x_next = x_next->x_next;
244 }
245 if (x_next) x_next->x_previous = self;
246 if (x_previous) x_previous->x_next = self;
247 else UNIVERSE->x_list_start = self;
248
249 y_previous = nil; y_next = UNIVERSE->y_list_start;
250 // move UP the list
251 while ((y_next)&&(y_next->position.y - y_next->collision_radius < position.y - collision_radius))
252 {
254 y_next = y_next->y_next;
255 }
256 if (y_next) y_next->y_previous = self;
257 if (y_previous) y_previous->y_next = self;
258 else UNIVERSE->y_list_start = self;
259
260 z_previous = nil; z_next = UNIVERSE->z_list_start;
261 // move UP the list
262 while ((z_next)&&(z_next->position.z - z_next->collision_radius < position.z - collision_radius))
263 {
265 z_next = z_next->z_next;
266 }
267 if (z_next) z_next->z_previous = self;
268 if (z_previous) z_previous->z_next = self;
269 else UNIVERSE->z_list_start = self;
270
271 }
272
273#ifndef NDEBUG
275 {
276 if (![self checkLinkedLists])
277 {
278 OOLog(kOOLogEntityAddToListError, @"DEBUG LINKED LISTS - problem encountered while adding %@ to linked lists", self);
279 [UNIVERSE debugDumpEntities];
280 }
281 }
282#endif
283}
NSUInteger gDebugFlags
Definition main.m:7
static NSString *const kOOLogEntityAddToList
Definition Entity.m:49
static NSString *const kOOLogEntityAddToListError
Definition Entity.m:50
@ DEBUG_LINKED_LISTS
Definition OODebugFlags.h:5
#define OOLog(class, format,...)
Definition OOLogging.h:88
#define UNIVERSE
Definition Universe.h:840
GLfloat collision_radius
Definition Entity.h:111
Entity * z_next
Definition Entity.h:122
Entity * z_previous
Definition Entity.h:122
BOOL checkLinkedLists()
Definition Entity.m:333
Entity * x_previous
Definition Entity.h:120
Entity * x_next
Definition Entity.h:120
Entity * y_next
Definition Entity.h:121
Entity * y_previous
Definition Entity.h:121

References addToLinkedLists, checkLinkedLists, collision_radius, DEBUG_LINKED_LISTS, gDebugFlags, kOOLogEntityAddToList, kOOLogEntityAddToListError, nil, OOLog, position, UNIVERSE, x_next, x_previous, y_next, y_previous, z_next, and z_previous.

Referenced by addToLinkedLists, isVisualEffect, and Universe::MaintainLinkedLists.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ allTextures

- (NSSet *) allTextures

Reimplemented in OOEntityWithDrawable, OOLightParticleEntity, OOParticleSystem, and PlanetEntity.

Definition at line 1107 of file Entity.m.

1108{
1109 return nil;
1110}

References allTextures, and nil.

Referenced by allTextures, and spawnTime.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ applyRoll:andClimb:

- (void) applyRoll: (GLfloat) roll
andClimb: (GLfloat) climb 

Reimplemented in PlayerEntity, and ShipEntity.

Definition at line 835 of file Entity.m.

835 :(GLfloat) roll andClimb:(GLfloat) climb
836{
837 if ((roll == 0.0)&&(climb == 0.0)&&(!hasRotated))
838 return;
839
840 if (roll)
842 if (climb)
844
845 [self orientationChanged];
846}
void quaternion_rotate_about_x(Quaternion *quat, OOScalar angle)
void quaternion_rotate_about_z(Quaternion *quat, OOScalar angle)
unsigned hasRotated
Definition Entity.h:97
Quaternion orientation
Definition Entity.m:732

References hasRotated, orientation, orientationChanged, quaternion_rotate_about_x(), and quaternion_rotate_about_z().

+ Here is the call graph for this function:

◆ applyRoll:climb:andYaw:

- (void) applyRoll: (GLfloat) roll
climb: (GLfloat) climb
andYaw: (GLfloat) yaw 

Reimplemented in ShipEntity.

Definition at line 849 of file Entity.m.

849 :(GLfloat) roll climb:(GLfloat) climb andYaw:(GLfloat) yaw
850{
851 if ((roll == 0.0)&&(climb == 0.0)&&(yaw == 0.0)&&(!hasRotated))
852 return;
853
854 if (roll)
856 if (climb)
858 if (yaw)
860
861 [self orientationChanged];
862}
void quaternion_rotate_about_y(Quaternion *quat, OOScalar angle)

References hasRotated, orientation, orientationChanged, quaternion_rotate_about_x(), quaternion_rotate_about_y(), and quaternion_rotate_about_z().

+ Here is the call graph for this function:

◆ applyVelocity:

- (void) applyVelocity: (OOTimeDelta) delta_t

Definition at line 965 of file Entity.m.

965 :(OOTimeDelta)delta_t
966{
967 position = HPvector_add(position, HPvector_multiply_scalar(vectorToHPVector(velocity), delta_t));
968}
double OOTimeDelta
Definition OOTypes.h:224
Vector velocity
Definition Entity.m:763

References position, and velocity.

Referenced by PlayerEntity(OOPrivate)::performAutopilotUpdates:, PlayerEntity(OOPrivate)::performInFlightUpdates:, and update:.

+ Here is the caller graph for this function:

◆ boundingBox

- (BoundingBox) boundingBox

References boundingBox.

◆ cameraRangeBack

- (GLfloat) cameraRangeBack

Reimplemented in SkyEntity.

Definition at line 627 of file Entity.m.

628{
629 return magnitude(cameraRelativePosition) + [self frustumRadius];
630}
return self
Vector cameraRelativePosition
Definition Entity.m:617
GLfloat frustumRadius()
Definition Entity.m:911

References cameraRangeBack, cameraRelativePosition, and frustumRadius.

Referenced by cameraRangeBack, and cameraRelativePosition.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ cameraRangeFront

- (GLfloat) cameraRangeFront

Reimplemented in SkyEntity.

Definition at line 622 of file Entity.m.

623{
624 return magnitude(cameraRelativePosition) - [self frustumRadius];
625}

References cameraRangeFront, cameraRelativePosition, and frustumRadius.

Referenced by cameraRangeFront, and cameraRelativePosition.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ cameraRelativePosition

- (Vector) cameraRelativePosition

References absolutePositionForSubentity, cameraRangeBack, cameraRangeFront, cameraRelativePosition, camZeroDistance, updateCameraRelativePosition, and zeroDistance.

+ Here is the call graph for this function:

◆ camZeroDistance

- (double) camZeroDistance

Definition at line 698 of file Entity.m.

699{
700 return cam_zero_distance;
701}
GLfloat cam_zero_distance
Definition Entity.h:109

References cam_zero_distance, and camZeroDistance.

Referenced by cameraRelativePosition, camZeroDistance, OOLightParticleEntity::drawSubEntityImmediate:translucent:, and update:.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ canCollide

- (BOOL) canCollide

Reimplemented in DustEntity, OOBreakPatternEntity, OOLaserShotEntity, OOLightParticleEntity, OOParticleSystem, OOPlasmaShotEntity, OOQuiriumCascadeEntity, OORingEffectEntity, OOSunEntity, OOVisualEffectEntity, PlanetEntity, PlayerEntity, ShipEntity, SkyEntity, and WormholeEntity.

Definition at line 899 of file Entity.m.

900{
901 return YES;
902}

References canCollide.

Referenced by canCollide, Universe::filterSortedLists, and maxEnergy.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ checkCloseCollisionWith:

- (BOOL) checkCloseCollisionWith: (Entity *) other

Reimplemented in OOParticleSystem, OOPlasmaShotEntity, OOQuiriumCascadeEntity, OOSunEntity, PlanetEntity, ShipEntity, and WormholeEntity.

Definition at line 971 of file Entity.m.

971 :(Entity *)other
972{
973 return other != nil;
974}

References nil.

Referenced by OOSunEntity::checkCloseCollisionWith:, and CollisionRegion::findCollisions.

+ Here is the caller graph for this function:

◆ checkLinkedLists

- (BOOL) checkLinkedLists
implementation

Provided by category Entity(OOPrivate).

Definition at line 333 of file Entity.m.

334{
335 // DEBUG check for loops
336 if (UNIVERSE->n_entities > 0)
337 {
338 int n;
339 Entity *check, *last;
340 //
341 last = nil;
342 //
343 n = UNIVERSE->n_entities;
344 check = UNIVERSE->x_list_start;
345 while ((n--)&&(check))
346 {
347 last = check;
348 check = check->x_next;
349 }
350 if ((check)||(n > 0))
351 {
352 OOLog(kOOLogEntityVerificationError, @"Broken x_next %@ list (%d) ***", UNIVERSE->x_list_start, n);
353 return NO;
354 }
355 //
356 n = UNIVERSE->n_entities;
357 check = last;
358 while ((n--)&&(check)) check = check->x_previous;
359 if ((check)||(n > 0))
360 {
361 OOLog(kOOLogEntityVerificationError, @"Broken x_previous %@ list (%d) ***", UNIVERSE->x_list_start, n);
362 return NO;
363 }
364 //
365 n = UNIVERSE->n_entities;
366 check = UNIVERSE->y_list_start;
367 while ((n--)&&(check))
368 {
369 last = check;
370 check = check->y_next;
371 }
372 if ((check)||(n > 0))
373 {
374 OOLog(kOOLogEntityVerificationError, @"Broken y_next %@ list (%d) ***", UNIVERSE->y_list_start, n);
375 return NO;
376 }
377 //
378 n = UNIVERSE->n_entities;
379 check = last;
380 while ((n--)&&(check)) check = check->y_previous;
381 if ((check)||(n > 0))
382 {
383 OOLog(kOOLogEntityVerificationError, @"Broken y_previous %@ list (%d) ***", UNIVERSE->y_list_start, n);
384 return NO;
385 }
386 //
387 n = UNIVERSE->n_entities;
388 check = UNIVERSE->z_list_start;
389 while ((n--)&&(check))
390 {
391 last = check;
392 check = check->z_next;
393 }
394 if ((check)||(n > 0))
395 {
396 OOLog(kOOLogEntityVerificationError, @"Broken z_next %@ list (%d) ***", UNIVERSE->z_list_start, n);
397 return NO;
398 }
399 //
400 n = UNIVERSE->n_entities;
401 check = last;
402 while ((n--)&&(check)) check = check->z_previous;
403 if ((check)||(n > 0))
404 {
405 OOLog(kOOLogEntityVerificationError, @"Broken z_previous %@ list (%d) ***", UNIVERSE->z_list_start, n);
406 return NO;
407 }
408 }
409 return YES;
410}
static NSString *const kOOLogEntityVerificationError
Definition Entity.m:55

References Entity(OOPrivate)::checkLinkedLists, kOOLogEntityVerificationError, nil, OOLog, UNIVERSE, x_next, x_previous, y_next, y_previous, z_next, and z_previous.

Referenced by addToLinkedLists, Entity(OOPrivate)::checkLinkedLists, removeFromLinkedLists, and updateLinkedLists.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ clock

- (GLfloat) clock
implementation

Provided by category Entity(ShaderBindings).

Definition at line 36 of file EntityShaderBindings.m.

37{
38 return [PLAYER clockTime];
39}

◆ collisionArray

- (NSMutableArray *) collisionArray

Definition at line 923 of file Entity.m.

924{
925 return collidingEntities;
926}
NSMutableArray * collidingEntities
Definition Entity.h:148

References collidingEntities, and collisionArray.

Referenced by ShipEntity::collideWithShip:, collisionArray, CollisionRegion::findCollisions, maxEnergy, and ShipEntity::scoopUpProcess:processEvents:processMessages:.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ collisionRadius

- (GLfloat) collisionRadius

Reimplemented in OOVisualEffectEntity.

Definition at line 905 of file Entity.m.

906{
907 return collision_radius;
908}

References collision_radius, and collisionRadius.

Referenced by Universe::addShipsToRoute:withRole:quantity:routeFraction:asGroup:, ShipEntity::becomeExplosion, ShipEntity::behaviour_land_on_planet:, ShipEntity::behaviour_track_as_turret:, collisionRadius, ShipEntity::dealEnergyDamage:atRange:withBias:, ShipEntity::dealEnergyDamageWithinDesiredRange, ShipEntity::dealMomentumWithinDesiredRange:, DockEntity::dockingInstructionsForShip:, OOEntityWithDrawable::drawImmediate:translucent:, OOFlashEffectEntity::explosionFlashFromEntity:, Universe::firstEntityTargetedByPlayer, OOBigFragmentBurstEntity::fragmentBurstFromEntity:, OOSmallFragmentBurstEntity::fragmentBurstFromEntity:, HeadUpDisplay::hudDrawReticleOnTarget, OOExplosionCloudEntity(OOPrivate)::initExplosionCloudWithEntity:size:andSettings:, OORingEffectEntity::initRingFromEntity:, Universe::makeDemoShipWithRole:spinning:, maxEnergy, PlanetEntity::miniaturize, Universe::safeWitchspaceExitDistance, PlayerEntity::showShipModelWithKey:shipData:personality:factorX:factorY:factorZ:inContext:, WormholeEntity::suckInShip:, and PlayerEntity(OOPrivate)::updateAlertConditionForNearbyEntities.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ collisionRegion

- (CollisionRegion *) collisionRegion

References collisionRegion.

◆ compareZeroDistance:

- (NSComparisonResult) compareZeroDistance: (Entity *) otherEntity

Reimplemented in PlayerEntity.

Definition at line 704 of file Entity.m.

704 :(Entity *)otherEntity
705{
706 if ((otherEntity)&&(zero_distance > otherEntity->zero_distance))
707 return NSOrderedAscending;
708 else
709 return NSOrderedDescending;
710}
GLfloat zero_distance
Definition Entity.h:108

References zero_distance.

◆ dealloc

- (void) dealloc
implementation

Reimplemented from OOWeakRefObject.

Reimplemented in DockEntity, DustEntity, OOEntityWithDrawable, OOExplosionCloudEntity, OOFlasherEntity, OOLaserShotEntity, OOSunEntity, OOVisualEffectEntity, OOWaypointEntity, PlanetEntity, PlayerEntity, ShipEntity, SkyEntity, StationEntity, and WormholeEntity.

Definition at line 101 of file Entity.m.

102{
103 [UNIVERSE ensureEntityReallyRemoved:self];
106 [self deleteJSSelf];
107 [self setOwner:nil];
108 [atmosphereFogging release];
109
110#ifndef NDEBUG
112 gTotalEntityMemory -= [self oo_objectSize];
113#endif
114
115 [super dealloc];
116}
uint32_t gLiveEntityCount
Definition Entity.m:43
size_t gTotalEntityMemory
Definition Entity.m:44
#define DESTROY(x)
Definition OOCocoa.h:77
CollisionRegion * collisionRegion
Definition Entity.m:533

References collidingEntities, collisionRegion, dealloc, OOWeakRefObject::dealloc, deleteJSSelf, DESTROY, gLiveEntityCount, gTotalEntityMemory, and setOwner:.

Referenced by DustEntity::dealloc, dealloc, OOEntityWithDrawable::dealloc, OOExplosionCloudEntity::dealloc, OOFlasherEntity::dealloc, OOLaserShotEntity::dealloc, OOSunEntity::dealloc, OOWaypointEntity::dealloc, PlanetEntity::dealloc, and WormholeEntity::dealloc.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ debugInspectorModules

- (NSArray *) debugInspectorModules
implementation

Reimplemented in ShipEntity.

Provided by category Entity(OOEntityDebugInspectorModule).

Definition at line 65 of file OOEntityDebugInspectorModule.m.

66{
67 return [[super debugInspectorModules] arrayByAddingInspectorModuleOfClass:[OOEntityDebugInspectorModule class]
68 forObject:(id)self];
69}

Referenced by ShipEntity(OOShipDebugInspectorModule)::debugInspectorModules.

+ Here is the caller graph for this function:

◆ deleteJSSelf

- (void) deleteJSSelf

Provided by category Entity(OOJavaScriptExtensions).

Definition at line 95 of file EntityOOJavaScriptExtensions.m.

96{
97 if (_jsSelf != NULL)
98 {
99 _jsSelf = NULL;
100 JSContext *context = OOJSAcquireContext();
101 JS_RemoveObjectRoot(context, &_jsSelf);
102 OOJSRelinquishContext(context);
103
104 [[NSNotificationCenter defaultCenter] removeObserver:self
105 name:kOOJavaScriptEngineWillResetNotification
107 }
108}
OOINLINE JSContext * OOJSAcquireContext(void)
OOINLINE void OOJSRelinquishContext(JSContext *context)
struct JSObject * _jsSelf
Definition Entity.h:152
OOJavaScriptEngine * sharedEngine()

Referenced by dealloc.

+ Here is the caller graph for this function:

◆ descriptionComponents

- (NSString *) descriptionComponents
implementation

Reimplemented in OOLaserShotEntity, OOParticleSystem, OOQuiriumCascadeEntity, OORingEffectEntity, OOSunEntity, PlanetEntity, ShipEntity, StationEntity, and WormholeEntity.

Definition at line 119 of file Entity.m.

120{
121 return [NSString stringWithFormat:@"position: %@ scanClass: %@ status: %@", HPVectorDescription([self position]), OOStringFromScanClass([self scanClass]), OOStringFromEntityStatus([self status])];
122}

References descriptionComponents, position, scanClass, and status.

Referenced by descriptionComponents, OOLaserShotEntity::descriptionComponents, ShipEntity::descriptionComponents, and descriptionForObjDumpBasic.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ descriptionForObjDump

- (NSString *) descriptionForObjDump

Reimplemented in DustEntity, ShipEntity, and SkyEntity.

Definition at line 1097 of file Entity.m.

1098{
1099 NSString *result = [self descriptionForObjDumpBasic];
1100
1101 result = [result stringByAppendingFormat:@" range: %g (visible: %@)", HPdistance([self position], [PLAYER position]), [self isVisible] ? @"yes" : @"no"];
1102
1103 return result;
1104}

References descriptionForObjDump, descriptionForObjDumpBasic, isVisible, and position.

Referenced by descriptionForObjDump, ShipEntity::descriptionForObjDump, and spawnTime.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ descriptionForObjDumpBasic

- (NSString *) descriptionForObjDumpBasic

Definition at line 1087 of file Entity.m.

1088{
1089 NSString *result = [self descriptionComponents];
1090 if (result != nil) result = [NSString stringWithFormat:@"%@ %@", NSStringFromClass([self class]), result];
1091 else result = [self description];
1092
1093 return result;
1094}

References descriptionComponents, descriptionForObjDumpBasic, and nil.

Referenced by DustEntity::descriptionForObjDump, descriptionForObjDump, SkyEntity::descriptionForObjDump, descriptionForObjDumpBasic, and spawnTime.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ distanceTravelled

- (GLfloat) distanceTravelled

References distanceTravelled, and status.

+ Here is the call graph for this function:

◆ drawImmediate:translucent:

- (void) drawImmediate: (bool) immediate
translucent: (bool) translucent 

Reimplemented in DockEntity, DustEntity, OOBreakPatternEntity, OOECMBlastEntity, OOEntityWithDrawable, OOFlasherEntity, OOLaserShotEntity, OOLightParticleEntity, OOParticleSystem, OOQuiriumCascadeEntity, OORingEffectEntity, OOSunEntity, OOVisualEffectEntity, OOWaypointEntity, PlanetEntity, PlayerEntity, ShipEntity, SkyEntity, and WormholeEntity.

Definition at line 984 of file Entity.m.

984 :(bool)immediate translucent:(bool)translucent
985{
987}
#define OOLogGenericSubclassResponsibility()
Definition OOLogging.h:129

References OOLogGenericSubclassResponsibility.

Referenced by Universe::drawUniverse.

+ Here is the caller graph for this function:

◆ drawRotationMatrix

- (OOMatrix) drawRotationMatrix

Reimplemented in PlayerEntity.

Definition at line 879 of file Entity.m.

880{
881 return rotMatrix;
882}

References drawRotationMatrix, and rotMatrix.

Referenced by ShipEntity::absoluteIJKForSubentity, absolutePositionForSubentityOffset:, OOLightParticleEntity::drawImmediate:translucent:, drawRotationMatrix, OOLightParticleEntity::drawSubEntityImmediate:translucent:, ShipEntity::fireTurretCannon:, OOLaserShotEntity::initLaserFromShip:direction:offset:, maxEnergy, and OOLaserShotEntity::update:.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ drawSubEntityImmediate:translucent:

- (void) drawSubEntityImmediate: (bool) immediate
translucent: (bool) translucent 
implementation

Reimplemented in OOExhaustPlumeEntity, OOFlasherEntity, OOLightParticleEntity, OOVisualEffectEntity, and ShipEntity.

Provided by category Entity(SubEntityRelationship).

Definition at line 14864 of file ShipEntity.m.

14864 :(bool)immediate translucent:(bool)translucent
14865{
14866 // Do nothing.
14867}

Referenced by OOVisualEffectEntity::drawImmediate:translucent:, and ShipEntity::drawImmediate:translucent:.

+ Here is the caller graph for this function:

◆ drawTransformationMatrix

- (OOMatrix) drawTransformationMatrix

Reimplemented in PlayerEntity.

Definition at line 892 of file Entity.m.

893{
894 OOMatrix result = rotMatrix;
895 return OOMatrixHPTranslate(result, position);
896}

References drawTransformationMatrix, position, and rotMatrix.

Referenced by drawTransformationMatrix, maxEnergy, and OOExhaustPlumeEntity::resetPlume.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ dumpSelfState

- (void) dumpSelfState

Reimplemented in PlayerEntity, ShipEntity, StationEntity, and WormholeEntity.

Definition at line 1013 of file Entity.m.

1014{
1015 NSMutableArray *flags = nil;
1016 NSString *flagsString = nil;
1017 id owner = [self owner];
1018
1019 if (owner == self) owner = @"self";
1020 else if (owner == nil) owner = @"none";
1021
1022 OOLog(@"dumpState.entity", @"Universal ID: %u", universalID);
1023 OOLog(@"dumpState.entity", @"Scan class: %@", OOStringFromScanClass(scanClass));
1024 OOLog(@"dumpState.entity", @"Status: %@", OOStringFromEntityStatus([self status]));
1025 OOLog(@"dumpState.entity", @"Position: %@", HPVectorDescription(position));
1026 OOLog(@"dumpState.entity", @"Orientation: %@", QuaternionDescription(orientation));
1027 OOLog(@"dumpState.entity", @"Distance travelled: %g", distanceTravelled);
1028 OOLog(@"dumpState.entity", @"Energy: %g of %g", energy, maxEnergy);
1029 OOLog(@"dumpState.entity", @"Mass: %g", mass);
1030 OOLog(@"dumpState.entity", @"Owner: %@", owner);
1031
1032 flags = [NSMutableArray array];
1033 #define ADD_FLAG_IF_SET(x) if (x) { [flags addObject:@#x]; }
1043 flagsString = [flags count] ? [flags componentsJoinedByString:@", "] : (NSString *)@"none";
1044 OOLog(@"dumpState.entity", @"Flags: %@", flagsString);
1045 OOLog(@"dumpState.entity", @"Collision Test Filter: %u", collisionTestFilter);
1046
1047}
NSString * OOStringFromScanClass(OOScanClass scanClass) CONST_FUNC
NSString * OOStringFromEntityStatus(OOEntityStatus status) CONST_FUNC
#define ADD_FLAG_IF_SET(x)
unsigned throw_sparks
Definition Entity.h:101
GLfloat maxEnergy
Definition Entity.m:829
OOUniversalID universalID
Definition Entity.m:552
unsigned hasMoved
Definition Entity.h:96
GLfloat energy
Definition Entity.m:817
unsigned isShip
Definition Entity.m:131
unsigned collisionTestFilter
Definition Entity.h:100
OOScanClass scanClass
Definition Entity.m:805
OOEntityStatus status()
Definition Entity.m:793
unsigned isWormhole
Definition Entity.m:190
GLfloat distanceTravelled
Definition Entity.m:775
unsigned isStation
Definition Entity.m:143
unsigned isPlayer
Definition Entity.m:155
unsigned isSunlit
Definition Entity.m:173
GLfloat mass
Definition Entity.m:719

References ADD_FLAG_IF_SET, collisionTestFilter, distanceTravelled, dumpSelfState, energy, hasMoved, hasRotated, isPlayer, isShip, isStation, isSubEntity, isSunlit, isWormhole, mass, maxEnergy, nil, OOLog, OOStringFromEntityStatus(), OOStringFromScanClass(), orientation, owner, position, scanClass, status, throw_sparks, and universalID.

Referenced by dumpSelfState, ShipEntity::dumpSelfState, WormholeEntity::dumpSelfState, dumpState, and maxEnergy.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ dumpState

- (void) dumpState

Definition at line 996 of file Entity.m.

997{
998 if (OOLogWillDisplayMessagesInClass(@"dumpState"))
999 {
1000 OOLog(@"dumpState", @"State for %@:", self);
1002 OOLogIndent();
1003 @try
1004 {
1005 [self dumpSelfState];
1006 }
1007 @catch (id exception) {}
1009 }
1010}
void OOLogPushIndent(void)
Definition OOLogging.m:316
void OOLogPopIndent(void)
Definition OOLogging.m:340
BOOL OOLogWillDisplayMessagesInClass(NSString *inMessageClass)
Definition OOLogging.m:144
void OOLogIndent(void)
Definition OOLogging.m:366

References dumpSelfState, dumpState, OOLog, OOLogIndent(), OOLogPopIndent(), OOLogPushIndent(), and OOLogWillDisplayMessagesInClass().

Referenced by OODebugController::dumpPlayerStateAction:, dumpState, maxEnergy, and PlayerEntity(OOPrivate)::updateTargeting.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ energy

- (GLfloat) energy

References energy.

◆ findCollisionRadius

- (double) findCollisionRadius

Reimplemented in OOEntityWithDrawable, OOExhaustPlumeEntity, and OOFlasherEntity.

Definition at line 977 of file Entity.m.

978{
980 return 0;
981}

References findCollisionRadius, and OOLogGenericSubclassResponsibility.

Referenced by findCollisionRadius, and maxEnergy.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fogUniform

- (OOColor *) fogUniform

Definition at line 1081 of file Entity.m.

1082{
1083 return [[atmosphereFogging retain] autorelease];
1084}

References fogUniform.

Referenced by fogUniform, and spawnTime.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ frustumRadius

- (GLfloat) frustumRadius

Reimplemented in OOVisualEffectEntity, and ShipEntity.

Definition at line 911 of file Entity.m.

912{
913 return collision_radius;
914}

References collision_radius, and frustumRadius.

Referenced by cameraRangeBack, cameraRangeFront, frustumRadius, and maxEnergy.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getJSClass:andPrototype:

- (void) getJSClass: (JSClass **) outClass
andPrototype: (JSObject **) outPrototype 

Reimplemented in DockEntity, OOExhaustPlumeEntity, OOFlasherEntity, OOSunEntity, OOVisualEffectEntity, OOWaypointEntity, ShipEntity, StationEntity, and WormholeEntity.

Provided by category Entity(OOJavaScriptExtensions).

Definition at line 88 of file EntityOOJavaScriptExtensions.m.

88 :(JSClass **)outClass andPrototype:(JSObject **)outPrototype
89{
90 *outClass = JSEntityClass();
91 *outPrototype = JSEntityPrototype();
92}
OOINLINE JSClass * JSEntityClass(void)
Definition OOJSEntity.h:42
OOINLINE JSObject * JSEntityPrototype(void)
Definition OOJSEntity.h:43

Referenced by Entity(OOJavaScriptExtensions)::oo_jsValueInContext:.

+ Here is the caller graph for this function:

◆ init

- (id) init
implementation

Reimplemented in DustEntity, OOParticleSystem, OOSunEntity, OOVisualEffectEntity, PlanetEntity, PlayerEntity, ShipEntity, and WormholeEntity.

Definition at line 68 of file Entity.m.

69{
70 self = [super init];
71 if (EXPECT_NOT(self == nil)) return nil;
72
73 _sessionID = [UNIVERSE sessionID];
74
78
79 no_draw_distance = 100000.0; // 10 km
80
81 collidingEntities = [[NSMutableArray alloc] init];
82
83 scanClass = CLASS_NOT_SET;
84 [self setStatus:STATUS_COCKPIT_DISPLAY];
85
86 spawnTime = [UNIVERSE getTime];
87
88 isSunlit = YES;
89
90 atmosphereFogging = [[OOColor colorWithRed: 0.0 green: 0.0 blue: 0.0 alpha: 0.0] retain];
91
92#ifndef NDEBUG
94 gTotalEntityMemory += [self oo_objectSize];
95#endif
96
97 return self;
98}
#define EXPECT_NOT(x)
const HPVector kZeroHPVector
Definition OOHPVector.m:28
const OOMatrix kIdentityMatrix
Definition OOMatrix.m:31
const Quaternion kIdentityQuaternion
OOColor * atmosphereFogging
Definition Entity.h:115
OOTimeAbsolute spawnTime
Definition Entity.m:1063
NSUInteger _sessionID
Definition Entity.h:155
GLfloat no_draw_distance
Definition Entity.h:110
OOColor * colorWithRed:green:blue:alpha:(float red,[green] float green,[blue] float blue,[alpha] float alpha)
Definition OOColor.m:95

References _sessionID, atmosphereFogging, collidingEntities, OOColor::colorWithRed:green:blue:alpha:, EXPECT_NOT, gLiveEntityCount, gTotalEntityMemory, init, isSunlit, kIdentityMatrix, kIdentityQuaternion, kZeroHPVector, nil, no_draw_distance, orientation, position, rotMatrix, scanClass, setStatus:, and spawnTime.

Referenced by DustEntity::init, init, PlanetEntity(OOPrivate)::initAsAtmosphereForPlanet:dictionary:, ShipEntity(Hax)::initBypassForPlayer, OOExhaustPlumeEntity::initForShip:withDefinition:andScale:, PlanetEntity::initFromDictionary:withAtmosphere:andSeed:, OOECMBlastEntity::initFromShip:, OOLaserShotEntity::initLaserFromShip:direction:offset:, OOQuiriumCascadeEntity::initQuiriumCascadeFromShip:, OORingEffectEntity::initRingFromEntity:, OOSunEntity::initSunWithColor:andDictionary:, SkyEntity::initWithColors:col1:andSystemInfo:, OOLightParticleEntity::initWithDiameter:, OOWaypointEntity::initWithDictionary:, OOVisualEffectEntity::initWithKey:definition:, ShipEntity::initWithKey:definition:, and OOBreakPatternEntity::initWithPolygonSides:startAngle:aspectRatio:.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ inspBasicIdentityLine

- (NSString *) inspBasicIdentityLine
implementation

Provided by category Entity(OOEntityInspectorExtensions).

Definition at line 95 of file OOEntityInspectorExtensions.m.

96{
97 OOUniversalID myID = [self universalID];
98
99 if (myID != NO_TARGET)
100 {
101 return [NSString stringWithFormat:@"%@ ID %u", [self class], myID];
102 }
103 else
104 {
105 return [self className];
106 }
107}
@ NO_TARGET
Definition OOTypes.h:194
uint16_t OOUniversalID
Definition OOTypes.h:189

Referenced by AI(OOAIDebugInspectorModule)::inspBasicIdentityLine.

+ Here is the caller graph for this function:

◆ inspDescription

- (NSString *) inspDescription
implementation

Reimplemented in PlayerEntity, and ShipEntity.

Provided by category Entity(OOEntityInspectorExtensions).

Definition at line 89 of file OOEntityInspectorExtensions.m.

90{
91 return [NSString stringWithFormat:@"%@ ID %u", [self class], [self universalID]];
92}

◆ inspect

- (void) inspect
implementation

Provided by category Entity(OODebugInspector).

Referenced by ConsoleInspectEntity(), and OOShipGroupDebugInspectorModule::inspectLeader:.

+ Here is the caller graph for this function:

◆ inspEnergyLine

- (NSString *) inspEnergyLine

Provided by category Entity(OOEntityInspectorExtensions).

Definition at line 149 of file OOEntityInspectorExtensions.m.

150{
151 return [NSString stringWithFormat:@"%i/%i", (int)[self energy], (int)[self maxEnergy]];
152}

◆ inspOrientationLine

- (NSString *) inspOrientationLine

Provided by category Entity(OOEntityInspectorExtensions).

Definition at line 142 of file OOEntityInspectorExtensions.m.

143{
144 Quaternion q = [self orientation];
145 return [NSString stringWithFormat:@"%.3f (%.3f, %.3f, %.3f)", q.w, q.x, q.y, q.z];
146}

◆ inspOwnerLine

- (NSString *) inspOwnerLine

Provided by category Entity(OOEntityInspectorExtensions).

Definition at line 155 of file OOEntityInspectorExtensions.m.

156{
157 if ([self owner] == self) return @"Self";
158 return [[self owner] inspDescription];
159}

◆ inspPositionLine

- (NSString *) inspPositionLine

Provided by category Entity(OOEntityInspectorExtensions).

Definition at line 128 of file OOEntityInspectorExtensions.m.

129{
130 HPVector v = [self position];
131 return [NSString stringWithFormat:@"%.0f, %.0f, %.0f", v.x, v.y, v.z];
132}

◆ inspRetainCountLine

- (NSString *) inspRetainCountLine

Provided by category Entity(OOEntityInspectorExtensions).

Definition at line 122 of file OOEntityInspectorExtensions.m.

123{
124 return [NSString stringWithFormat:@"%lu", [self retainCount]];
125}

◆ inspScanClassLine

- (NSString *) inspScanClassLine

Provided by category Entity(OOEntityInspectorExtensions).

Definition at line 110 of file OOEntityInspectorExtensions.m.

111{
112 return OOStringFromScanClass([self scanClass]);
113}

◆ inspStatusLine

- (NSString *) inspStatusLine

Provided by category Entity(OOEntityInspectorExtensions).

Definition at line 116 of file OOEntityInspectorExtensions.m.

117{
118 return OOStringFromEntityStatus([self status]);
119}

◆ inspTargetLine

- (NSString *) inspTargetLine

Reimplemented in ShipEntity.

Provided by category Entity(OOEntityInspectorExtensions).

Definition at line 162 of file OOEntityInspectorExtensions.m.

163{
164 return nil;
165}

◆ inspVelocityLine

- (NSString *) inspVelocityLine

Provided by category Entity(OOEntityInspectorExtensions).

Definition at line 135 of file OOEntityInspectorExtensions.m.

136{
137 Vector v = [self velocity];
138 return [NSString stringWithFormat:@"%.1f, %.1f, %.1f (%.1f)", v.x, v.y, v.z, magnitude(v)];
139}

◆ isBreakPattern

- (BOOL) isBreakPattern

Reimplemented in OOBreakPatternEntity, and OOVisualEffectEntity.

Provided by category Entity(OOBreakPatternEntity).

Definition at line 179 of file OOBreakPatternEntity.m.

180{
181 return NO;
182}

◆ isCascadeWeapon

- (BOOL) isCascadeWeapon

Reimplemented in OOQuiriumCascadeEntity.

Provided by category Entity(OOQuiriumCascadeExtensions).

Definition at line 175 of file OOQuiriumCascadeEntity.m.

176{
177 return NO;
178}

Referenced by PlayerEntity::takeEnergyDamage:from:becauseOf:weaponIdentifier:, ShipEntity::takeEnergyDamage:from:becauseOf:weaponIdentifier:, and StationEntity::takeEnergyDamage:from:becauseOf:weaponIdentifier:.

+ Here is the caller graph for this function:

◆ isDock

- (BOOL) isDock

Reimplemented in DockEntity.

Definition at line 137 of file Entity.m.

138{
139 return NO;
140}

References isDock.

Referenced by isDock, and isShip.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ isECMBlast

- (BOOL) isECMBlast

Reimplemented in OOECMBlastEntity.

Provided by category Entity(OOECMBlastEntity).

Definition at line 130 of file OOECMBlastEntity.m.

131{
132 return NO;
133}

◆ isEffect

- (BOOL) isEffect

Reimplemented in OOLaserShotEntity, OOLightParticleEntity, OOParticleSystem, OOQuiriumCascadeEntity, OORingEffectEntity, OOVisualEffectEntity, and OOWaypointEntity.

Definition at line 196 of file Entity.m.

197{
198 return NO;
199}

References isEffect.

Referenced by OOParticleSystem::checkCloseCollisionWith:, OOPlasmaShotEntity::checkCloseCollisionWith:, WormholeEntity::checkCloseCollisionWith:, isEffect, and isWormhole.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ isExhaust

- (BOOL) isExhaust

Reimplemented in OOExhaustPlumeEntity.

Provided by category Entity(OOExhaustPlume).

Definition at line 672 of file OOExhaustPlumeEntity.m.

673{
674 return NO;
675}

◆ isFlasher

- (BOOL) isFlasher

Reimplemented in OOFlasherEntity.

Provided by category Entity(OOFlasherEntityExtensions).

Definition at line 249 of file OOFlasherEntity.m.

250{
251 return NO;
252}

◆ isImmuneToBreakPatternHide

- (BOOL) isImmuneToBreakPatternHide

References isImmuneToBreakPatternHide, and universalTime.

+ Here is the call graph for this function:

◆ isInSpace

- (BOOL) isInSpace

Definition at line 1120 of file Entity.m.

1121{
1122 switch ([self status])
1123 {
1124 case STATUS_IN_FLIGHT:
1125 case STATUS_DOCKING:
1126 case STATUS_LAUNCHING:
1127 case STATUS_AUTOPILOT_ENGAGED:
1128 case STATUS_WITCHSPACE_COUNTDOWN:
1129 case STATUS_BEING_SCOOPED:
1130 case STATUS_EFFECT:
1131 case STATUS_ACTIVE:
1132 return YES;
1133 default:
1134 return NO;
1135 }
1136}

References isInSpace, and status.

Referenced by ShipEntity::dealMomentumWithinDesiredRange:, isInSpace, maxEnergy, PlayerEntity::moveTargetMemoryBy:, and PlayerEntity::validateCompassTarget.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ isPlanet

- (BOOL) isPlanet

Reimplemented in PlanetEntity.

Definition at line 161 of file Entity.m.

162{
163 return NO;
164}

References isPlanet.

Referenced by ShipEntity::behaviour_land_on_planet:, isPlanet, isPlayer, isStellarObject, and PlayerEntity::lookingAtSunWithThresholdAngleCos:.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ isPlayer

- (BOOL) isPlayer

References isPlanet, isPlayer, and isSun.

+ Here is the call graph for this function:

◆ isPlayerLikeShip

- (BOOL) isPlayerLikeShip

Reimplemented in PlayerEntity, and ProxyPlayerEntity.

Provided by category Entity(ProxyPlayer).

Definition at line 215 of file ProxyPlayerEntity.m.

216{
217 return NO;
218}

◆ isShip

- (BOOL) isShip

References isDock, and isShip.

+ Here is the call graph for this function:

◆ isShipWithSubEntityShip:

- (BOOL) isShipWithSubEntityShip: (Entity *) other

Reimplemented in OOVisualEffectEntity, and ShipEntity.

Provided by category Entity(SubEntityRelationship).

Definition at line 14858 of file ShipEntity.m.

14858 :(Entity *)other
14859{
14860 return NO;
14861}

◆ isSky

- (BOOL) isSky

Reimplemented in SkyEntity.

Definition at line 185 of file Entity.m.

186{
187 return NO;
188}

References isSky.

Referenced by isSky, and isSunlit.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ isStation

- (BOOL) isStation

References isStation.

◆ isStellarObject

- (BOOL) isStellarObject

Definition at line 179 of file Entity.m.

180{
181 return [self isPlanet] || [self isSun];
182}

References isPlanet, isStellarObject, and isSun.

Referenced by Universe::drawUniverse, isStellarObject, isSunlit, and ShipEntity::manageCollisions.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ isSubEntity

- (BOOL) isSubEntity

References isSubEntity.

◆ isSun

- (BOOL) isSun

Reimplemented in OOSunEntity.

Definition at line 167 of file Entity.m.

168{
169 return NO;
170}

References isSun.

Referenced by PlayerEntity(OOPrivate)::checkEntityForMassLock:withScanClass:, ShipEntity::checkForAegis, isPlayer, isStellarObject, isSun, IsSunPredicate(), and ShipEntity::manageCollisions.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ isSunlit

- (BOOL) isSunlit

References isSky, isStellarObject, and isSunlit.

+ Here is the call graph for this function:

◆ isVisible

- (BOOL) isVisible

Reimplemented in OOSunEntity, PlanetEntity, ShipEntity, and SkyEntity.

Definition at line 1114 of file Entity.m.

1115{
1117}
#define ABSOLUTE_NO_DRAW_DISTANCE2
Definition Entity.h:47

References ABSOLUTE_NO_DRAW_DISTANCE2, cam_zero_distance, and isVisible.

Referenced by descriptionForObjDump, isVisible, maxEnergy, and OOExhaustPlumeEntity::update:.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ isVisibleToScripts

- (BOOL) isVisibleToScripts

Reimplemented in OOExhaustPlumeEntity, OOFlasherEntity, OOSunEntity, OOVisualEffectEntity, OOWaypointEntity, ShipEntity, and WormholeEntity.

Provided by category Entity(OOJavaScriptExtensions).

Definition at line 42 of file EntityOOJavaScriptExtensions.m.

43{
44 return NO;
45}

Referenced by JSEntityIsJavaScriptVisiblePredicate().

+ Here is the caller graph for this function:

◆ isVisualEffect

- (BOOL) isVisualEffect

Reimplemented in OOVisualEffectEntity.

References addToLinkedLists, isVisualEffect, isWaypoint, removeFromLinkedLists, updateLinkedLists, validForAddToUniverse, warnAboutHostiles, wasAddedToUniverse, and wasRemovedFromUniverse.

+ Here is the call graph for this function:

◆ isWaypoint

- (BOOL) isWaypoint

Reimplemented in OOWaypointEntity.

Definition at line 208 of file Entity.m.

209{
210 return NO;
211}

References isWaypoint.

Referenced by isVisualEffect, and isWaypoint.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ isWormhole

- (BOOL) isWormhole

References isEffect, and isWormhole.

+ Here is the call graph for this function:

◆ mass

- (GLfloat) mass

References mass.

◆ maxEnergy

- (GLfloat) maxEnergy

References canCollide, collisionArray, collisionRadius, drawRotationMatrix, drawTransformationMatrix, dumpSelfState, dumpState, findCollisionRadius, frustumRadius, isInSpace, isVisible, maxEnergy, rotationMatrix, and transformationMatrix.

+ Here is the call graph for this function:

◆ moveForward:

- (void) moveForward: (double) amount

Reimplemented in PlayerEntity.

Definition at line 865 of file Entity.m.

865 :(double)amount
866{
867 HPVector forward = HPvector_multiply_scalar(HPvector_forward_from_quaternion(orientation), amount);
868 position = HPvector_add(position, forward);
869 distanceTravelled += amount;
870}
HPVector HPvector_forward_from_quaternion(Quaternion quat)

References distanceTravelled, HPvector_forward_from_quaternion(), orientation, and position.

Referenced by ShipEntity::applyThrust:.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ normalOrientation

- (Quaternion) normalOrientation

Reimplemented in PlayerEntity.

Definition at line 738 of file Entity.m.

739{
740 return [self orientation];
741}

References normalOrientation, and orientation.

Referenced by ShipEntity::absoluteTractorPosition, ShipEntity::ballTrackLeadingTarget:atTarget:, ShipEntity::becomeExplosion, ShipEntity::dumpItem:, ShipEntity::fireMissileWithIdentifier:andTarget:, Universe::firstShipHitByLaserFromShip:inDirection:offset:gettingRangeFound:, OOLaserShotEntity::initLaserFromShip:direction:offset:, normalOrientation, orientation, ShipEntity(LoadRestore)::savedShipDictionaryWithContext:, OOExhaustPlumeEntity(Private)::saveToLastFrame, ShipEntity::throwSparks, OOExhaustPlumeEntity::update:, and OOLaserShotEntity::update:.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ oo_jsClassName

- (NSString *) oo_jsClassName

◆ oo_jsValueInContext:

- (jsval) oo_jsValueInContext: (JSContext *) context
implementation

Provided by category Entity(OOJavaScriptExtensions).

Definition at line 54 of file EntityOOJavaScriptExtensions.m.

54 :(JSContext *)context
55{
56 JSClass *class = NULL;
57 JSObject *prototype = NULL;
58 jsval result = JSVAL_NULL;
59
60 if (_jsSelf == NULL && [self isVisibleToScripts])
61 {
62 // Create JS object
63 [self getJSClass:&class andPrototype:&prototype];
64
65 _jsSelf = JS_NewObject(context, class, prototype, NULL);
66 if (_jsSelf != NULL)
67 {
68 if (!JS_SetPrivate(context, _jsSelf, OOConsumeReference([self weakRetain]))) _jsSelf = NULL;
69 }
70
71 if (_jsSelf != NULL)
72 {
73 OOJSAddGCObjectRoot(context, &_jsSelf, "Entity jsSelf");
74 [[NSNotificationCenter defaultCenter] addObserver:self
75 selector:@selector(deleteJSSelf)
76 name:kOOJavaScriptEngineWillResetNotification
78 }
79 }
80
81 if (_jsSelf != NULL) result = OBJECT_TO_JSVAL(_jsSelf);
82
83 return result;
84 // Analyzer: object leaked. [Expected, object is retained by JS object.]
85}
id OOConsumeReference(id OO_NS_CONSUMED value)
Definition OOCocoa.m:93
#define OOJSAddGCObjectRoot(context, root, name)

Referenced by JSFunctionPredicate(), and MissionRunScreen().

+ Here is the caller graph for this function:

◆ orientation

- (Quaternion) orientation

References normalOrientation, orientation, and orientationChanged.

+ Here is the call graph for this function:

◆ orientationChanged

- (void) orientationChanged

Reimplemented in OOVisualEffectEntity, PlayerEntity, and ShipEntity.

Definition at line 750 of file Entity.m.

751{
752 quaternion_normalize(&orientation);
754}
OOMatrix OOMatrixForQuaternionRotation(Quaternion orientation)
Definition OOMatrix.m:65

References OOMatrixForQuaternionRotation(), orientation, orientationChanged, and rotMatrix.

Referenced by applyRoll:andClimb:, applyRoll:climb:andYaw:, orientation, orientationChanged, OOVisualEffectEntity::orientationChanged, ShipEntity::orientationChanged, setOrientation:, and PlanetEntity::update:.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ owner

- (id) owner

Definition at line 583 of file Entity.m.

584{
585 return [_owner weakRefUnderlyingObject];
586}

References owner, and OOWeakReference::weakRefUnderlyingObject.

Referenced by ShipEntity::abandonShip, ShipEntity::absoluteIJKForSubentity, absolutePositionForSubentityOffset:, ShipEntity::adjustMissedShots:, ShipEntity::ballTrackLeadingTarget:atTarget:, ShipEntity::behaviour_formation_form_up:, ShipEntity::behaviour_track_as_turret:, ShipEntity::behaviour_tractored:, OOParticleSystem::checkCloseCollisionWith:, OOPlasmaShotEntity::checkCloseCollisionWith:, ShipEntity::dealEnergyDamage:atRange:withBias:, ShipEntity::dealEnergyDamageWithinDesiredRange, ShipEntity::dockEscorts, OOLightParticleEntity::drawImmediate:translucent:, ShipEntity::drawImmediate:translucent:, OOExhaustPlumeEntity::drawSubEntityImmediate:translucent:, OOLightParticleEntity::drawSubEntityImmediate:translucent:, dumpSelfState, EntityGetProperty(), ShipEntity(PureAI)::escortCheckMother, ExhaustPlumeRemove(), ShipEntity(PureAI)::fightOrFleeMissile, ShipEntity::fireMissileWithIdentifier:andTarget:, ShipEntity::fireSubentityLaserShot:, ShipEntity::fireTurretCannon:, FlasherRemove(), OOQuiriumCascadeEntity::initQuiriumCascadeFromShip:, Entity(OOEntityInspectorExtensions)::inspOwnerLine, ShipEntity(PureAI)::messageMother:, ShipEntity::missedShots, owner, parentEntity, OOExhaustPlumeEntity::resetPlume, OOExhaustPlumeEntity(Private)::saveToLastFrame, ShipEntity(Private)::setUpOneEscort:inGroup:withRole:atPosition:andCount:, DockEntity::shipIsInDockingQueue:, ShipEntity(ScriptMethods)::spawnShipsWithRole:count:, PlayerEntity::takeEnergyDamage:from:becauseOf:weaponIdentifier:, ShipEntity::takeEnergyDamage:from:becauseOf:weaponIdentifier:, ShipEntity::takeHeatDamage:, ShipEntity(PureAI)::thargonCheckMother, universalID, update:, OOExhaustPlumeEntity::update:, OOLaserShotEntity::update:, OOPlasmaShotEntity::update:, OOQuiriumCascadeEntity::update:, ShipEntity::update:, and VisualEffectRemove().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ parentEntity

◆ position

- (HPVector) position

References position.

◆ pseudoFixedD100

- (unsigned) pseudoFixedD100
implementation

Provided by category Entity(ShaderBindings).

Definition at line 43 of file EntityShaderBindings.m.

44{
45 return [PLAYER systemPseudoRandom100];
46}

◆ pseudoFixedD256

- (unsigned) pseudoFixedD256
implementation

Provided by category Entity(ShaderBindings).

Definition at line 48 of file EntityShaderBindings.m.

49{
50 return [PLAYER systemPseudoRandom256];
51}

◆ relativePosition

- (Vector) relativePosition
implementation

Definition at line 636 of file Entity.m.

637{
638 return HPVectorToVector(HPvector_subtract([self position], [PLAYER position]));
639}
#define PLAYER

References PLAYER, position, and relativePosition.

Referenced by PlayerEntity::lookingAtSunWithThresholdAngleCos:, ShipEntity::lookingAtSunWithThresholdAngleCos:, and relativePosition.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ removeFromLinkedLists

- (void) removeFromLinkedLists

Definition at line 286 of file Entity.m.

287{
288#ifndef NDEBUG
290 OOLog(kOOLogEntityRemoveFromList, @"DEBUG removing entity %@ from linked lists", self);
291#endif
292
293 if ((x_next == nil)&&(x_previous == nil)) // removed already!
294 return;
295
296 // make sure the starting point is still correct
297 if (UNIVERSE)
298 {
299 if ((UNIVERSE->x_list_start == self)&&(x_next))
300 UNIVERSE->x_list_start = x_next;
301 if ((UNIVERSE->y_list_start == self)&&(y_next))
302 UNIVERSE->y_list_start = y_next;
303 if ((UNIVERSE->z_list_start == self)&&(z_next))
304 UNIVERSE->z_list_start = z_next;
305 }
306 //
307 if (x_previous) x_previous->x_next = x_next;
308 if (x_next) x_next->x_previous = x_previous;
309 //
310 if (y_previous) y_previous->y_next = y_next;
311 if (y_next) y_next->y_previous = y_previous;
312 //
313 if (z_previous) z_previous->z_next = z_next;
314 if (z_next) z_next->z_previous = z_previous;
315 //
319
320#ifndef NDEBUG
322 {
323 if (![self checkLinkedLists])
324 {
325 OOLog(kOOLogEntityRemoveFromListError, @"DEBUG LINKED LISTS - problem encountered while removing %@ from linked lists", self);
326 [UNIVERSE debugDumpEntities];
327 }
328 }
329#endif
330}
static NSString *const kOOLogEntityRemoveFromList
Definition Entity.m:51
static NSString *const kOOLogEntityRemoveFromListError
Definition Entity.m:52

References checkLinkedLists, DEBUG_LINKED_LISTS, gDebugFlags, kOOLogEntityRemoveFromList, kOOLogEntityRemoveFromListError, nil, OOLog, removeFromLinkedLists, UNIVERSE, x_next, x_previous, y_next, y_previous, z_next, and z_previous.

Referenced by Universe(OOPrivate)::doRemoveEntity:, isVisualEffect, and removeFromLinkedLists.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ rootShipEntity

- (ShipEntity *) rootShipEntity

Definition at line 603 of file Entity.m.

604{
605 ShipEntity *parent = [self parentEntity];
606 if (parent != nil) return [parent rootShipEntity];
607 if ([self isShip]) return (ShipEntity *)self;
608 return nil;
609}
ShipEntity * rootShipEntity()
Definition Entity.m:603

References isShip, nil, parentEntity, and rootShipEntity.

Referenced by OOPlasmaShotEntity::checkCloseCollisionWith:, ShipEntity::entityForShaderProperties, ShipEntity::fireTurretCannon:, OOLaserShotEntity::initLaserFromShip:direction:offset:, rootShipEntity, ShipEntity(ScriptMethods)::spawnShipsWithRole:count:, ShipEntity::takeEnergyDamage:from:becauseOf:weaponIdentifier:, universalID, and OOPlasmaShotEntity::update:.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ rotationMatrix

- (OOMatrix) rotationMatrix

Definition at line 873 of file Entity.m.

874{
875 return rotMatrix;
876}

References rotationMatrix, and rotMatrix.

Referenced by maxEnergy, and rotationMatrix.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ scanClass

- (OOScanClass) scanClass

Reimplemented in ShipEntity.

References scanClass.

◆ sessionID

- (NSUInteger) sessionID

Reimplemented in PlayerEntity.

Definition at line 125 of file Entity.m.

126{
127 return _sessionID;
128}

References _sessionID, and sessionID.

Referenced by sessionID, and validForAddToUniverse.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setAtmosphereFogging:

- (void) setAtmosphereFogging: (OOColor *) fogging

Definition at line 1075 of file Entity.m.

1075 : (OOColor *)fogging
1076{
1077 [atmosphereFogging release];
1078 atmosphereFogging = [fogging retain];
1079}

References atmosphereFogging.

Referenced by Universe::drawUniverse.

+ Here is the caller graph for this function:

◆ setCollisionRadius:

- (void) setCollisionRadius: (GLfloat) amount

Definition at line 917 of file Entity.m.

917 :(GLfloat) amount
918{
919 collision_radius = amount;
920}

References collision_radius.

Referenced by OOPlasmaBurstEntity::initWithPosition:, OOSparkEntity::initWithPosition:velocity:duration:size:color:, OOPlasmaShotEntity::initWithPosition:velocity:energy:duration:color:, and OOLaserShotEntity::setRange:.

+ Here is the caller graph for this function:

◆ setCollisionRegion:

- (void) setCollisionRegion: (CollisionRegion*) region

Definition at line 539 of file Entity.m.

539 : (CollisionRegion*) region
540{
541 if (collisionRegion) [collisionRegion release];
542 collisionRegion = [region retain];
543}

References collisionRegion.

Referenced by CollisionRegion::checkEntity:.

+ Here is the caller graph for this function:

◆ setDistanceTravelled:

- (void) setDistanceTravelled: (GLfloat) value

Definition at line 781 of file Entity.m.

781 : (GLfloat) value
782{
783 distanceTravelled = value;
784}

References distanceTravelled.

Referenced by ShipEntity::fireMissileWithIdentifier:andTarget:.

+ Here is the caller graph for this function:

◆ setEnergy:

- (void) setEnergy: (GLfloat) amount

Definition at line 811 of file Entity.m.

811 :(GLfloat) amount
812{
813 energy = amount;
814}

References energy.

Referenced by Universe::addWreckageFrom:withRole:at:scale:lifetime:, ShipEntity::deserializeShipSubEntitiesFrom:, EntitySetProperty(), ShipEntity::fireSubentityLaserShot:, OOPlasmaShotEntity::initWithPosition:velocity:energy:duration:color:, ShipEntity::launchCascadeMine, Universe::setUpSpace, and ShipEntity(LoadRestore)::shipRestoredFromDictionary:useFallback:context:.

+ Here is the caller graph for this function:

◆ setMaxEnergy:

- (void) setMaxEnergy: (GLfloat) amount

Definition at line 823 of file Entity.m.

823 :(GLfloat)amount
824{
825 maxEnergy = amount;
826}

References maxEnergy.

Referenced by EntitySetProperty().

+ Here is the caller graph for this function:

◆ setNormalOrientation:

- (void) setNormalOrientation: (Quaternion) quat

Reimplemented in PlayerEntity.

Definition at line 744 of file Entity.m.

744 :(Quaternion) quat
745{
746 [self setOrientation:quat];
747}

References setOrientation:.

Referenced by EntitySetProperty(), DockEntity::launchShip:, ShipEntity(LoadRestore)::shipRestoredFromDictionary:useFallback:context:, and WaypointSetProperty().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setOrientation:

- (void) setOrientation: (Quaternion) quat

Reimplemented in OOWaypointEntity, and PlanetEntity.

Definition at line 725 of file Entity.m.

725 :(Quaternion) quat
726{
727 orientation = quat;
728 [self orientationChanged];
729}

References orientation, and orientationChanged.

Referenced by Universe::addShipAt:withRole:withinRadius:, Universe::addShips:withRole:atPosition:withCoordinateSystem:, Universe::addWreckageFrom:withRole:at:scale:lifetime:, ShipEntity::becomeExplosion, PlayerEntity::createDoppelganger, WormholeEntity::disgorgeShips, PlayerEntity::docked, ShipEntity::dumpItem:, PlayerEntity::enterDock:, ShipEntity::fireDirectLaserShotAt:, ShipEntity::fireMissileWithIdentifier:andTarget:, OOLaserShotEntity::initLaserFromShip:direction:offset:, OORingEffectEntity::initRingFromEntity:, ShipEntity::launchCascadeMine, PlanetEntity::launchShuttle, PlayerEntity::leaveWitchspace, PlayerEntity(LoadSave)::loadPlayerFromFile:asNew:, Universe::makeDemoShipWithRole:spinning:, PlayerEntity(Scripting)::processSceneString:atOffset:, ShipEntity::releaseCargoPodsDebris, setNormalOrientation:, PlayerEntity::setNormalOrientation:, OOWaypointEntity::setOrientation:, PlanetEntity::setOrientation:, Universe::setUpBreakPattern:orientation:forDocking:, Universe(OOPrivate)::setUpInitialUniverse, Universe::setupIntroFirstGo:, OOVisualEffectEntity(Private)::setUpOneStandardSubentity:, ShipEntity::setUpOneStandardSubentity:asTurret:, Universe::setUpSpace, Universe::setUpWitchspaceBetweenSystem:andSystem:, PlayerEntity::showShipModelWithKey:shipData:personality:factorX:factorY:factorZ:inContext:, Universe::spawnShip:, Universe::spawnShipWithRole:near:, OOLaserShotEntity::update:, ShipEntity::update:, and Universe::update:.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setOwner:

- (void) setOwner: (Entity *) ent

Reimplemented in ShipEntity.

Definition at line 576 of file Entity.m.

576 :(Entity *)ent
577{
578 [_owner release];
579 _owner = [ent weakRetain];
580}
OOWeakReference * _owner
Definition Entity.h:157

References _owner, and OOWeakRefObject::weakRetain.

Referenced by dealloc, ShipEntity::fireTurretCannon:, PlanetEntity(OOPrivate)::initAsAtmosphereForPlanet:dictionary:, OOExhaustPlumeEntity::initForShip:withDefinition:andScale:, OOLaserShotEntity::initLaserFromShip:direction:offset:, OOQuiriumCascadeEntity::initQuiriumCascadeFromShip:, OORingEffectEntity::initRingFromEntity:, OOVisualEffectEntity(SubEntityRelationship)::isShipWithSubEntityShip:, ShipEntity(SubEntityRelationship)::isShipWithSubEntityShip:, ShipEntity::removeExhaust:, ShipEntity::removeFlasher:, ShipEntity::setOwner:, and ShipEntity::throwSparks.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setPosition:

- (void) setPosition: (HPVector) posn

Reimplemented in OOSunEntity, and PlanetEntity.

Definition at line 647 of file Entity.m.

647 :(HPVector) posn
648{
649 position = posn;
650 [self updateCameraRelativePosition];
651}

References position, and updateCameraRelativePosition.

Referenced by Universe::addLaserHitEffectsAt:against:damage:color:, Universe::addShipAt:withRole:withinRadius:, Universe::addShips:withRole:atPosition:withCoordinateSystem:, Universe::addShipWithRole:launchPos:rfactor:, Universe::addWreckageFrom:withRole:at:scale:lifetime:, ShipEntity::becomeExplosion, DockEntity::clearDockingCorridor, ShipEntity::collideWithShip:, PlayerEntity::createDoppelganger, WormholeEntity::disgorgeShips, PlayerEntity::docked, ShipEntity::dumpItem:, EntitySetProperty(), ShipEntity::fireDirectLaserShotAt:, ShipEntity::fireMissileWithIdentifier:andTarget:, OOExhaustPlumeEntity::initForShip:withDefinition:andScale:, OOECMBlastEntity::initFromShip:, OOLaserShotEntity::initLaserFromShip:direction:offset:, OOQuiriumCascadeEntity::initQuiriumCascadeFromShip:, OORingEffectEntity::initRingFromEntity:, OOPlasmaBurstEntity::initWithPosition:, OOFlashEffectEntity(Private)::initWithPosition:size:color:duration:, OOParticleSystem::initWithPosition:velocity:count:minSpeed:maxSpeed:duration:baseColor:, OOSparkEntity::initWithPosition:velocity:duration:size:color:, OOPlasmaShotEntity::initWithPosition:velocity:energy:duration:color:, ShipEntity::launchCascadeMine, DockEntity::launchShip:, PlanetEntity::launchShuttle, ShipEntity::leaveWitchspace, PlayerEntity::moveForward:, PlayerEntity(Scripting)::processSceneString:atOffset:, ShipEntity::releaseCargoPodsDebris, OOVisualEffectEntity::rescaleBy:, ShipEntity(Private)::rescaleBy:writeToCache:, WormholeEntity::setExitPosition:, OOSunEntity::setPosition:, OOVisualEffectEntity::setScaleX:, OOVisualEffectEntity::setScaleY:, OOVisualEffectEntity::setScaleZ:, Universe::setUpBreakPattern:orientation:forDocking:, Universe(OOPrivate)::setUpInitialUniverse, ShipEntity(Private)::setUpOneEscort:inGroup:withRole:atPosition:andCount:, OOVisualEffectEntity(Private)::setUpOneFlasher:, ShipEntity(Private)::setUpOneFlasher:, OOVisualEffectEntity(Private)::setUpOneStandardSubentity:, ShipEntity::setUpOneStandardSubentity:asTurret:, Universe::setUpSpace, Universe::setUpUniverseFromStation, DockEntity::shipIsInDockingCorridor:, ShipEntity(LoadRestore)::shipRestoredFromDictionary:useFallback:context:, Universe::spawnShip:, OOLaserShotEntity::update:, and Universe::update:.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setPositionX:y:z:

- (void) setPositionX: (OOHPScalar) x
y: (OOHPScalar) y
z: (OOHPScalar) z 

Definition at line 654 of file Entity.m.

655{
656 position.x = x;
657 position.y = y;
658 position.z = z;
659 [self updateCameraRelativePosition];
660}
double OOHPScalar
Definition OOMaths.h:69
float y
float x

References position, updateCameraRelativePosition, x, and y.

Referenced by Universe::makeDemoShipWithRole:spinning:, Universe::setupIntroFirstGo:, PlayerEntity::showShipModelWithKey:shipData:personality:factorX:factorY:factorZ:inContext:, and Universe::update:.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setScanClass:

- (void) setScanClass: (OOScanClass) sClass

Definition at line 799 of file Entity.m.

799 :(OOScanClass)sClass
800{
801 scanClass = sClass;
802}
OOScanClass
Definition Entity.h:71

References scanClass.

Referenced by ShipEntity::abandonShip, Universe::addShipAt:withRole:withinRadius:, Universe::addShips:withRole:atPosition:withCoordinateSystem:, Universe::addShipWithRole:launchPos:rfactor:, PlayerEntity(ScriptMethods)::awardCommodityType:amount:, ShipEntity::becomeExplosion, PlayerEntity::createCargoPodWithType:andAmount:, PlayerEntity::createDoppelganger, ShipEntity::dumpItem:, EntitySetProperty(), ShipEntity::fireDirectLaserShotAt:, ShipEntity::fireLaserShotInDirection:weaponIdentifier:, ShipEntity::fireMissileWithIdentifier:andTarget:, ShipEntity::fireSubentityLaserShot:, OOECMBlastEntity::initFromShip:, OORingEffectEntity::initRingFromEntity:, OOLightParticleEntity::initWithDiameter:, OOWaypointEntity::initWithDictionary:, OOBreakPatternEntity::initWithPolygonSides:startAngle:aspectRatio:, ShipEntity::launchCascadeMine, StationEntity::launchDefenseShip, StationEntity::launchEscort, StationEntity::launchIndependentShip:, PlayerEntity::launchMine:, StationEntity::launchMiner, StationEntity::launchPatrol, StationEntity::launchPirateShip, StationEntity::launchPolice, StationEntity::launchScavenger, StationEntity::launchShipWithRole:, PlanetEntity::launchShuttle, StationEntity::launchShuttle, PlayerEntity::loadCargoPodsForType:amount:, Universe::makeDemoShipWithRole:spinning:, Universe::newShipWithRole:, PlayerEntity(Scripting)::processSceneString:atOffset:, ShipEntity::releaseCargoPodsDebris, Universe(OOPrivate)::setUpCargoPods, Universe::setupIntroFirstGo:, ShipEntity(Private)::setUpOneEscort:inGroup:withRole:atPosition:andCount:, Universe::setUpSpace, Universe::setUpWitchspaceBetweenSystem:andSystem:, PlayerEntity::showShipModelWithKey:shipData:personality:factorX:factorY:factorZ:inContext:, Universe::update:, and Universe::witchspaceShipWithPrimaryRole:.

+ Here is the caller graph for this function:

◆ setStatus:

◆ setThrowSparks:

- (void) setThrowSparks: (BOOL) value

Definition at line 564 of file Entity.m.

564 :(BOOL) value
565{
566 throw_sparks = value;
567}

References throw_sparks.

Referenced by ShipEntity(PureAI)::ai_throwSparks, and Universe::setUpSpace.

+ Here is the caller graph for this function:

◆ setUniversalID:

- (void) setUniversalID: (OOUniversalID) uid

Definition at line 546 of file Entity.m.

546 :(OOUniversalID)uid
547{
548 universalID = uid;
549}

References universalID.

Referenced by Universe(OOPrivate)::doRemoveEntity:.

+ Here is the caller graph for this function:

◆ setVelocity:

◆ spawnTime

- (GLfloat) spawnTime

References allTextures, descriptionForObjDump, descriptionForObjDumpBasic, fogUniform, spawnTime, and timeElapsedSinceSpawn.

+ Here is the call graph for this function:

◆ speed

- (double) speed

Definition at line 769 of file Entity.m.

770{
771 return magnitude([self velocity]);
772}

References speed, and velocity.

Referenced by ShipEntity::behaviour_attack_break_off_target:, ShipEntity::behaviour_attack_fly_from_target:, ShipEntity::behaviour_attack_fly_to_target:, ShipEntity::behaviour_attack_slow_dogfight:, ShipEntity::behaviour_evasive_action:, ShipEntity::behaviour_fly_to_target_six:, ShipEntity::behaviour_intercept_target:, OOParticleSystem::initWithPosition:velocity:count:minSpeed:maxSpeed:duration:baseColor:, ShipEntity::missileTrackPrimaryTarget:, StationEntity::OOMakeDockingInstructions, WormholeEntity::setExitSpeed:, speed, OOExhaustPlumeEntity::update:, and velocity.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ status

- (OOEntityStatus) status

Definition at line 793 of file Entity.m.

794{
795 return _status;
796}

References _status, and status.

Referenced by DockEntity::abortAllDockings, DockEntity::abortDockingForShip:, ShipEntity::acceptAsEscort:, PlayerEntity::addTarget:, ShipEntity::alertCondition, ShipEntity::becomeExplosion, StationEntity::becomeExplosion, ShipEntity::becomeLargeExplosion:, ShipEntity::behaviour_tractored:, PlayerEntity::canCollide, ShipEntity::canCollide, PlayerEntity::cargoQuantityForType:, PlayerEntity(Scripting)::checkScript, DockEntity::clearDockingCorridor, PlayerEntity::collectBountyFor:, descriptionComponents, PlayerEntity::dialFuelScoopStatus, WormholeEntity::disgorgeShips, distanceTravelled, PlayerEntity::doBookkeeping:, PlayerEntity::docked, PlayerEntity(ScriptMethods)::dockedAtMainStation, DockEntity::dockingCorridorIsEmpty, PlayerEntity::drawImmediate:translucent:, Universe::drawUniverse, dumpSelfState, PlayerEntity::engageAutopilotToStation:, PlayerEntity::enterDock:, PlayerEntity::enterWormhole:, ShipEntity::enterWormhole:replacing:, EntityGetProperty(), ShipEntity::getTractoredBy:, PlayerEntity::interpretAIMessage:, PlayerEntity::isDocked, isInSpace, PlayerEntity::isValidTarget:, ShipEntity::isValidTarget:, PlayerEntity::launchEscapeCapsule, StationEntity::legalStatusOfManifest:export:, StationEntity::noteDockedShip:, ShipEntity::noteKilledBy:damageType:, ShipEntity::onTarget:withWeapon:, PlayerEntity(OOControlsPrivate)::pollGuiScreenControlsWithFKeyAlias:, ShipEntity::realAlertCondition, PlayerEntity::receiveCommsMessage:from:, ShipEntity::removeEquipmentItem:, ShipEntity::scoopUpProcess:processEvents:processMessages:, PlayerEntity::setCargoQuantityForType:amount:, PlayerEntity::setFoundTarget:, PlayerEntity::setGuiToChartScreenFrom:, PlayerEntity(KeyMapper)::setGuiToConfirmClearScreen, PlayerEntity::setGuiToGameOptionsScreen, PlayerEntity::setGuiToIntroFirstGo:, PlayerEntity(KeyMapper)::setGuiToKeyboardLayoutScreen:resetCurrentRow:, PlayerEntity(KeyMapper)::setGuiToKeyConfigEntryScreen, PlayerEntity(KeyMapper)::setGuiToKeyConfigScreen:, PlayerEntity(KeyMapper)::setGuiToKeyMapperScreen:resetCurrentRow:, PlayerEntity::setGuiToLoadSaveScreen, PlayerEntity(Contracts)::setGuiToManifestScreen, PlayerEntity::setGuiToMarketInfoScreen, PlayerEntity::setGuiToMarketScreen, PlayerEntity::setGuiToStatusScreen, PlayerEntity(StickMapper)::setGuiToStickMapperScreen:resetCurrentRow:, PlayerEntity::setGuiToSystemDataScreenRefreshBackground:, ShipEntity::setProximityAlert:, ShipEntity::setStatus:, DockEntity::shipIsInDockingCorridor:, StationEntity::shipIsInDockingCorridor:, DockEntity::shipIsInDockingQueue:, status, WormholeEntity::suckInShip:, PlayerEntity::takeEnergyDamage:from:becauseOf:weaponIdentifier:, ShipEntity::takeEnergyDamage:from:becauseOf:weaponIdentifier:, PlayerEntity::takeHeatDamage:, ShipEntity::takeHeatDamage:, PlayerEntity::takeScrapeDamage:from:, ShipEntity::takeScrapeDamage:from:, DockEntity::update:, update:, OOECMBlastEntity::update:, PlayerEntity::update:, ShipEntity::update:, StationEntity::update:, PlayerEntity::validateCompassTarget, ShipEntity::validateDefenseTargets, ShipEntity::wasAddedToUniverse, and PlayerEntity::witchJumpChecklist:.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ subEntityReallyDied:

- (void) subEntityReallyDied: (ShipEntity *) sub
implementation

Reimplemented in ShipEntity.

Definition at line 1050 of file Entity.m.

1050 :(ShipEntity *)sub
1051{
1052 OOLog(@"entity.bug", @"%s called for non-ship entity %p by %p", __PRETTY_FUNCTION__, self, sub);
1053}

References OOLog.

◆ superShaderBindingTarget

- (id< OOWeakReferenceSupport >) superShaderBindingTarget
implementation

Definition at line 597 of file Entity.m.

598{
599 return [self parentEntity];
600}

References parentEntity, and superShaderBindingTarget.

Referenced by superShaderBindingTarget.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ systemEconomy

- (unsigned) systemEconomy
implementation

Provided by category Entity(ShaderBindings).

Definition at line 60 of file EntityShaderBindings.m.

61{
62 return [[PLAYER systemEconomy_number] unsignedIntValue];
63}

◆ systemGovernment

- (unsigned) systemGovernment
implementation

Provided by category Entity(ShaderBindings).

Definition at line 55 of file EntityShaderBindings.m.

56{
57 return [[PLAYER systemGovernment_number] unsignedIntValue];
58}

◆ systemPopulation

- (unsigned) systemPopulation
implementation

Provided by category Entity(ShaderBindings).

Definition at line 70 of file EntityShaderBindings.m.

71{
72 return [[PLAYER systemPopulation_number] unsignedIntValue];
73}

◆ systemProductivity

- (unsigned) systemProductivity
implementation

Provided by category Entity(ShaderBindings).

Definition at line 75 of file EntityShaderBindings.m.

76{
77 return [[PLAYER systemProductivity_number] unsignedIntValue];
78}

◆ systemTechLevel

- (unsigned) systemTechLevel
implementation

Provided by category Entity(ShaderBindings).

Definition at line 65 of file EntityShaderBindings.m.

66{
67 return [[PLAYER systemTechLevel_number] unsignedIntValue];
68}

◆ takeEnergyDamage:from:becauseOf:weaponIdentifier:

- (void) takeEnergyDamage: (double) amount
from: (Entity *) ent
becauseOf: (Entity *) other
weaponIdentifier: (NSString *) weaponIdentifier 

Reimplemented in DockEntity, PlayerEntity, ShipEntity, and StationEntity.

Definition at line 990 of file Entity.m.

990 :(double) amount from:(Entity *) ent becauseOf:(Entity *) other weaponIdentifier:(NSString *)weaponIdentifier
991{
992
993}

Referenced by ShipEntity::dealEnergyDamage:atRange:withBias:, ShipEntity::dealEnergyDamageWithinDesiredRange, OOPlasmaShotEntity::update:, and OOQuiriumCascadeEntity::update:.

+ Here is the caller graph for this function:

◆ throwingSparks

- (BOOL) throwingSparks

Definition at line 558 of file Entity.m.

559{
560 return throw_sparks;
561}

References throw_sparks, and throwingSparks.

Referenced by throwingSparks, and universalID.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ throwSparks

- (void) throwSparks

Reimplemented in ShipEntity.

Definition at line 570 of file Entity.m.

571{
572 // do nothing for now
573}

References throwSparks.

Referenced by throwSparks, and universalID.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ timeElapsedSinceSpawn

- (GLfloat) timeElapsedSinceSpawn

Definition at line 1069 of file Entity.m.

1070{
1071 return [UNIVERSE getTime] - spawnTime;
1072}

References spawnTime, and timeElapsedSinceSpawn.

Referenced by ShipEntity::dumpSelfState, spawnTime, timeElapsedSinceSpawn, OOFlashEffectEntity::update:, OOPlasmaBurstEntity::update:, and OOPlasmaShotEntity::update:.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ transformationMatrix

- (OOMatrix) transformationMatrix

Definition at line 885 of file Entity.m.

886{
887 OOMatrix result = rotMatrix;
888 return OOMatrixHPTranslate(result, position);
889}

References position, rotMatrix, and transformationMatrix.

Referenced by maxEnergy, and transformationMatrix.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ universalID

- (OOUniversalID) universalID

References owner, parentEntity, rootShipEntity, throwingSparks, throwSparks, and universalID.

+ Here is the call graph for this function:

◆ universalTime

- (GLfloat) universalTime

Definition at line 1057 of file Entity.m.

1058{
1059 return [UNIVERSE getTime];
1060}

References universalTime.

Referenced by isImmuneToBreakPatternHide, and universalTime.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ update:

- (void) update: (OOTimeDelta) delta_t

Reimplemented in DockEntity, DustEntity, OOBigFragmentBurstEntity, OOBreakPatternEntity, OOECMBlastEntity, OOExhaustPlumeEntity, OOExplosionCloudEntity, OOFlashEffectEntity, OOFlasherEntity, OOLaserShotEntity, OOParticleSystem, OOPlasmaBurstEntity, OOPlasmaShotEntity, OOQuiriumCascadeEntity, OORingEffectEntity, OOSmallFragmentBurstEntity, OOSparkEntity, OOSunEntity, OOVisualEffectEntity, PlanetEntity, PlayerEntity, ShipEntity, SkyEntity, StationEntity, and WormholeEntity.

Definition at line 929 of file Entity.m.

929 :(OOTimeDelta)delta_t
930{
931 if (_status != STATUS_COCKPIT_DISPLAY)
932 {
933 if ([self isSubEntity])
934 {
935 zero_distance = [[self owner] zeroDistance];
936 cam_zero_distance = [[self owner] camZeroDistance];
937 [self updateCameraRelativePosition];
938 }
939 else
940 {
941 zero_distance = HPdistance2(PLAYER->position, position);
942 cam_zero_distance = HPdistance2([PLAYER viewpointPosition], position);
943 [self updateCameraRelativePosition];
944 }
945 }
946 else
947 {
948 zero_distance = HPmagnitude2(position);
950 cameraRelativePosition = HPVectorToVector(position);
951 }
952
953 if ([self status] != STATUS_COCKPIT_DISPLAY)
954 {
955 [self applyVelocity:delta_t];
956 }
957
958 hasMoved = !HPvector_equal(position, lastPosition);
959 hasRotated = !quaternion_equal(orientation, lastOrientation);
962}
Quaternion lastOrientation
Definition Entity.h:134
HPVector lastPosition
Definition Entity.h:133

References _status, applyVelocity:, cam_zero_distance, cameraRelativePosition, camZeroDistance, hasMoved, hasRotated, isSubEntity, lastOrientation, lastPosition, orientation, owner, PLAYER, position, status, updateCameraRelativePosition, zero_distance, and zeroDistance.

Referenced by OOBreakPatternEntity::update:, OOFlashEffectEntity::update:, OOFlasherEntity::update:, OOLaserShotEntity::update:, OOParticleSystem::update:, OOPlasmaBurstEntity::update:, OOPlasmaShotEntity::update:, OOQuiriumCascadeEntity::update:, OORingEffectEntity::update:, OOSparkEntity::update:, OOSunEntity::update:, OOVisualEffectEntity::update:, PlanetEntity::update:, ShipEntity::update:, Universe::update:, and WormholeEntity::update:.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ updateCameraRelativePosition

- (void) updateCameraRelativePosition

Reimplemented in DustEntity, and OOSunEntity.

Definition at line 663 of file Entity.m.

664{
665 cameraRelativePosition = HPVectorToVector(HPvector_subtract([self absolutePositionForSubentity],[PLAYER viewpointPosition]));
666}
HPVector absolutePositionForSubentity()
Definition Entity.m:669

References absolutePositionForSubentity, cameraRelativePosition, PLAYER, and updateCameraRelativePosition.

Referenced by cameraRelativePosition, Universe::drawUniverse, setPosition:, setPositionX:y:z:, update:, and updateCameraRelativePosition.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ updateLinkedLists

- (void) updateLinkedLists

Definition at line 413 of file Entity.m.

414{
415 if (!UNIVERSE)
416 return; // not in the UNIVERSE - don't do this!
417 if ((x_next == nil)&&(x_previous == nil))
418 return; // not in the lists - don't do this!
419
420#ifndef NDEBUG
422 {
423 if (![self checkLinkedLists])
424 {
425 OOLog(kOOLogEntityVerificationError, @"DEBUG LINKED LISTS problem encountered before updating linked lists for %@", self);
426 [UNIVERSE debugDumpEntities];
427 }
428 }
429#endif
430
431 // update position in linked list for position.x
432 // take self out of list..
433 if (x_previous) x_previous->x_next = x_next;
434 if (x_next) x_next->x_previous = x_previous;
435 // sink DOWN the list
436 while ((x_previous)&&(x_previous->position.x - x_previous->collision_radius > position.x - collision_radius))
437 {
439 x_previous = x_previous->x_previous;
440 }
441 // bubble UP the list
442 while ((x_next)&&(x_next->position.x - x_next->collision_radius < position.x - collision_radius))
443 {
445 x_next = x_next->x_next;
446 }
447 if (x_next) // insert self into the list before x_next..
448 x_next->x_previous = self;
449 if (x_previous) // insert self into the list after x_previous..
450 x_previous->x_next = self;
451 if ((x_previous == nil)&&(UNIVERSE)) // if we're the first then tell the UNIVERSE!
452 UNIVERSE->x_list_start = self;
453
454 // update position in linked list for position.y
455 // take self out of list..
456 if (y_previous) y_previous->y_next = y_next;
457 if (y_next) y_next->y_previous = y_previous;
458 // sink DOWN the list
459 while ((y_previous)&&(y_previous->position.y - y_previous->collision_radius > position.y - collision_radius))
460 {
462 y_previous = y_previous->y_previous;
463 }
464 // bubble UP the list
465 while ((y_next)&&(y_next->position.y - y_next->collision_radius < position.y - collision_radius))
466 {
468 y_next = y_next->y_next;
469 }
470 if (y_next) // insert self into the list before y_next..
471 y_next->y_previous = self;
472 if (y_previous) // insert self into the list after y_previous..
473 y_previous->y_next = self;
474 if ((y_previous == nil)&&(UNIVERSE)) // if we're the first then tell the UNIVERSE!
475 UNIVERSE->y_list_start = self;
476
477 // update position in linked list for position.z
478 // take self out of list..
479 if (z_previous) z_previous->z_next = z_next;
480 if (z_next) z_next->z_previous = z_previous;
481 // sink DOWN the list
482 while ((z_previous)&&(z_previous->position.z - z_previous->collision_radius > position.z - collision_radius))
483 {
485 z_previous = z_previous->z_previous;
486 }
487 // bubble UP the list
488 while ((z_next)&&(z_next->position.z - z_next->collision_radius < position.z - collision_radius))
489 {
491 z_next = z_next->z_next;
492 }
493 if (z_next) // insert self into the list before z_next..
494 z_next->z_previous = self;
495 if (z_previous) // insert self into the list after z_previous..
496 z_previous->z_next = self;
497 if ((z_previous == nil)&&(UNIVERSE)) // if we're the first then tell the UNIVERSE!
498 UNIVERSE->z_list_start = self;
499
500 // done
501#ifndef NDEBUG
503 {
504 if (![self checkLinkedLists])
505 {
506 OOLog(kOOLogEntityUpdateError, @"DEBUG LINKED LISTS problem encountered after updating linked lists for %@", self);
507 [UNIVERSE debugDumpEntities];
508 }
509 }
510#endif
511}
static NSString *const kOOLogEntityUpdateError
Definition Entity.m:53

References checkLinkedLists, collision_radius, DEBUG_LINKED_LISTS, gDebugFlags, kOOLogEntityUpdateError, kOOLogEntityVerificationError, nil, OOLog, position, UNIVERSE, updateLinkedLists, x_next, x_previous, y_next, y_previous, z_next, and z_previous.

Referenced by isVisualEffect, Universe::update:, and updateLinkedLists.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ validForAddToUniverse

- (BOOL) validForAddToUniverse

Reimplemented in PlayerEntity, and ShipEntity.

Definition at line 214 of file Entity.m.

215{
216 NSUInteger mySessionID = [self sessionID];
217 NSUInteger currentSessionID = [UNIVERSE sessionID];
218 if (EXPECT_NOT(mySessionID != currentSessionID))
219 {
220 OOLogERR(@"entity.invalidSession", @"Entity %@ from session %lu cannot be added to universe in session %lu. This is an internal error, please report it.", [self shortDescription], mySessionID, currentSessionID);
221 return NO;
222 }
223
224 return YES;
225}
#define OOLogERR(class, format,...)
Definition OOLogging.h:112

References EXPECT_NOT, OOLogERR, sessionID, and validForAddToUniverse.

Referenced by isVisualEffect, validForAddToUniverse, and ShipEntity::validForAddToUniverse.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ vectorTo:

- (Vector) vectorTo: (Entity *) entity

Definition at line 641 of file Entity.m.

641 :(Entity *)entity
642{
643 return HPVectorToVector(HPvector_subtract([entity position], [self position]));
644}

References position.

Referenced by ShipEntity::dealEnergyDamage:atRange:withBias:, ShipEntity::dealEnergyDamageWithinDesiredRange, ShipEntity::dealMomentumWithinDesiredRange:, ShipEntity::missileTrackPrimaryTarget:, and ShipEntity::trackOntoTarget:withDForward:.

+ Here is the caller graph for this function:

◆ velocity

- (Vector) velocity

Reimplemented in ShipEntity.

References speed, and velocity.

+ Here is the call graph for this function:

◆ warnAboutHostiles

- (void) warnAboutHostiles

Reimplemented in PlayerEntity.

Definition at line 526 of file Entity.m.

527{
528 // do nothing for now, this can be expanded in sub classes
529 OOLog(@"general.error.subclassResponsibility.Entity-warnAboutHostiles", @"%@", @"***** Entity does nothing in warnAboutHostiles");
530}

References OOLog, and warnAboutHostiles.

Referenced by isVisualEffect, and warnAboutHostiles.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ wasAddedToUniverse

- (void) wasAddedToUniverse

Reimplemented in ShipEntity.

Definition at line 514 of file Entity.m.

515{
516 // Do nothing
517}

References wasAddedToUniverse.

Referenced by isVisualEffect, wasAddedToUniverse, and ShipEntity::wasAddedToUniverse.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ wasRemovedFromUniverse

- (void) wasRemovedFromUniverse

Reimplemented in ShipEntity.

Definition at line 520 of file Entity.m.

521{
522 // Do nothing
523}

References wasRemovedFromUniverse.

Referenced by Universe(OOPrivate)::doRemoveEntity:, isVisualEffect, and wasRemovedFromUniverse.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ zeroDistance

- (double) zeroDistance

Definition at line 692 of file Entity.m.

693{
694 return zero_distance;
695}

References zero_distance, and zeroDistance.

Referenced by cameraRelativePosition, update:, and zeroDistance.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Data Documentation

◆ _jsSelf

- (struct JSObject*) _jsSelf
protected

Definition at line 152 of file Entity.h.

◆ _owner

- (OOWeakReference*) _owner
private

Definition at line 157 of file Entity.h.

Referenced by setOwner:.

◆ _sessionID

- (NSUInteger) _sessionID
private

Definition at line 155 of file Entity.h.

Referenced by init, and sessionID.

◆ _status

- (OOEntityStatus) _status
private

Definition at line 158 of file Entity.h.

Referenced by setStatus:, status, and update:.

◆ atmosphereFogging

- (OOColor*) atmosphereFogging

Definition at line 115 of file Entity.h.

Referenced by init, and setAtmosphereFogging:.

◆ boundingBox

◆ cam_zero_distance

◆ cameraRelativePosition

◆ collider

- (Entity*) collider

Definition at line 128 of file Entity.h.

Referenced by ShipEntity::checkCloseCollisionWith:, and CollisionRegion::findCollisions.

◆ collidingEntities

- (NSMutableArray*) collidingEntities
protected

◆ collision_chain

- (Entity*) collision_chain

Definition at line 124 of file Entity.h.

Referenced by Universe::filterSortedLists, and CollisionRegion::findCollisions.

◆ collision_radius

- (GLfloat) collision_radius

Definition at line 111 of file Entity.h.

Referenced by Universe::addShips:withRole:atPosition:withCoordinateSystem:, addToLinkedLists, ShipEntity::avoidCollision, ShipEntity::becomeExplosion, ShipEntity::behaviour_attack_slow_dogfight:, ShipEntity::behaviour_avoid_collision:, ShipEntity::behaviour_intercept_target:, ShipEntity::behaviour_tractored:, ShipEntity::checkCloseCollisionWith:, PlayerEntity(OOPrivate)::checkEntityForMassLock:withScanClass:, OOVisualEffectEntity::clearSubEntities, ShipEntity::clearSubEntities, collisionRadius, OOVisualEffectEntity::collisionRadius, Universe::countEntitiesMatchingPredicate:parameter:inRange:ofEntity:, PlayerEntity::customViewZoomIn:, PlayerEntity::customViewZoomOut:, PlayerEntity::dialAltitude, PlayerEntity::doBookkeeping:, DockEntity::dockingInstructionsForShip:, OOEntityWithDrawable::drawImmediate:translucent:, OOParticleSystem::drawImmediate:translucent:, OOQuiriumCascadeEntity::drawImmediate:translucent:, WormholeEntity::drawImmediate:translucent:, HeadUpDisplay(Private)::drawScanner:, OOSunEntity::drawStarGlare, PlanetEntity::drawUnconditionally, ShipEntity::dumpItem:, CollisionRegion::entityByEntityOcclusionToValue, Universe::EntityInRange, Universe::filterSortedLists, OOExhaustPlumeEntity::findCollisionRadius, CollisionRegion::findCollisions, ShipEntity::fireMissileWithIdentifier:andTarget:, ShipEntity::fireTurretCannon:, Universe::firstShipHitByLaserFromShip:inDirection:offset:gettingRangeFound:, frustumRadius, Universe::getSafeVectorFromEntity:toDistance:fromPoint:, Universe::getSunSkimEndPositionForShip:, Universe::getSunSkimStartPositionForShip:, Universe::hazardOnRouteFromEntity:toDistance:fromPoint:, HeadUpDisplay::hudDrawReticleOnTarget, DustEntity::init, PlanetEntity(OOPrivate)::initAsAtmosphereForPlanet:dictionary:, PlanetEntity::initFromDictionary:withAtmosphere:andSeed:, OOSunEntity::initSunWithColor:andDictionary:, WormholeEntity::initWormholeTo:fromShip:, Universe::isVectorClearFromEntity:toDistance:fromPoint:, ShipEntity::launchCascadeMine, PlanetEntity::launchShuttle, ShipEntity::legalStatus, PlanetEntity::miniaturize, ShipEntity::onTarget:withWeapon:, OOSunEntity::radius, PlanetEntity::radius, ShipEntity::rangeToSecondaryTarget:, OOVisualEffectEntity::rescaleBy:, setCollisionRadius:, ShipEntity(PureAI)::setDestinationWithinTarget, OOEntityWithDrawable::setDrawable:, ShipEntity::setProximityAlert:, ShipEntity(PureAI)::setRacepointsFromTarget, PlanetEntity::setRadius:, OOSunEntity::setRadius:andCorona:, ShipEntity(Private)::setUpOneEscort:inGroup:withRole:atPosition:andCount:, OOVisualEffectEntity::setUpSubEntities, ShipEntity::setUpSubEntities, OOVisualEffectEntity::setUpVisualEffectFromDictionary:, CollisionRegion::shadowAtPointOcclusionToValue, Universe::spawnShipWithRole:near:, WormholeEntity::suckInShip:, ShipEntity::trackOntoTarget:withDForward:, ShipEntity::trackPrimaryTarget:delta_t:, OOExhaustPlumeEntity::update:, OOParticleSystem::update:, OOQuiriumCascadeEntity::update:, OOSunEntity::update:, PlanetEntity::update:, ShipEntity::update:, WormholeEntity::update:, and updateLinkedLists.

◆ collisionRegion

- (CollisionRegion *) collisionRegion

Definition at line 533 of file Entity.m.

534{
535 return collisionRegion;
536}

Referenced by collisionRegion, dealloc, and setCollisionRegion:.

◆ collisionTestFilter

- (unsigned) collisionTestFilter

Definition at line 100 of file Entity.h.

Referenced by dumpSelfState, Universe::filterSortedLists, and CollisionRegion::findCollisions.

◆ distanceTravelled

- (GLfloat) distanceTravelled
protected

◆ energy

◆ hasCollided

- (unsigned) hasCollided

Definition at line 98 of file Entity.h.

Referenced by CollisionRegion::findCollisions.

◆ hasMoved

- (unsigned) hasMoved

Definition at line 96 of file Entity.h.

Referenced by dumpSelfState, CollisionRegion::findShadowedEntities, and update:.

◆ hasRotated

◆ isExplicitlyNotMainStation

- (unsigned) isExplicitlyNotMainStation

◆ isImmuneToBreakPatternHide

◆ isPlayer

- (BOOL) isPlayer

Definition at line 155 of file Entity.m.

156{
157 return isPlayer;
158}

Referenced by ShipEntity::abandonShip, DockEntity::abortDockingForShip:, StationEntity::abortDockingForShip:, StationEntity::acceptDockingClearanceRequestFrom:, ShipEntity::addEquipmentItem:withValidation:inContext:, PlayerEntity::addRoleForAggression:, DockEntity::allowsLaunchingOf:, ShipEntity::becomeExplosion, ShipEntity::becomeLargeExplosion:, ShipEntity::behaviour_tractored:, ShipEntity(AI)::broadcastDistressMessageWithDumping:, ShipEntity::broadcastMessage:withUnpilotedOverride:, ShipEntity::canScoop:, ShipEntity::checkShipsInVicinityForWitchJumpExit, PlayerEntity::deferredInit, ShipEntity::descriptionForObjDump, DockEntity::dockingCorridorIsEmpty, StationEntity::dockingInstructionsForShip:, OOExhaustPlumeEntity::drawSubEntityImmediate:translucent:, ShipEntity::dumpItem:, dumpSelfState, ShipEntity::equipmentValidToAdd:whileLoading:inContext:, ShipEntity::fireLaserShotInDirection:weaponIdentifier:, ShipEntity::fireMissileWithIdentifier:andTarget:, ShipEntity::fireSubentityLaserShot:, ShipEntity::fireTurretCannon:, WormholeEntity::initWormholeTo:fromShip:, isPlayer, PlayerEntity::lookingAtSunWithThresholdAngleCos:, ShipEntity::manageCollisions, StationEntity::noteDockedShip:, ShipEntity::realAlertCondition, ShipEntity::releaseCargoPodsDebris, Universe::removeAllEntitiesExceptPlayer, ShipEntity::removeEquipmentItem:, ShipEntity::rollToMatchUp:rotating:, ShipEntity(PureAI)::scanForFormationLeader, ShipEntity(PureAI)::scanForNearestMerchantman, ShipEntity::scoopUpProcess:processEvents:processMessages:, ShipEntity::sendMessage:toShip:withUnpilotedOverride:, DockEntity::shipIsInDockingCorridor:, StationEntity::shipIsInDockingCorridor:, DockEntity::shipIsInDockingQueue:, ShipEntity::trackDestination:delta_t:, OOExhaustPlumeEntity::update:, and OOLaserShotEntity::update:.

◆ isShip

- (BOOL) isShip

Definition at line 131 of file Entity.m.

132{
133 return isShip;
134}

Referenced by DockEntity::abortAllDockings, ShipEntity::addDefenseTarget:, PlayerEntity::addTarget:, DockEntity::allowsLaunchingOf:, ShipEntity::approachAspectToPrimaryTarget, ShipEntity::behaviour_attack_break_off_target:, ShipEntity::behaviour_attack_fly_to_target:, ShipEntity::behaviour_attack_sniper:, ShipEntity::behaviour_attack_target:, ShipEntity::behaviour_flee_target:, ShipEntity::behaviour_fly_to_target_six:, ShipEntity::behaviour_formation_form_up:, ShipEntity::behaviour_tractored:, ShipEntity::broadcastEnergyBlastImminent, PlanetEntity::checkCloseCollisionWith:, ShipEntity::checkCloseCollisionWith:, PlayerEntity(OOPrivate)::checkEntityForMassLock:withScanClass:, ShipEntity::checkScanner, ShipEntity::checkScannerIgnoringUnpowered, ShipEntity::checkShipsInVicinityForWitchJumpExit, DockEntity::clearDockingCorridor, ShipEntity::dealMomentumWithinDesiredRange:, PlayerEntity::doBookkeeping:, DockEntity::dockingCorridorIsEmpty, ShipEntity::doOctreesCollide, OOEntityWithDrawable::drawImmediate:translucent:, dumpSelfState, CollisionRegion::findCollisions, ShipEntity::fireLaserShotInDirection:weaponIdentifier:, ShipEntity::fireMissileWithIdentifier:andTarget:, StationEntity::fitsInDock:andLogNoFit:, PlayerEntity::hasHostileTarget, ShipEntity::hasHostileTarget, OOLaserShotEntity::initLaserFromShip:direction:offset:, ShipEntity::initWithKey:definition:, ShipEntity::interpretAIMessage:, isShip, IsShipPredicate(), PlayerEntity::isValidTarget:, ShipEntity::isValidTarget:, DockEntity::launchShip:, PlayerEntity::lookingAtSunWithThresholdAngleCos:, PlayerEntity::loseTargetStatus, ShipEntity::manageCollisions, ShipEntity::missileTrackPrimaryTarget:, PlayerEntity::moveTargetMemoryBy:, ShipEntity::noteKilledBy:damageType:, ShipEntity::noteLostTarget, ShipEntity::noteTakingDamage:from:type:, ShipEntity::realAlertCondition, HeadUpDisplay::refreshLastTransmitter, ShipEntity::respondToAttackFrom:becauseOf:, rootShipEntity, ShipEntity::setSubEntityTakingDamage:, ShipEntity(PureAI)::setTargetToPrimaryAggressor, DockEntity::setUpShipFromDictionary:, ShipEntity::setUpShipFromDictionary:, StationEntity::setUpShipFromDictionary:, DockEntity::shipIsInDockingCorridor:, StationEntity::shipIsInDockingCorridor:, DockEntity::shipIsInDockingQueue:, PlayerEntity::takeEnergyDamage:from:becauseOf:weaponIdentifier:, ShipEntity::takeEnergyDamage:from:becauseOf:weaponIdentifier:, StationEntity::takeEnergyDamage:from:becauseOf:weaponIdentifier:, ShipEntity::takeScrapeDamage:from:, ShipEntity::trackPrimaryTarget:delta_t:, ShipEntity::update:, PlayerEntity(OOPrivate)::updateAlertConditionForNearbyEntities, and ShipEntity::updateTrackingCurve.

◆ isStation

◆ isSubEntity

◆ isSunlit

◆ isVisualEffect

- (BOOL) isVisualEffect

Definition at line 202 of file Entity.m.

203{
204 return NO;
205}

Referenced by OOEntityWithDrawable::drawImmediate:translucent:, isVisualEffect, and IsVisualEffectPredicate().

◆ isWormhole

◆ lastOrientation

- (Quaternion) lastOrientation
protected

Definition at line 134 of file Entity.h.

Referenced by PlayerEntity::applyRoll:andClimb:, and update:.

◆ lastPosition

- (HPVector) lastPosition
protected

Definition at line 133 of file Entity.h.

Referenced by update:.

◆ mass

◆ maxEnergy

◆ no_draw_distance

◆ orientation

- (Quaternion) orientation

Definition at line 732 of file Entity.m.

733{
734 return orientation;
735}

Referenced by applyRoll:andClimb:, PlayerEntity::applyRoll:andClimb:, ShipEntity::applyRoll:andClimb:, applyRoll:climb:andYaw:, ShipEntity::applyRoll:climb:andYaw:, PlayerEntity::applyYaw:, ShipEntity::ballTrackLeadingTarget:atTarget:, StationEntity::beaconPosition, PlayerEntity::breakPatternPosition, DockEntity::clearDockingCorridor, OOLaserShotEntity::descriptionComponents, DockEntity::dockingCorridorIsEmpty, DockEntity::dockingInstructionsForShip:, dumpSelfState, ShipEntity::fireDirectLaserShotAt:, ShipEntity::fireLaserShotInDirection:weaponIdentifier:, ShipEntity::fireSubentityLaserShot:, ShipEntity::fireTurretCannon:, Universe::firstShipHitByLaserFromShip:inDirection:offset:gettingRangeFound:, HeadUpDisplay::hudRotateViewpointForVirtualDepth, init, PlanetEntity(OOPrivate)::initAsAtmosphereForPlanet:dictionary:, PlanetEntity::initFromDictionary:withAtmosphere:andSeed:, OORingEffectEntity::initRingFromEntity:, Entity(OOEntityInspectorExtensions)::inspOrientationLine, DockEntity::isOffCentre, JSObjectGetQuaternion(), DockEntity::launchShip:, PlayerEntity::lookingAtSunWithThresholdAngleCos:, moveForward:, normalOrientation, PlayerEntity::normalOrientation, orientation, orientationChanged, OOVisualEffectEntity::orientationChanged, PlayerEntity::orientationChanged, ShipEntity::orientationChanged, DockEntity::portUpVectorForShipsBoundingBox:, ShipEntity::setDemoShip:, DockEntity::setDimensionsAndCorridor:docking:ddc:, setOrientation:, ShipEntity::setUpShipFromDictionary:, OOVisualEffectEntity::setUpVisualEffectFromDictionary:, DockEntity::shipIsInDockingCorridor:, PlayerEntity::showShipModelWithKey:shipData:personality:factorX:factorY:factorZ:inContext:, ShipEntity::trackOntoTarget:withDForward:, ShipEntity::trackPrimaryTarget:delta_t:, update:, PlanetEntity::update:, WaypointGetProperty(), and ShipEntity::witchspaceLeavingEffects.

◆ position

- (HPVector) position

Definition at line 612 of file Entity.m.

613{
614 return position;
615}

Referenced by DockEntity::abortAllDockings, DockEntity::abortDockingForShip:, absolutePositionForSubentityOffset:, ShipEntity::absoluteTractorPosition, Universe::addShipsToRoute:withRole:quantity:routeFraction:asGroup:, DockEntity(OOPrivate)::addShipToShipsOnApproach:, addToLinkedLists, applyVelocity:, ShipEntity::approachAspectToPrimaryTarget, ShipEntity::AuthorityPredicate, ShipEntity::avoidCollision, ShipEntity::ballTrackLeadingTarget:atTarget:, StationEntity::beaconPosition, ShipEntity::becomeExplosion, ShipEntity::behaviour_avoid_collision:, ShipEntity::behaviour_fly_thru_navpoints:, ShipEntity::behaviour_intercept_target:, ShipEntity::behaviour_land_on_planet:, ShipEntity::behaviour_track_as_turret:, ShipEntity::behaviour_tractored:, PlayerEntity::breakPatternPosition, ShipEntity::broadcastMessage:withUnpilotedOverride:, ShipEntity::calculateTargetPosition, ShipEntity::canScoop:, ShipEntity::canStillTrackPrimaryTarget, PlanetEntity::checkCloseCollisionWith:, ShipEntity::checkCloseCollisionWith:, CollisionRegion::checkEntity:, ShipEntity::checkForAegis, ShipEntity(PureAI)::checkForMotherStation, ShipEntity::checkScanner, ShipEntity::checkScannerIgnoringUnpowered, ShipEntity::checkShipsInVicinityForWitchJumpExit, DockEntity::clearDockingCorridor, ShipEntity::collideWithShip:, PlayerEntity::commanderDataDictionary, ShipEntity::ComparePlanetsBySurfaceDistance, Universe::coordinatesForPosition:withCoordinateSystem:returningScalar:, Universe::countEntitiesMatchingPredicate:parameter:inRange:ofEntity:, PlayerEntity::createDoppelganger, ShipEntity::currentAimTolerance, descriptionComponents, OOSunEntity::descriptionComponents, PlanetEntity::descriptionComponents, ShipEntity::descriptionComponents, descriptionForObjDump, WormholeEntity::disgorgeShips, ShipEntity::distance_six:, ShipEntity::distance_twelve:withOffset:, PlayerEntity::doBookkeeping:, PlayerEntity::docked, DockEntity::dockingCorridorIsEmpty, DockEntity::dockingInstructionsForShip:, StationEntity::dockingInstructionsForShip:, ShipEntity::doesHitLine:v0:, PlayerEntity::doesHitLine:v0:v1:, ShipEntity::doesHitLine:v0:v1:, OOSunEntity::drawDirectVisionSunGlare, OOParticleSystem::drawImmediate:translucent:, OOLightParticleEntity::drawSubEntityImmediate:translucent:, ShipEntity::drawSubEntityImmediate:translucent:, drawTransformationMatrix, PlayerEntity::drawTransformationMatrix, Universe::drawUniverse, dumpSelfState, StationEntity::dumpSelfState, ShipEntity(AI)::enterTargetWormhole, CollisionRegion::entityByEntityOcclusionToValue, Universe::EntityInRange, OOFlashEffectEntity::explosionFlashFromEntity:, Universe::filterSortedLists, ShipEntity::findBoundingBoxRelativeTo:InVectors:_i:_j:, CollisionRegion::findCollisions, Universe::findEntitiesMatchingPredicate:parameter:inRange:ofEntity:, ShipEntity::findNearestPlanet, ShipEntity::fireDirectLaserShotAt:, ShipEntity::fireLaserShotInDirection:weaponIdentifier:, ShipEntity::fireMissileWithIdentifier:andTarget:, ShipEntity::fireSubentityLaserShot:, ShipEntity::fireTurretCannon:, Universe::firstShipHitByLaserFromShip:inDirection:offset:gettingRangeFound:, OOBigFragmentBurstEntity::fragmentBurstFromEntity:, OOSmallFragmentBurstEntity::fragmentBurstFromEntity:, Universe::getSafeVectorFromEntity:toDistance:fromPoint:, Universe::getStationMarkets, Universe::getSunSkimEndPositionForShip:, Universe::getSunSkimStartPositionForShip:, Universe::hazardOnRouteFromEntity:toDistance:fromPoint:, init, PlanetEntity(OOPrivate)::initAsAtmosphereForPlanet:dictionary:, OOExplosionCloudEntity(OOPrivate)::initExplosionCloudWithEntity:size:andSettings:, OOECMBlastEntity::initFromShip:, OOLaserShotEntity::initLaserFromShip:direction:offset:, OOQuiriumCascadeEntity::initQuiriumCascadeFromShip:, OORingEffectEntity::initRingFromEntity:, WormholeEntity::initWithDict:, OOWaypointEntity::initWithDictionary:, WormholeEntity::initWormholeTo:fromShip:, Entity(OOEntityInspectorExtensions)::inspPositionLine, PlayerEntity::interpretAIMessage:, DockEntity::isOffCentre, Universe::isVectorClearFromEntity:toDistance:fromPoint:, JSObjectGetVector(), ShipEntity::launchCascadeMine, PlayerEntity::launchEscapeCapsule, PlanetEntity::launchShuttle, PlayerEntity::leaveWitchspace, Universe::legacyPositionFrom:asCoordinateSystem:, PlayerEntity(LoadSave)::loadPlayerFromFile:asNew:, PlayerEntity::lookingAtSunWithThresholdAngleCos:, ShipEntity::lookingAtSunWithThresholdAngleCos:, moveForward:, Universe::nearestEntityMatchingPredicate:parameter:relativeToEntity:, ShipEntity::onTarget:withWeapon:, Universe::populateNormalSpace, position, DockEntity::pruneAndCountShipsOnApproach, ShipEntity::rangeToDestination, ShipEntity::rangeToSecondaryTarget:, ShipEntity::realAlertCondition, relativePosition, ShipEntity::releaseCargoPodsDebris, OOVisualEffectEntity::rescaleBy:, ShipEntity(Private)::rescaleBy:writeToCache:, OOExhaustPlumeEntity::resetPlume, ShipEntity(LoadRestore)::savedShipDictionaryWithContext:, ShipEntity::sendExpandedMessage:toShip:, ShipEntity::sendMessage:toShip:withUnpilotedOverride:, ShipEntity(PureAI)::setDestinationToDockingAbort, ShipEntity(PureAI)::setDestinationToTarget, ShipEntity(PureAI)::setDestinationWithinTarget, DockEntity::setDimensionsAndCorridor:docking:ddc:, Universe::setLighting, ShipEntity(PureAI)::setPlanetPatrolCoordinates, setPosition:, PlanetEntity::setPosition:, setPositionX:y:z:, ShipEntity::setProximityAlert:, ShipEntity(PureAI)::setRacepointsFromTarget, OOVisualEffectEntity::setScaleX:, OOVisualEffectEntity::setScaleY:, OOVisualEffectEntity::setScaleZ:, ShipEntity(PureAI)::setSunSkimExitCoordinates, ShipEntity::setTargetToNearestStationIncludingHostiles:, Universe(OOPrivate)::setUpInitialUniverse, CollisionRegion::shadowAtPointOcclusionToValue, DockEntity::shipIsInDockingCorridor:, Universe::spawnShip:, ShipEntity::startTrackingCurve, WormholeEntity::suckInShip:, ShipEntity::SurfaceDistanceSqared, ShipEntity::SurfaceDistanceSqaredV, PlayerEntity::takeEnergyDamage:from:becauseOf:weaponIdentifier:, PlayerEntity::takeScrapeDamage:from:, ShipEntity(PureAI)::thargonCheckMother, ShipEntity::throwSparks, ShipEntity::trackDestination:delta_t:, ShipEntity::trackPrimaryTarget:delta_t:, ShipEntity::trackSideTarget:delta_t:, transformationMatrix, update:, OOExhaustPlumeEntity::update:, OOLaserShotEntity::update:, OOPlasmaShotEntity::update:, OOQuiriumCascadeEntity::update:, OOSunEntity::update:, ShipEntity::update:, SkyEntity::update:, WormholeEntity::update:, updateLinkedLists, ShipEntity::updateTrackingCurve, vectorTo:, and PlayerEntity::viewpointPosition.

◆ rotMatrix

◆ scanClass

◆ shadingEntityID

- (OOUniversalID) shadingEntityID

Definition at line 126 of file Entity.h.

Referenced by CollisionRegion::findShadowedEntities.

◆ spawnTime

- (GLfloat) spawnTime
protected

Definition at line 1063 of file Entity.m.

1064{
1065 return spawnTime;
1066}

Referenced by OOPlasmaShotEntity::canCollide, ShipEntity::dumpSelfState, init, spawnTime, and timeElapsedSinceSpawn.

◆ throw_sparks

◆ universalID

◆ velocity

◆ x_next

◆ x_previous

◆ y_next

◆ y_previous

◆ z_next

◆ z_previous

◆ zero_distance

◆ zero_index

- (int) zero_index

Definition at line 117 of file Entity.h.

Referenced by Universe(OOPrivate)::doRemoveEntity:, and Universe::update:.


The documentation for this class was generated from the following files: